/*========================================================================= medInria Copyright (c) INRIA 2013 - 2018. All rights reserved. See LICENSE.txt for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. =========================================================================*/ #include #include #include namespace itk { void DataImageReaderCommand::Execute (Object *caller, const EventObject &event) { ImageIOBase *po = dynamic_cast(caller); if(po && typeid(event) == typeid(itk::ProgressEvent)) { if (m_Reader) { m_Reader->setProgress((int)(po->GetProgress()*100.0)); } } } void DataImageReaderCommand::Execute (const Object *caller, const EventObject &event) { ImageIOBase *po = dynamic_cast(const_cast(caller) ); if(po && typeid(event) == typeid ( itk::ProgressEvent ) ) { if (m_Reader) { m_Reader->setProgress ( (int)(po->GetProgress()*100.0) ); } } } }