Added initializer and fixed indentation

This commit is contained in:
Robert Osfield
2009-02-05 14:42:29 +00:00
parent 2864a75ad2
commit a88f4e2f86

View File

@@ -418,7 +418,7 @@ class ReaderWriterDICOM : public osgDB::ReaderWriter
osg::ref_ptr<osg::RefMatrix> matrix = new osg::RefMatrix;
osg::ref_ptr<osg::Image> 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["<<i<<"], "<<imagePositionPatient[i]<<std::endl;
}
@@ -523,7 +523,7 @@ class ReaderWriterDICOM : public osgDB::ReaderWriter
for(int i=0; i<6; ++i)
{
double value = 0.0;
if (fileformat.getDataset()->findAndGetFloat64(DCM_ImageOrientationPatient, value,i).good())
if (fileformat.getDataset()->findAndGetFloat64(DCM_ImageOrientationPatient, value,i).good())
{
imageOrientationPatient[i] = value;
notice()<<"Read imageOrientationPatient["<<i<<"], "<<imageOrientationPatient[i]<<std::endl;