1 /*=========================================================================
2 Program: vv http://www.creatis.insa-lyon.fr/rio/vv
5 - University of LYON http://www.universite-lyon.fr/
6 - Léon Bérard cancer center http://www.centreleonberard.fr
7 - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the copyright notices for more information.
13 It is distributed under dual licence
15 - BSD See included LICENSE.txt file
16 - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ===========================================================================**/
18 #ifndef clitkDicomRTDoseIO_h
19 #define clitkDicomRTDoseIO_h
22 #include "clitkCommon.h"
25 #include <itkImageIOBase.h>
27 #if GDCM_MAJOR_VERSION == 2
28 #include <gdcmImageReader.h>
37 //====================================================================
38 // Class for reading Vox Image file format
39 class DicomRTDoseIO: public itk::ImageIOBase
42 /** Standard class typedefs. */
43 typedef DicomRTDoseIO Self;
44 typedef itk::ImageIOBase Superclass;
45 typedef itk::SmartPointer<Self> Pointer;
46 typedef signed short int PixelType;
48 DicomRTDoseIO():Superclass() {
49 mustWriteHeader = false;
50 #if GDCM_MAJOR_VERSION < 2
55 /** Method for creation through the object factory. */
58 /** Run-time type information (and related methods). */
59 itkTypeMacro(DicomRTDoseIO, ImageIOBase);
61 /*-------- This part of the interface deals with reading data. ------ */
62 virtual void ReadImageInformation();
63 virtual bool CanReadFile( const char* FileNameToRead );
64 virtual void Read(void * buffer);
66 /*-------- This part of the interfaces deals with writing data. ----- */
67 virtual void WriteImageInformation(bool keepOfStream);
68 virtual void WriteImageInformation() {
69 WriteImageInformation(false);
71 virtual bool CanWriteFile(const char* filename);
72 virtual void Write(const void* buffer);
75 template <class T> void dose_copy_raw (float *img_out, T *img_in, int nvox, float scale);
80 #if GDCM_MAJOR_VERSION == 2
81 gdcm::ImageReader m_GdcmImageReader;
83 gdcm::File *m_GdcmFile;
86 }; // end class DicomRTDoseIO
90 #endif /* end #define clitkDicomRTDoseIO_h */