[Insight-developers] itkGDCMImageIO and itkImageSeriesReader problem

Patrick Cheng cheng at isis.georgetown.edu
Fri Jan 14 13:49:11 EST 2011


  Hi All,

Recent changes in ITK (I am using nightly build as of Jan 12, 2011) 
broke our code in IGSTK.

There are two issues emerged:

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
*Problem 1: Fail to expose DICOM tags.*

  itk::MetaDataDictionary & dict = m_ImageIO->GetMetaDataDictionary();

  tagkey = "0018|1120";

  if( itk::ExposeMetaData<std::string>(dict,tagkey, m_GantryTilt ) )
    {
    ..... // Will not reach here
    }

*Are these code still valid for checking DICOM tags?*

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
*Problem 2: Memory effect of the GDCMImageIO class*
This happens when we ask the m_ImageSeriesReader to read a *new* set of 
image that is *smaller than the old one*, it will throw an exception:

   m_ImageIO = itk::GDCMImageIO::New();
   m_ImageIO->SetGlobalWarningDisplay(this->GetGlobalWarningDisplay());
   m_ImageSeriesReader = ImageSeriesReaderType::New();
   m_ImageSeriesReader->SetImageIO( m_ImageIO );
   ........
   m_ImageSeriesReader->SetFileNames( m_FileNames->GetFileNames(
                                                  
seriesUID.front().c_str() )  );
   ........
   try
     {
     m_ImageSeriesReader->Update();
     }
   catch( itk::ExceptionObject & excp )
     {
     ....//Exception: Requested region is (at least partially) outside 
region.
     }

It looks like the ImageSeriesReader needs to be reset every time it 
accepts new file names.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Thank you,

Patrick

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20110114/a101a00a/attachment.htm>


More information about the Insight-developers mailing list