[Insight-users] Code change request for itkGDCMImageIO.cxx

Matthias Schabel mschabel at ucair.med.utah.edu
Thu Dec 14 12:41:01 EST 2006


Hi,

I have some code that replicates most of the DICOM metadata from a  
set of input files, modifies a few key/value pairs, and uses it to  
write some modified post-processed DICOM series data with this code:

	gdcmImageIO->KeepOriginalUIDOn();
	
     writer->SetImageIO(gdcmImageIO);
	
	// generate output file names
     writer->SetMetaDataDictionaryArray(&new_dict_array);
	writer->SetFileNames(output_filenames);	

     try
     {
         writer->Update();
     }
     catch (itk::ExceptionObject& e)
     {
         std::cerr << "exception in file reader " << std::endl;
         std::cerr << e << std::endl;

         throw;
     }

Unfortunately, every time a file is written (and I'm writing  
thousands of them), itkGDCMImageIO writes a warning to std::cerr like  
this:

GDCMImageIO: non-DICOM and non-ITK standard key = xxxx|xxxx

These are presumably vendor-specific key/value pairs; none of the  
warnings are for keys I have altered. I would like to be able to  
switch off the warning by doing something like

dcmImageIO->warningsOff();

but they appear to be hard-wired in the code, itkGDCMImageIO.cxx :

00797           else
00798             {
00799             std::cerr << "GDCMImageIO: non-DICOM and non-ITK  
standard key = ";
00800             std::cerr << key << std::endl;
00801             }

Unless there is a mechanism for turning this off that I've missed, I  
think this will require a commit to the code base...

Thanks,

Matthias



----------------------------------------------------------------
Matthias Schabel, Ph.D.
Assistant Professor, Department of Radiology
Utah Center for Advanced Imaging Research
729 Arapeen Drive
Salt Lake City, UT  84108
801-587-9413 (work)
801-585-3592 (fax)
801-706-5760 (cell)
801-484-0811 (home)
matthias dot schabel at hsc dot utah dot edu
----------------------------------------------------------------







-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20061214/a3cda990/attachment.html


More information about the Insight-users mailing list