X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vtk%2FvtkGdcmWriter.cxx;h=1652c3c6c28801edd1f0f2f16f56d2fd5b29713c;hb=d428d2c2b6ab7306c8bc0aba86b25cc345ba0fab;hp=822a7132d05fa3c4fe65e95bbff592d4770e4a21;hpb=3d5f18344f54d20b3a66cce87727c7970bfdded4;p=gdcm.git diff --git a/vtk/vtkGdcmWriter.cxx b/vtk/vtkGdcmWriter.cxx index 822a7132..1652c3c6 100644 --- a/vtk/vtkGdcmWriter.cxx +++ b/vtk/vtkGdcmWriter.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: vtkGdcmWriter.cxx,v $ Language: C++ - Date: $Date: 2005/01/24 16:51:01 $ - Version: $Revision: 1.14 $ + Date: $Date: 2005/01/25 15:44:25 $ + Version: $Revision: 1.15 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -26,7 +26,7 @@ #include #include -vtkCxxRevisionMacro(vtkGdcmWriter, "$Revision: 1.14 $"); +vtkCxxRevisionMacro(vtkGdcmWriter, "$Revision: 1.15 $"); vtkStandardNewMacro(vtkGdcmWriter); //----------------------------------------------------------------------------- @@ -132,29 +132,29 @@ void SetImageInformation(gdcm::FileHelper *file,vtkImageData *image) str.str(""); str << dim[0]; - file->Insert(str.str(),0x0028,0x0011); // Columns + file->InsertValEntry(str.str(),0x0028,0x0011); // Columns str.str(""); str << dim[1]; - file->Insert(str.str(),0x0028,0x0010); // Rows + file->InsertValEntry(str.str(),0x0028,0x0010); // Rows if(dim[2]>1) { str.str(""); str << dim[2]; //file->Insert(str.str(),0x0028,0x0012); // Planes - file->Insert(str.str(),0x0028,0x0008); // Number of Frames + file->InsertValEntry(str.str(),0x0028,0x0008); // Number of Frames } // Pixel type str.str(""); str << image->GetScalarSize()*8; - file->Insert(str.str(),0x0028,0x0100); // Bits Allocated - file->Insert(str.str(),0x0028,0x0101); // Bits Stored + file->InsertValEntry(str.str(),0x0028,0x0100); // Bits Allocated + file->InsertValEntry(str.str(),0x0028,0x0101); // Bits Stored str.str(""); str << image->GetScalarSize()*8-1; - file->Insert(str.str(),0x0028,0x0102); // High Bit + file->InsertValEntry(str.str(),0x0028,0x0102); // High Bit // Pixel Repr // FIXME : what do we do when the ScalarType is @@ -171,39 +171,39 @@ void SetImageInformation(gdcm::FileHelper *file,vtkImageData *image) { str << "1"; // Signed } - file->Insert(str.str(),0x0028,0x0103); // Pixel Representation + file->InsertValEntry(str.str(),0x0028,0x0103); // Pixel Representation // Samples per pixel str.str(""); str << image->GetNumberOfScalarComponents(); - file->Insert(str.str(),0x0028,0x0002); // Samples per Pixel + file->InsertValEntry(str.str(),0x0028,0x0002); // Samples per Pixel // Spacing double *sp = image->GetSpacing(); str.str(""); str << sp[0] << "\\" << sp[1]; - file->Insert(str.str(),0x0028,0x0030); // Pixel Spacing + file->InsertValEntry(str.str(),0x0028,0x0030); // Pixel Spacing str.str(""); str << sp[2]; - file->Insert(str.str(),0x0018,0x0088); // Spacing Between Slices + file->InsertValEntry(str.str(),0x0018,0x0088); // Spacing Between Slices // Origin double *org = image->GetOrigin(); str.str(""); str << org[0] << "\\" << org[1] << "\\" << org[2]; - file->Insert(str.str(),0x0020,0x0032); // Image Position Patient + file->InsertValEntry(str.str(),0x0020,0x0032); // Image Position Patient // Window / Level double *rng=image->GetScalarRange(); str.str(""); str << rng[1]-rng[0]; - file->Insert(str.str(),0x0028,0x1051); // Window Width + file->InsertValEntry(str.str(),0x0028,0x1051); // Window Width str.str(""); str << (rng[1]+rng[0])/2.0; - file->Insert(str.str(),0x0028,0x1050); // Window Center + file->InsertValEntry(str.str(),0x0028,0x1050); // Window Center // Pixels unsigned char *data;