Program: gdcm
Module: $RCSfile: vtkGdcmReader.cxx,v $
Language: C++
- Date: $Date: 2007/12/13 16:18:13 $
- Version: $Revision: 1.94 $
+ Date: $Date: 2009/04/18 14:42:51 $
+ Version: $Revision: 1.95 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
// sh->SetDropDuplicatePositions(true);
//
// // Sorting the list is mandatory
-// // a side effect is to compute ZSpacing for the fle set
+// // a side effect is to compute ZSpacing for the file set
// sh->OrderFileList(l); // sort the list
//
// vtkGdcmReader *reader = vtkGdcmReader::New();
#include <vtkPointData.h>
#include <vtkLookupTable.h>
-vtkCxxRevisionMacro(vtkGdcmReader, "$Revision: 1.94 $")
+vtkCxxRevisionMacro(vtkGdcmReader, "$Revision: 1.95 $")
vtkStandardNewMacro(vtkGdcmReader)
//-----------------------------------------------------------------------------
// this->Execution=false; // For VTK5.0
this->KeepOverlays = false;
+
+ this->FlipY = true; // to keep old behaviour
}
vtkGdcmReader::~vtkGdcmReader()
{
//size = fileH->GetImageDataSize();
// useless - just an accessor; 'size' unused
- src = (unsigned char*)fileH->GetImageData();
+ //if (this->GetFlipY())
+ src = (unsigned char*)fileH->GetImageData();
+ //else
+ // dest = (unsigned char*)fileH->GetImageData();
}
+
+if (this->GetFlipY()) {
unsigned char *dst = dest + planeSize - lineSize;
for (int plane = 0; plane < numPlanes; plane++)
{
}
dst += 2 * planeSize;
}
-
+}
+else
+{
+ memcpy((void*)dest, (void*)src, numPlanes * numLines * lineSize);
+}
fileH->Delete();
}