void SSeriesDBReader::updating() throw(::fwTools::Failed) { SLM_TRACE_FUNC(); if( this->hasLocationDefined() ) { ::fwMedData::SeriesDB::sptr localSeriesDB = this->createSeriesDB( this->getFolder() ); if( !localSeriesDB->empty() ) { // Retrieve dataStruct associated with this service ::fwMedData::SeriesDB::sptr seriesDB = this->getObject< ::fwMedData::SeriesDB >(); // seriesDB->shallowCopy( localSeriesDB ) ; ::fwComEd::helper::SeriesDB sDBhelper(seriesDB); ::fwData::mt::ObjectWriteLock lock(seriesDB); sDBhelper.merge(localSeriesDB); sDBhelper.notify(this->getSptr()); ::fwGui::Cursor cursor; cursor.setCursor(::fwGui::ICursor::BUSY); 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() throw(::fwTools::Failed) { if( this->hasLocationDefined() ) { // Retrieve dataStruct associated with this service ::fwMedData::SeriesDB::sptr seriesDB = this->getObject< ::fwMedData::SeriesDB >() ; SLM_ASSERT("SeriesDB not instanced", seriesDB); ::fwMedData::SeriesDB::sptr localSeriesDB = ::fwMedData::SeriesDB::New(); ::fwGui::Cursor cursor; cursor.setCursor(::fwGui::ICursor::BUSY); this->loadSeriesDB(this->getFiles(), localSeriesDB); ::fwComEd::helper::SeriesDB sDBhelper(seriesDB); ::fwData::mt::ObjectWriteLock lock(seriesDB); sDBhelper.merge(localSeriesDB); sDBhelper.notify(this->getSptr()); cursor.setDefaultCursor(); } }