[Insight-users] Pb with DicomDictionary modifying MultiResMIRegistration

Laurent PAUL Laurent.Paul at orto.ucl.ac.be
Mon May 29 12:08:17 EDT 2006


Hi users,

I modified MultiResMIRegistration from Insight Appications to run it with
Dicom images. I think everything is ok in my code, but I have a run time
error.

In the code, I added a template parameter to the SimpleAppOutput class.
This parameter is a 2D-Image . I needed that for the ImageSeriesWriter. I
added Set/GetDicomDictionary and Set/GetGDCMImageIO macros and use them in
the Execute method of SimpleApp class.
I modified Readers to read Dicom.

Compilation is ok, but I got an error when I do
resampleMovingwriter->Update();
The exception caught is unknown...
I found this occurs when I 'SetMetaDataDictionaryArray()'.

This is what I'm doing
In SimpleAppInputParser:
itkGetConstReferenceMacro(DicomDico,
DICOMReaderType::DictionaryArrayRawPointer);
typename DICOMReaderType::DictionaryArrayRawPointer m_DicomDico;
m_DicomDico = FixedItkReader->GetMetaDataDictionaryArray();

In SimpleAppOutput:
itkSetMacro( DicomDico, DICOMWriterType::DictionaryArrayRawPointer);
typename DICOMWriterType::DictionaryArrayRawPointer m_DicomDico;
resampleMovingwriter->SetMetaDataDictionaryArray( m_DicomDico);

In SimpleApp::InitializeGenerator():
this->m_Generator->SetDicomDico( this->m_Parser->GetDicomDico() );

Thanks for help!

Laurent.



More information about the Insight-users mailing list