19 #ifndef itkNiftiImageIO_h
20 #define itkNiftiImageIO_h
21 #include "ITKIONIFTIExport.h"
82 #if !defined(ITK_LEGACY_REMOVE)
87 extern ITKIONIFTI_EXPORT std::ostream &
89 extern ITKIONIFTI_EXPORT std::ostream &
124 #if !defined(ITK_LEGACY_REMOVE)
142 DetermineFileType(
const char * FileNameToRead);
151 CanReadFile(
const char * FileNameToRead)
override;
155 ReadImageInformation()
override;
159 Read(
void * buffer)
override;
169 CanWriteFile(
const char * FileNameToWrite)
override;
177 WriteImageInformation()
override;
182 Write(
const void * buffer)
override;
187 GenerateStreamableReadRegionFromRequestedRegion(
const ImageIORegion & requestedRegion)
const override;
190 itkSetMacro(RescaleSlope,
double);
191 itkSetMacro(RescaleIntercept,
double);
210 itkSetMacro(ConvertRASVectors,
bool);
211 itkGetConstMacro(ConvertRASVectors,
bool);
212 itkBooleanMacro(ConvertRASVectors);
230 itkSetMacro(ConvertRASDisplacementVectors,
bool);
231 itkGetConstMacro(ConvertRASDisplacementVectors,
bool);
232 itkBooleanMacro(ConvertRASDisplacementVectors);
236 itkSetMacro(SFORM_Permissive,
bool);
237 itkGetConstMacro(SFORM_Permissive,
bool);
238 itkBooleanMacro(SFORM_Permissive);
245 PrintSelf(std::ostream & os,
Indent indent)
const override;
259 getSFormCodeFromDictionary()
const;
261 getQFormCodeFromDictionary()
const;
267 DefineHeaderObjectDataType();
270 SetNIfTIOrientationFromImageIO(
unsigned short origdims,
unsigned short dims);
273 SetImageIOOrientationFromNIfTI(
unsigned short dims,
double spacingscale,
double timingscale);
276 SetImageIOMetadataFromNIfTI();
280 class NiftiImageProxy;
288 double m_RescaleSlope{ 1.0 };
289 double m_RescaleIntercept{ 0.0 };
291 bool m_ConvertRAS{
false };
292 bool m_ConvertRASVectors{
false };
293 bool m_ConvertRASDisplacementVectors{
true };
300 bool m_SFORM_Corrected{
false };
306 #endif // itkNiftiImageIO_h