NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
itkDRCAnalyzeImageIO.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  NifTK: A software platform for medical image computing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #ifndef itkDRCAnalyzeImageIO_h
16 #define itkDRCAnalyzeImageIO_h
17 
18 #include <NifTKConfigure.h>
20 
22 
23 namespace itk {
24 
32 
33 public:
34 
38  typedef SmartPointer<Self> Pointer;
39 
41  itkNewMacro( Self);
42 
44  itkTypeMacro(DRCAnalyzeImageIO, Superclass);
45 
47  bool GetDRCMode() const { return m_DRCMode; }
48 
50  void SetDRCMode(bool b) { m_DRCMode = b; }
51 
53  virtual void ReadImageInformation() override;
54 
55 protected:
56 
59 
60  void PrintSelf(std::ostream& os, Indent indent) const override;
61 
63  ImageIOBase::ByteOrder CheckAnalyzeEndian(const struct dsr &temphdr);
64 
66  void SwapHeaderBytesIfNecessary( ImageIOBase::ByteOrder& byteOrder, struct dsr * const imageheader );
67 
68  typedef enum
69  {
70  ITK_DRC_ANALYZE_ORIENTATION_RAI_AXIAL = 0,
71  ITK_DRC_ANALYZE_ORIENTATION_RSP_CORONAL = 1,
72  ITK_DRC_ANALYZE_ORIENTATION_ASL_SAGITTAL = 2,
73  ITK_DRC_ANALYZE_ORIENTATION_RPI_AXIAL_FLIPPED = 3,
74  ITK_DRC_ANALYZE_ORIENTATION_RIP_CORONAL_FLIPPED = 4,
75  ITK_DRC_ANALYZE_ORIENTATION_AIL_SAGITTAL_FLIPPED = 5
76  } ValidDRCAnalyzeOrientationFlags;
77 
78 private:
79 
80  DRCAnalyzeImageIO(const Self&); //purposely not implemented
81  void operator=(const Self&); //purposely not implemented
82 
84  bool m_DRCMode;
85 
86 };
87 
88 } // end namespace itk
89 
90 #endif
AnalyzeImageIO3160 Superclass
Definition: itkDRCAnalyzeImageIO.h:37
Subclass of AnalyzeImageIO3160, to read Dementia Research Centre (DRC) Analyze format, which is incorrectly flipped. If you call this->SetDRCMode(true) (also default), it will do DRC specific functionality, and if you call SetDRCMode(false), it will revert to standard ITK functionality.
Definition: itkDRCAnalyzeImageIO.h:31
Definition: niftkITKAffineResampleImage.cxx:74
bool GetDRCMode() const
Definition: itkDRCAnalyzeImageIO.h:47
SmartPointer< Self > Pointer
Definition: itkDRCAnalyzeImageIO.h:38
GLdouble GLdouble GLdouble b
Definition: glew.h:7885
Definition: itkAnalyzeDbh_p.h:384
#define NIFTKITKIO_WINEXPORT
Definition: niftkITKIOWin32ExportHeader.h:28
DRCAnalyzeImageIO Self
Definition: itkDRCAnalyzeImageIO.h:36
Class that defines how to read Analyze file format. Analyze IMAGE FILE FORMAT - As much information a...
Definition: itkAnalyzeImageIO3160_p.h:102
void SetDRCMode(bool b)
Definition: itkDRCAnalyzeImageIO.h:50