Hi Sebastian, thank you for this suggestion, it would definitively be nice to get a progress on loading DICOM images. We will try to integrate a similar solution in the near future.
Best Regards, Klaus Fritzsche Dipl.-Inform., M.Sc. DKFZ German Cancer Research Center (Deutsches Krebsforschungszentrum) Member of the Helmholtz Association Division of Medical and Biological Informatics Im Neuenheimer Feld 280 D-69120 Heidelberg Phone: 49-(0)6221-42-3545 Fax: 49-(0)6221-42-2354 E-Mail: [EMAIL PROTECTED] Web: www.dkfz.de Confidentiality Note: This message is intended only for the use of the named recipient(s) and may obtain confidential and/or privileged information. If you are not the intended recipient, please contact the sender and delete the message. Any unauthorized use of the information contained in this message is prohibited. -----Ursprüngliche Nachricht----- Von: sebastian ordas [mailto:[EMAIL PROTECTED] Gesendet: Montag, 3. November 2008 17:37 An: [email protected] Betreff: [mitk-users] progress bar for DICOM image reading Dear MITK team, I was wondering if you would like to link the mitk progress bar to the DICOM image reader, so the user can get a feedback on the progress while opening a data set. The code would be something like this: // a progress command itk::SmartPointer<ProgressCommandType> m_ProgressCommand; m_ProgressCommand = ProgressCommandType::New(); m_ProgressCommand->SetCallbackFunction( this, &Navigator::OnITKProgressEvent ); // a progress callback void OnITKProgressEvent(itk::Object *source, const itk::EventObject &) { // Get the value of the progress float progress = reinterpret_cast<itk::ProcessObject *>(source)->GetProgress(); // Update the progress bar and value in the MITK progress bar m_mitkProgressMeter->value(100 * progress); m_mitkOutProgressCounter->value(100 * progress); // Show or hide progress bar if necessary if(progress < 1.0f && !m_mitkProgressBar->visible()) { m_mitkProgressBar->show(); } else if (progress == 1.0f && m_mitkProgressBar->visible()) { m_mitkProgressBar->hide(); } } // set the progress observer to the image reader m_mitkImageReader->SetProgressCallback( m_ProgressCommand ); // In the mitk Image reader typedef itk::ImageSeriesReader< ImageType > ImageSeriesReaderType; typedef itk::ImageFileReader< ImageType > ImageReaderType; /** Internal itkImageSeriesReader */ typename ImageSeriesReaderType::Pointer m_ImageSeriesReader; typename ImageReaderType::Pointer m_ImageFileReader; void SetProgressCallback(itk::Command *progressCallback) { m_ImageSeriesReader->AddObserver(itk::ProgressEvent(),progressCallback); } thanks, sebastian ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users
