[Dcmlib] Bug in writing RGB images

Mathieu Malaterre mathieu.malaterre at kitware.com
Mon Mar 20 21:42:01 CET 2006


If one do:

file->SetWriteModeToRGB()
then call
file->Write( filename )

the file will be refused to be written (function will return false).

Fix:
Explicitely set the Sample Per Pixel to be 3.

header->InsertValEntry("3",0x0028,0x0002); // Samples per Pixel

HTH,
Mathieu



More information about the Dcmlib mailing list