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://oncora1.lyon.fnclcc.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 CLITKHNDIMAGEIO_H
19 #define CLITKHNDIMAGEIO_H
22 #include "itkImageIOBase.h"
24 #if defined (_MSC_VER) && (_MSC_VER < 1600)
25 #include "msinttypes/stdint.h"
32 //====================================================================
33 // Class for reading Hnd Image file format
34 class HndImageIO: public itk::ImageIOBase
37 /** Standard class typedefs. */
38 typedef HndImageIO Self;
39 typedef itk::ImageIOBase Superclass;
40 typedef itk::SmartPointer<Self> Pointer;
41 typedef signed short int PixelType;
43 typedef struct hnd_header {
46 char sChecksumSpec[4];
48 char sCreationDate[8];
49 char sCreationTime[8];
62 uint32_t nPixelOffset;
82 double dPatientSupportAngle;
83 double dTableTopEccentricAngle;
87 double dIDUResolutionX;
88 double dIDUResolutionY;
89 double dImageResolutionX;
90 double dImageResolutionY;
95 double dMetersetExposure;
96 double dAcqAdjustment;
97 double dCTProjectionAngle;
98 double dCTNormChamber;
99 double dGatingTimeTag;
100 double dGating4DInfoX;
101 double dGating4DInfoY;
102 double dGating4DInfoZ;
103 double dGating4DInfoTime;
106 HndImageIO():Superclass() {;}
108 /** Method for creation through the object factory. */
111 /** Run-time type information (and related methods). */
112 itkTypeMacro(HndImageIO, ImageIOBase);
114 /*-------- This part of the interface deals with reading data. ------ */
115 virtual void ReadImageInformation();
116 virtual bool CanReadFile( const char* FileNameToRead );
117 virtual void Read(void * buffer);
119 /*-------- This part of the interfaces deals with writing data. ----- */
120 virtual void WriteImageInformation(bool keepOfStream) { ; }
121 virtual void WriteImageInformation() { WriteImageInformation(false); }
122 virtual bool CanWriteFile(const char* filename);
123 virtual void Write(const void* buffer);
128 }; // end class HndImageIO
131 // explicit template instantiation
132 //template class itk::CreateObjectFunction<clitk::HndImageIO>;
134 #endif /* end #define CLITKHNDIMAGEIO_H */