void SSeriesDBReader::updating() throw(::fwTools::Failed) { SLM_TRACE_FUNC(); if( this->hasLocationDefined() ) { ::fwMedData::SeriesDB::sptr seriesDB = createSeriesDB( this->getFolder() ); if( seriesDB->size() > 0 ) { // Retrieve dataStruct associated with this service ::fwMedData::SeriesDB::sptr associatedSeriesDB = this->getObject< ::fwMedData::SeriesDB >(); SLM_ASSERT("associated SeriesDB not instanced", associatedSeriesDB); associatedSeriesDB->shallowCopy( seriesDB ) ; ::fwGui::Cursor cursor; cursor.setCursor(::fwGui::ICursor::BUSY); this->notificationOfDBUpdate(); cursor.setDefaultCursor(); } else { ::fwGui::dialog::MessageDialog::showMessageDialog( "Image Reader","This file can not be read. Retry with another file reader.", ::fwGui::dialog::IMessageDialog::WARNING); } } }
void SSeriesDBReader::updating() { SLM_TRACE_FUNC(); if( this->hasLocationDefined() ) { ::fwMedData::SeriesDB::sptr seriesDB = createSeriesDB( this->getFolder() ); if( seriesDB->size() > 0 ) { if(this->isStopped()) // FIXME service might be stopped while updating in a worker { return; } // Retrieve dataStruct associated with this service ::fwMedData::SeriesDB::sptr associatedSeriesDB = this->getInOut< ::fwMedData::SeriesDB >(::fwIO::s_DATA_KEY); if (!associatedSeriesDB) { FW_DEPRECATED_KEY(::fwIO::s_DATA_KEY, "inout", "18.0"); associatedSeriesDB = this->getObject< ::fwMedData::SeriesDB >(); } SLM_ASSERT("associated SeriesDB not instanced", associatedSeriesDB); associatedSeriesDB->shallowCopy( seriesDB ); ::fwGui::Cursor cursor; cursor.setCursor(::fwGui::ICursor::BUSY); this->notificationOfDBUpdate(); cursor.setDefaultCursor(); } else { ::fwGui::dialog::MessageDialog::showMessageDialog( "Image Reader", "This file can not be read. Retry with another file reader.", ::fwGui::dialog::IMessageDialog::WARNING); } } }