[SCIFIO] NullPointer using the DICOMOMETranslator to extract calibration data

Michael Zinsmaier michael.zinsmaier at gmx.de
Mon Sep 9 08:59:29 CDT 2013


Hi togehter,

we try to load metadata from a  *.DCM file. To extract calibration data 
we use the following code:

         Metadata meta = XYZ.initializer().parseMetadata(imgRef, true);

         // translate to ome metadata to get access to calibration values
         OMEMetadata omexml = new OMEMetadata(XYZ_SCIFIO.getContext());
         XYZ_SCIFIO.translator().translate(meta, omexml, false);

afterwards we read calibration data like this

     omexml.getAxes(currentSeries)

I don't think the file actually has calibration data so the resulting 
value should be the default (1).
However the call to translate fails with a NullPointerException:

class: DefaultOMEXMLMetadataService
method: populateImageMetadata
first line

The submitted parameters are:
         retrieve -> OMEXMLMetadataImpl
         imageIndex -> 0
         ImageMetadata -> DefaultImageMetadata

Maybe something is not initialized at that point?

Thanks for your help
best regards Michael


@Mark I will send you and example file in a private mail






More information about the SCIFIO mailing list