X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vtk%2FvtkGdcmWriter.h;h=3de9c069d8ad371a6be3e1bb1004ab7f1cac8434;hb=1d1824283002d1fcc3b8ff98170fc879c17f108f;hp=ff255b2b079fdfa36ff0b3004a3392f6e8b6184e;hpb=51e53b78f995e2dde4f75570a8bf3b0dac5209c2;p=gdcm.git diff --git a/vtk/vtkGdcmWriter.h b/vtk/vtkGdcmWriter.h index ff255b2b..3de9c069 100644 --- a/vtk/vtkGdcmWriter.h +++ b/vtk/vtkGdcmWriter.h @@ -1,5 +1,21 @@ -// vtkGdcmWriter.h -//----------------------------------------------------------------------------- +/*========================================================================= + + Program: gdcm + Module: $RCSfile: vtkGdcmWriter.h,v $ + Language: C++ + Date: $Date: 2005/01/28 10:07:35 $ + Version: $Revision: 1.5 $ + + Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de + l'Image). All rights reserved. See Doc/License.txt or + http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + #ifndef __vtkGdcmWriter_h #define __vtkGdcmWriter_h @@ -7,9 +23,14 @@ #include #include -#include #include +//----------------------------------------------------------------------------- +#define VTK_GDCM_WRITE_TYPE_EXPLICIT_VR 1 +#define VTK_GDCM_WRITE_TYPE_IMPLICIT_VR 2 +#define VTK_GDCM_WRITE_TYPE_ACR 3 +#define VTK_GDCM_WRITE_TYPE_ACR_LIBIDO 4 + //----------------------------------------------------------------------------- class VTK_EXPORT vtkGdcmWriter : public vtkImageWriter { @@ -22,18 +43,42 @@ public: vtkSetObjectMacro(LookupTable,vtkLookupTable); vtkGetObjectMacro(LookupTable,vtkLookupTable); + void SetWriteTypeToDcmImplVR() { SetWriteType(VTK_GDCM_WRITE_TYPE_EXPLICIT_VR); }; + void SetWriteTypeToDcmExplVR() { SetWriteType(VTK_GDCM_WRITE_TYPE_IMPLICIT_VR); }; + void SetWriteTypeToAcr() { SetWriteType(VTK_GDCM_WRITE_TYPE_ACR); }; + void SetWriteTypeToAcrLibido() { SetWriteType(VTK_GDCM_WRITE_TYPE_ACR_LIBIDO); }; + vtkSetMacro(WriteType,int); + vtkGetMacro(WriteType,int); + const char *GetWriteTypeAsString(); + + void SetUIDPrefix(const char *prefix); + const char *GetUIDPrefix(); + + void NewStudyInstanceUID(); + void NewSeriesInstanceUID(); + void NewFrameOfReferenceInstanceUID(); + protected: vtkGdcmWriter(); ~vtkGdcmWriter(); virtual void RecursiveWrite(int axis, vtkImageData *image, ofstream *file); - void WriteFile(char *fileName,vtkImageData *image); + virtual void RecursiveWrite(int axis, vtkImageData *image, + vtkImageData *cache, ofstream *file); + void WriteDcmFile(char *fileName,vtkImageData *image); private: // Variables vtkLookupTable *LookupTable; + int WriteType; + + //BTX + std::string UIDPrefix; + std::string StudyInstanceUID; + std::string SeriesInstanceUID; + std::string FrameOfReferenceInstanceUID; + //ETX }; //----------------------------------------------------------------------------- #endif -