ITK  4.10.0
Insight Segmentation and Registration Toolkit
itkPhilipsRECImageIO.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
34 #ifndef itkPhilipsRECImageIO_h
35 #define itkPhilipsRECImageIO_h
36 #include "ITKIOPhilipsRECExport.h"
37 
38 
39 #include "itkImageIOBase.h"
40 #include "itkVectorContainer.h"
41 #include "vnl/vnl_vector_fixed.h"
42 
43 namespace itk
44 {
54 class ITKIOPhilipsREC_EXPORT PhilipsRECImageIO:public ImageIOBase
55 {
56 public:
61 
63  itkNewMacro(Self);
64 
66  itkTypeMacro(PhilipsRECImageIO, Superclass);
67 
72  typedef vnl_vector_fixed< int, 2 > ScanResolutionType;
73  typedef vnl_vector_fixed< float, 3 > FOVType;
74  typedef vnl_vector_fixed< double, 3 > AngulationMidSliceType;
75  typedef vnl_vector_fixed< double, 3 > OffCentreMidSliceType;
76  typedef vnl_vector_fixed< float, 3 > PhaseEncodingVelocityType;
77 
84  typedef vnl_vector_fixed< int, 8 > ImageTypesType;
85  typedef vnl_vector_fixed< int, 8 > ScanningSequencesType;
87  typedef std::vector< IndexValueType > SliceIndexType;
88  typedef vnl_vector_fixed< double, 3 > ImageTypeRescaleValuesType;
89 
93  typedef VectorContainer< unsigned int,
95  typedef double GradientBvalueType;
97  typedef vnl_vector_fixed< double, 3 > GradientDirectionType;
100 
101  /*-------- This part of the interfaces deals with reading data. ----- */
102 
108  virtual bool CanReadFile(const char *FileNameToRead) ITK_OVERRIDE;
109 
111  virtual void ReadImageInformation() ITK_OVERRIDE;
112 
114  virtual void Read(void *buffer) ITK_OVERRIDE;
115 
116  /*-------- This part of the interfaces deals with writing data. ----- */
117 
124  virtual bool CanWriteFile( const char *itkNotUsed(FileNameToWrite) ) ITK_OVERRIDE
125  {
126  return false;
127  }
128 
130  virtual void WriteImageInformation() ITK_OVERRIDE
131  {
132  return;
133  }
134 
137  virtual void Write( const void *itkNotUsed(buffer) ) ITK_OVERRIDE
138  {
139  return;
140  }
141 
142 protected:
145  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
146 
147 private:
148 
149  PhilipsRECImageIO(const Self &) ITK_DELETE_FUNCTION;
150  void operator=(const Self &) ITK_DELETE_FUNCTION;
151 
152  void SwapBytesIfNecessary(void *buffer, SizeValueType numberOfPixels);
153 
154  IndexValueType GetSliceIndex(IndexValueType index) const;
155 
156  SliceIndexType * m_SliceIndex;
158 };
159 } // end namespace itk
160 
161 #endif // itkPhilipsRECImageIO_h
virtual void WriteImageInformation() override
SmartPointer< Self > Pointer
Superclass::IndexValueType IndexValueType
vnl_vector_fixed< int, 8 > ImageTypesType
vnl_vector_fixed< double, 3 > GradientDirectionType
VectorContainer< unsigned int, double > TriggerTimesContainerType
VectorContainer< unsigned int, GradientBvalueType > GradientBvalueContainerType
Abstract superclass defines image IO interface.
VectorContainer< unsigned int, GradientDirectionType > GradientDirectionContainerType
vnl_vector_fixed< double, 3 > AngulationMidSliceType
signed long IndexValueType
Definition: itkIntTypes.h:150
virtual void Write(const void *) override
VectorContainer< unsigned int, double > RepetitionTimesContainerType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes...
Definition: itkArray.h:30
vnl_vector_fixed< int, 2 > ScanResolutionType
VectorContainer< unsigned int, ImageTypeRescaleValuesContainerTypePtr > ScanningSequenceImageTypeRescaleValuesContainerType
vnl_vector_fixed< float, 3 > FOVType
vnl_vector_fixed< int, 8 > ScanningSequencesType
::itk::SizeValueType SizeValueType
ImageIOBase::ByteOrder m_MachineByteOrder
vnl_vector_fixed< double, 3 > ImageTypeRescaleValuesType
vnl_vector_fixed< float, 3 > PhaseEncodingVelocityType
VectorContainer< unsigned int, double > EchoTimesContainerType
VectorContainer< unsigned int, int > LabelTypesASLContainerType
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
VectorContainer< unsigned int, ImageTypeRescaleValuesType > ImageTypeRescaleValuesContainerType
std::vector< IndexValueType > SliceIndexType
ImageTypeRescaleValuesContainerType::Pointer ImageTypeRescaleValuesContainerTypePtr
Reads Philips REC/PAR image files.
vnl_vector_fixed< double, 3 > OffCentreMidSliceType