I have a single-frame dicom file in originally in 'LittleEndianImplicit'. It says
when I try to read it withE: can't convert input pixel data, probably unsupported compression
Code: Select all
DcmFileFormat * format = new DcmFileFormat;
OFCondition cond = format->loadFile(/*path*/);
if(cond.good() && format->chooseRepresentation(EXS_LittleEndianExplicit, NULL).good())
{
DicomImage * image = new DicomImage(format, EXS_LittleEndianExplicit);
}
Apparently, chooseRepresentation() didn't help, nor is it relevant. If I first convert the file with 'dcmconv' into 'LittleEndianExplicit', then everything works fine as expected.
I wonder how to properly convert from 'LittleEndianImplicit' to 'LittleEndianExplicit'?