X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vtk%2FvtkGdcmWriter.h;h=548f8195fdc9a187a6d804332a6ace8baaf6d28b;hb=ab1bb059f09bb3525584be968c316fe8060383fb;hp=592daec1cef3ac359b4676bf063f30e4e24ac7f0;hpb=2ca09ddbc04e1ec02aa49e8815925cceb49b2402;p=gdcm.git diff --git a/vtk/vtkGdcmWriter.h b/vtk/vtkGdcmWriter.h index 592daec1..548f8195 100644 --- a/vtk/vtkGdcmWriter.h +++ b/vtk/vtkGdcmWriter.h @@ -1,15 +1,43 @@ -// vtkGdcmWriter.h -//----------------------------------------------------------------------------- +/*========================================================================= + + Program: gdcm + Module: $RCSfile: vtkGdcmWriter.h,v $ + Language: C++ + Date: $Date: 2006/03/17 14:46:18 $ + Version: $Revision: 1.7 $ + + 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 #include "gdcmCommon.h" // To avoid warnings concerning the std +#include "gdcmFile.h" // for gdcm::File #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 + +#define VTK_GDCM_WRITE_TYPE_USER_OWN_IMAGE 1 +#define VTK_GDCM_WRITE_TYPE_FILTERED_IMAGE 2 +#define VTK_GDCM_WRITE_TYPE_CREATED_IMAGE 3 +#define VTK_GDCM_WRITE_TYPE_UNMODIFIED_PIXELS_IMAGE 4 + //----------------------------------------------------------------------------- class VTK_EXPORT vtkGdcmWriter : public vtkImageWriter { @@ -17,22 +45,53 @@ public: static vtkGdcmWriter *New(); vtkTypeRevisionMacro(vtkGdcmWriter, vtkImageWriter); - void PrintSelf(ostream& os, vtkIndent indent); + void PrintSelf(ostream &os, vtkIndent indent); - vtkSetObjectMacro(LookupTable,vtkLookupTable); - vtkGetObjectMacro(LookupTable,vtkLookupTable); + 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); }; + + void SetContentTypeToUserOwnImage() {SetContentType(VTK_GDCM_WRITE_TYPE_USER_OWN_IMAGE);}; + void SetContentTypeToFilteredImage() {SetContentType(VTK_GDCM_WRITE_TYPE_FILTERED_IMAGE);}; + void SetContentTypeToUserCreatedImage() {SetContentType(VTK_GDCM_WRITE_TYPE_CREATED_IMAGE);}; + void SetContentTypeToUnmodifiedPixelsImage(){SetContentType(VTK_GDCM_WRITE_TYPE_UNMODIFIED_PIXELS_IMAGE);}; + + vtkSetMacro(WriteType, int); + vtkGetMacro(WriteType, int); + const char *GetWriteTypeAsString(); + +//BTX + vtkSetMacro(GdcmFile, gdcm::File *); + vtkGetMacro(GdcmFile, gdcm::File *); +//ETX + + vtkSetMacro(ContentType, int); + vtkGetMacro(ContentType, int); + + 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 + gdcm::File *GdcmFile; +//ETX + int ContentType; + }; //----------------------------------------------------------------------------- #endif -