Program: gdcm
Module: $RCSfile: vtkGdcmWriter.cxx,v $
Language: C++
- Date: $Date: 2006/05/09 10:54:57 $
- Version: $Revision: 1.32 $
+ Date: $Date: 2007/06/19 13:09:45 $
+ Version: $Revision: 1.34 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#define vtkFloatingPointType float
#endif
-vtkCxxRevisionMacro(vtkGdcmWriter, "$Revision: 1.32 $")
+vtkCxxRevisionMacro(vtkGdcmWriter, "$Revision: 1.34 $")
vtkStandardNewMacro(vtkGdcmWriter)
vtkCxxSetObjectMacro(vtkGdcmWriter,LookupTable,vtkLookupTable);
// The output data must be deleted by the user of the method !!!
size_t ReverseData(vtkImageData *image,unsigned char **data)
{
+#if (VTK_MAJOR_VERSION >= 5)
+ vtkIdType inc[3];
+#else
int inc[3];
+#endif
int *extent = image->GetUpdateExtent();
int dim[3] = {extent[1]-extent[0]+1,
extent[3]-extent[2]+1,
* vtkMedicalImageProperties
*/
#if (VTK_MAJOR_VERSION >= 5)
-void SetMedicalImageInformation(gdcm::FileHelper *file, vtkMedicalImageProperties *medprop)
+void SetMedicalImageInformation(GDCM_NAME_SPACE::FileHelper *file, vtkMedicalImageProperties *medprop)
{
// For now only do:
// PatientName, PatientID, PatientAge, PatientSex, PatientBirthDate, StudyID
/**
* Set the data informations in the file
*/
-void SetImageInformation(gdcm::FileHelper *file, vtkImageData *image)
+void SetImageInformation(GDCM_NAME_SPACE::FileHelper *file, vtkImageData *image)
{
std::ostringstream str;
void vtkGdcmWriter::WriteDcmFile(char *fileName, vtkImageData *image)
{
- gdcm::FileHelper *dcmFile;
+ GDCM_NAME_SPACE::FileHelper *dcmFile;
if ( GdcmFile != 0)
- dcmFile = gdcm::FileHelper::New(GdcmFile);
+ dcmFile = GDCM_NAME_SPACE::FileHelper::New(GdcmFile);
else
- dcmFile = gdcm::FileHelper::New();
+ dcmFile = GDCM_NAME_SPACE::FileHelper::New();
// From here, the write of the file begins
dcmFile->SetWriteTypeToDcmExplVR();
}
- dcmFile->SetContentType((gdcm::ImageContentType)ContentType);
+ dcmFile->SetContentType((GDCM_NAME_SPACE::ImageContentType)ContentType);
if(!dcmFile->Write(fileName))
{