]> Creatis software - gdcm.git/blobdiff - vtk/vtkGdcmWriter.h
ENH: Adding two different viewer. One using vtkImageViewer and the other vtkImageView...
[gdcm.git] / vtk / vtkGdcmWriter.h
index ff255b2b079fdfa36ff0b3004a3392f6e8b6184e..3de9c069d8ad371a6be3e1bb1004ab7f1cac8434 100644 (file)
@@ -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 <vtkImageWriter.h>
 #include <vtkLookupTable.h>
-#include <list>
 #include <string>
 
+//-----------------------------------------------------------------------------
+#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
-