X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vtk%2FvtkGdcmWriter.h;h=3de9c069d8ad371a6be3e1bb1004ab7f1cac8434;hb=da317a4e58595a638ab541c74fa8e5e8608819d3;hp=592daec1cef3ac359b4676bf063f30e4e24ac7f0;hpb=2ca09ddbc04e1ec02aa49e8815925cceb49b2402;p=gdcm.git diff --git a/vtk/vtkGdcmWriter.h b/vtk/vtkGdcmWriter.h index 592daec1..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,17 +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 dim, vtkImageData *region, ofstream *file); + virtual void RecursiveWrite(int axis, vtkImageData *image, ofstream *file); + 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 -