diff --git a/src/osgPlugins/dicom/ReaderWriterDICOM.cpp b/src/osgPlugins/dicom/ReaderWriterDICOM.cpp index c06142066..f728ce8c1 100644 --- a/src/osgPlugins/dicom/ReaderWriterDICOM.cpp +++ b/src/osgPlugins/dicom/ReaderWriterDICOM.cpp @@ -418,7 +418,7 @@ class ReaderWriterDICOM : public osgDB::ReaderWriter osg::ref_ptr matrix = new osg::RefMatrix; osg::ref_ptr image; unsigned int imageNum = 0; - EP_Representation pixelRep; + EP_Representation pixelRep = EPR_Uint8; int numPlanes = 0; GLenum pixelFormat = 0; GLenum dataType = 0; @@ -448,7 +448,7 @@ class ReaderWriterDICOM : public osgDB::ReaderWriter double pixelSize_x = 1.0; double sliceThickness = 1.0; double imagePositionPatient[3] = {0, 0, 0}; - double imageOrientationPatient[6] = {1.0, 0.0, 0.0, 0.0, 1.0, 0.0 }; + double imageOrientationPatient[6] = {1.0, 0.0, 0.0, 0.0, 1.0, 0.0 }; Uint16 numOfSlices = 1; double value = 0.0; @@ -507,7 +507,7 @@ class ReaderWriterDICOM : public osgDB::ReaderWriter // patient position for(int i=0; i<3; ++i) { - if (fileformat.getDataset()->findAndGetFloat64(DCM_ImagePositionPatient, imagePositionPatient[i],i).good()) + if (fileformat.getDataset()->findAndGetFloat64(DCM_ImagePositionPatient, imagePositionPatient[i],i).good()) { notice()<<"Read DCM_ImagePositionPatient["<findAndGetFloat64(DCM_ImageOrientationPatient, value,i).good()) + if (fileformat.getDataset()->findAndGetFloat64(DCM_ImageOrientationPatient, value,i).good()) { imageOrientationPatient[i] = value; notice()<<"Read imageOrientationPatient["<