[Insight-users] read dicom images, register and write out dicoms with no change in metadata

Tadimalla, Sirisha sirisha-tadimalla at uiowa.edu
Mon Apr 7 17:08:28 EDT 2008


Hi,

I am trying to register two dicom MR images as part of a project. I need the dicom header information to be unchanged in the registered dicom output. I also need the Private tags in the output header. When I build and run it, I get a registered image in DICOM format, and I have most of the original header information, but it doesn't contain the private tags. Here is part of the code that I have used:

#include "itkGDCMImageIO.h"
#include "itkImageFileReader.h"
#include "itkImageFileWriter.h"

ReaderType::Pointer movingReader = ReaderType::New();
ImageIOType::Pointer movingdicomIO = ImageIOType::New();

movingReader->SetFileName( argv[2] );

movingReader->SetImageIO( movingdicomIO );
movingdicomIO->SetMaxSizeLoadEntry(0xffff);
movingdicomIO->LoadPrivateTagsOn();
movingdicomIO->KeepOriginalUIDOn();

/// Registration is done here and then the output dicom has to be written

writer->SetInput( caster->GetOutput() );
writer->SetImageIO( movingdicomIO );
writer->SetFileName( argv[3] );
writer->UseInputMetaDataDictionaryOff();

writer->Update();

Please help.
Thank you
-Sirisha


Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.




More information about the Insight-users mailing list