[Insight-developers] itkGDCMImageIO and itkImageSeriesReader problem

Patrick Cheng cheng at isis.georgetown.edu
Tue Jan 18 11:42:46 EST 2011


Hi Luis,

Thank you for the answer.

I ran the test and it could not find the dicom tags.

Here is the link to the testing file:
http://dl.dropbox.com/u/77341/I0092932.dcm

-------------------------------------------------------------------------------------------------------------------------------------
C:\Research\Bin\ITK-VS10\bin\Release>DicomPrintPatientInformation.exe 
I0092932.dcm
Patient Name : NOT FOUND
Patient ID   : NOT FOUND
Patient Sex  : NOT FOUND
Patient Age  : NOT FOUND
Study Date   : NOT FOUND
Modality     : NOT FOUND
Manufacturer : NOT FOUND
Institution  : NOT FOUND
Model        : NOT FOUND
-------------------------------------------------------------------------------------------------------------------------------------

Patrick

On 1/18/2011 10:44 AM, Luis Ibanez wrote:
> Hi Patrick,
>
>
> 1) Please try the example:
>
> ITK/Code/IO/DicomPrintPatientInformation.cxx
>
> (from today's Git version),
>
> To see if you can get that tag from that specific DICOM file.
>
> No changes have been made to the metadata dictionary
> itself, so, this may be a secondary effect from migrating
> to GDCM 2.0.... we need your help to track the real source
> of the problem.
>
>
>
> 2)  Problem 2, has always been there,
>
>        If you reuse a reader, you must call
>
>             reader->UpdateLargestPossibleRegion()
>
>         instead of simply calling
>
>             reader->Update().
>
>
> This is because a call to Update() doesn't recompute
> the largest size of the image.
>
> This applies to both the ImageFileReader and the
> ImageSeriesReader.
>
>
>       Luis
>
>
> ----------------------------------------------------------------------------------
> On Fri, Jan 14, 2011 at 1:49 PM, Patrick Cheng
> <cheng at isis.georgetown.edu>  wrote:
>> 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
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Kitware offers ITK Training Courses, for more information visit:
>> http://kitware.com/products/protraining.html
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-developers
>>
>>
>
>


More information about the Insight-developers mailing list