VTK
|
Store NIfTI header information. More...
#include <vtkNIFTIImageHeader.h>
Public Member Functions | |
virtual int | IsA (const char *type) |
Return 1 if this class is the same type of (or a subclass of) the named class. More... | |
vtkNIFTIImageHeader * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) override |
Print information about this object. More... | |
const char * | GetMagic () |
Get the magic number for the NIFTI file as a null-terminated string. More... | |
vtkTypeInt64 | GetVoxOffset () |
Get the offset to the pixel data within the file. More... | |
int | GetDataType () |
Get the data type. More... | |
int | GetBitPix () |
Get the number of bits per pixel. More... | |
vtkTypeInt64 | GetDim (int i) |
Get the nth dimension of the data, where GetDim(0) returns the number of dimensions that are defined for the file. More... | |
double | GetPixDim (int i) |
Get the sample spacing in the nth dimension. More... | |
virtual void | SetIntentCode (int) |
Get the NIFTI intent code. More... | |
int | GetIntentCode () |
void | SetIntentName (const char *name) |
Get the intent name. More... | |
const char * | GetIntentName () |
virtual void | SetIntentP1 (double) |
Get one of the NIFTI intent parameters. More... | |
double | GetIntentP1 () |
virtual void | SetIntentP2 (double) |
double | GetIntentP2 () |
virtual void | SetIntentP3 (double) |
double | GetIntentP3 () |
virtual void | SetSclSlope (double) |
Get the scale and slope to apply to the data in order to get the real-valued data values. More... | |
double | GetSclSlope () |
virtual void | SetSclInter (double) |
double | GetSclInter () |
virtual void | SetCalMin (double) |
Get the calibrated range of the data, i.e. More... | |
double | GetCalMin () |
virtual void | SetCalMax (double) |
double | GetCalMax () |
virtual void | SetSliceDuration (double) |
Get the slice_duration and toffset from the header. More... | |
double | GetSliceDuration () |
virtual void | SetTOffset (double) |
double | GetTOffset () |
virtual void | SetSliceStart (vtkTypeInt64) |
Get the slice range for the data. More... | |
vtkTypeInt64 | GetSliceStart () |
virtual void | SetSliceEnd (vtkTypeInt64) |
vtkTypeInt64 | GetSliceEnd () |
virtual void | SetSliceCode (int) |
Get the slice code for the data. More... | |
int | GetSliceCode () |
virtual void | SetXYZTUnits (int) |
Get a bitfield that describes the units for the first 4 dims. More... | |
int | GetXYZTUnits () |
virtual void | SetDimInfo (int) |
Get a bitfield with extra information about the dimensions, it states which dimensions are the phase encode, frequency encode, and slice encode dimensions for MRI acquisitions. More... | |
int | GetDimInfo () |
void | SetDescrip (const char *descrip) |
Get a null-terminated file descriptor, this usually gives the name of the software that wrote the file. More... | |
const char * | GetDescrip () |
void | SetAuxFile (const char *auxfile) |
Get an auxiliary file, e.g. More... | |
const char * | GetAuxFile () |
virtual void | SetQFormCode (int) |
Get the QForm or SForm code. More... | |
int | GetQFormCode () |
virtual void | SetSFormCode (int) |
int | GetSFormCode () |
virtual void | SetQuaternB (double) |
Get information about the quaternion transformation. More... | |
double | GetQuaternB () |
virtual void | SetQuaternC (double) |
double | GetQuaternC () |
virtual void | SetQuaternD (double) |
double | GetQuaternD () |
virtual void | SetQOffsetX (double) |
double | GetQOffsetX () |
virtual void | SetQOffsetY (double) |
double | GetQOffsetY () |
virtual void | SetQOffsetZ (double) |
double | GetQOffsetZ () |
virtual void | SetSRowX (double, double, double, double) |
Get information about the matrix transformation. More... | |
virtual void | SetSRowX (double[4]) |
virtual double * | GetSRowX () |
virtual void | GetSRowX (double &, double &, double &, double &) |
virtual void | GetSRowX (double[4]) |
virtual void | SetSRowY (double, double, double, double) |
virtual void | SetSRowY (double[4]) |
virtual double * | GetSRowY () |
virtual void | GetSRowY (double &, double &, double &, double &) |
virtual void | GetSRowY (double[4]) |
virtual void | SetSRowZ (double, double, double, double) |
virtual void | SetSRowZ (double[4]) |
virtual double * | GetSRowZ () |
virtual void | GetSRowZ (double &, double &, double &, double &) |
virtual void | GetSRowZ (double[4]) |
void | Initialize () |
Initialize the header to default values. More... | |
void | DeepCopy (vtkNIFTIImageHeader *o) |
Make a copy of the header. More... | |
void | SetHeader (const nifti_1_header *hdr) |
Set the values from an existing nifti struct, or store the values in an existing nifti struct. More... | |
void | GetHeader (nifti_1_header *hdr) |
void | SetHeader (const nifti_2_header *hdr) |
void | GetHeader (nifti_2_header *hdr) |
![]() | |
vtkBaseTypeMacro (vtkObject, vtkObjectBase) | |
virtual void | DebugOn () |
Turn debugging output on. More... | |
virtual void | DebugOff () |
Turn debugging output off. More... | |
bool | GetDebug () |
Get the value of the debug flag. More... | |
void | SetDebug (bool debugFlag) |
Set the value of the debug flag. More... | |
virtual void | Modified () |
Update the modification time for this object. More... | |
virtual vtkMTimeType | GetMTime () |
Return this object's modified time. More... | |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More... | |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
vtkCommand * | GetCommand (unsigned long tag) |
void | RemoveObserver (vtkCommand *) |
void | RemoveObservers (unsigned long event, vtkCommand *) |
void | RemoveObservers (const char *event, vtkCommand *) |
int | HasObserver (unsigned long event, vtkCommand *) |
int | HasObserver (const char *event, vtkCommand *) |
void | RemoveObserver (unsigned long tag) |
void | RemoveObservers (unsigned long event) |
void | RemoveObservers (const char *event) |
void | RemoveAllObservers () |
int | HasObserver (unsigned long event) |
int | HasObserver (const char *event) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
Overloads to AddObserver that allow developers to add class member functions as callbacks for events. More... | |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
Allow user to set the AbortFlagOn() with the return value of the callback method. More... | |
int | InvokeEvent (unsigned long event, void *callData) |
This method invokes an event and return whether the event was aborted or not. More... | |
int | InvokeEvent (const char *event, void *callData) |
int | InvokeEvent (unsigned long event) |
int | InvokeEvent (const char *event) |
![]() | |
const char * | GetClassName () const |
Return the class name as a string. More... | |
virtual void | Delete () |
Delete a VTK object. More... | |
virtual void | FastDelete () |
Delete a reference to this object. More... | |
void | InitializeObjectBase () |
void | Print (ostream &os) |
Print an object to an ostream. More... | |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
virtual void | Register (vtkObjectBase *o) |
Increase the reference count (mark as used by another object). More... | |
virtual void | UnRegister (vtkObjectBase *o) |
Decrease the reference count (release by another object). More... | |
int | GetReferenceCount () |
Return the current reference count of this object. More... | |
void | SetReferenceCount (int) |
Sets the reference count. More... | |
void | PrintRevisions (ostream &) |
Legacy. More... | |
Static Public Member Functions | |
static vtkNIFTIImageHeader * | New () |
Static method for construction. More... | |
static int | IsTypeOf (const char *type) |
static vtkNIFTIImageHeader * | SafeDownCast (vtkObjectBase *o) |
![]() | |
static vtkObject * | New () |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More... | |
static void | BreakOnError () |
This method is called when vtkErrorMacro executes. More... | |
static void | SetGlobalWarningDisplay (int val) |
This is a global flag that controls whether any debug, warning or error messages are displayed. More... | |
static void | GlobalWarningDisplayOn () |
static void | GlobalWarningDisplayOff () |
static int | GetGlobalWarningDisplay () |
![]() | |
static vtkTypeBool | IsTypeOf (const char *name) |
Return 1 if this class type is the same type of (or a subclass of) the named class. More... | |
static vtkObjectBase * | New () |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More... | |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkNIFTIImageHeader () | |
~vtkNIFTIImageHeader () override | |
void | SetStringValue (char *x, const char *y, size_t n) |
![]() | |
vtkObject () | |
~vtkObject () override | |
void | RegisterInternal (vtkObjectBase *, vtkTypeBool check) override |
void | UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) override |
void | InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=nullptr) |
These methods allow a command to exclusively grab all events. More... | |
void | InternalReleaseFocus () |
![]() | |
vtkObjectBase () | |
virtual | ~vtkObjectBase () |
virtual void | CollectRevisions (ostream &) |
virtual void | ReportReferences (vtkGarbageCollector *) |
vtkObjectBase (const vtkObjectBase &) | |
void | operator= (const vtkObjectBase &) |
Protected Attributes | |
char | Magic [12] |
vtkTypeInt64 | VoxOffset |
int | DataType |
int | BitPix |
vtkTypeInt64 | Dim [8] |
double | PixDim [8] |
int | IntentCode |
char | IntentName [18] |
double | IntentP1 |
double | IntentP2 |
double | IntentP3 |
double | SclSlope |
double | SclInter |
double | CalMin |
double | CalMax |
double | SliceDuration |
double | TOffset |
vtkTypeInt64 | SliceStart |
vtkTypeInt64 | SliceEnd |
int | SliceCode |
int | XYZTUnits |
int | DimInfo |
char | Descrip [82] |
char | AuxFile [26] |
int | QFormCode |
int | SFormCode |
double | QuaternB |
double | QuaternC |
double | QuaternD |
double | QOffsetX |
double | QOffsetY |
double | QOffsetZ |
double | SRowX [4] |
double | SRowY [4] |
double | SRowZ [4] |
![]() | |
bool | Debug |
vtkTimeStamp | MTime |
vtkSubjectHelper * | SubjectHelper |
![]() | |
vtkAtomicInt32 | ReferenceCount |
vtkWeakPointerBase ** | WeakPointers |
Store NIfTI header information.
This class stores the header of a NIfTI file in a VTK-friendly format. By using this class, it is possible to specify the header information that will be stored in a file written by the vtkNIFTIImageWriter. Note that the SForm and QForm orientation information in this class will be ignored by the writer if an SForm and QForm have been explicitly set via the writer's SetSForm and SetQForm methods. Also note that all info like Dim, PixDim, DataType, etc. will be ignored by the writer because this information must instead be taken from the vtkImageData information. Finally, note that the vtkNIFTIImageWriter will ignore the Descrip field, since it has its own SetDescription method.
Definition at line 46 of file vtkNIFTIImageHeader.h.
Definition at line 176 of file vtkNIFTIImageHeader.h.
NIFTI intent codes.
Definition at line 53 of file vtkNIFTIImageHeader.h.
NIFTI transform codes.
Enumerator | |
---|---|
XFormUnkown | |
XFormScannerAnat | |
XFormAlignedAnat | |
XFormTalairach | |
XFormMNI152 |
Definition at line 99 of file vtkNIFTIImageHeader.h.
NIFTI slice codes.
Enumerator | |
---|---|
SliceUnknown | |
SliceSeqInc | |
SliceSeqDec | |
SliceAltInc | |
SliceAltDec | |
SliceAltInc2 | |
SliceAltDec2 |
Definition at line 110 of file vtkNIFTIImageHeader.h.
NIFTI unit codes.
Enumerator | |
---|---|
UnitsUnknown | |
UnitsMeter | |
UnitsMM | |
UnitsMicron | |
UnitsSpace | |
UnitsSec | |
UnitsMSec | |
UnitsUSec | |
UnitsHz | |
UnitsPPM | |
UnitsRads | |
UnitsTime |
Definition at line 123 of file vtkNIFTIImageHeader.h.
NIFTI data types.
Types RGB24 and RGB32 are represented in VTK as a multi-component unsigned char image. Complex values are represented as two-component images. The NIFTI types Float128 and Complex256 are not supported.
Enumerator | |
---|---|
TypeUInt8 | |
TypeInt16 | |
TypeInt32 | |
TypeFloat32 | |
TypeComplex64 | |
TypeFloat64 | |
TypeRGB24 | |
TypeInt8 | |
TypeUInt16 | |
TypeUInt32 | |
TypeInt64 | |
TypeUInt64 | |
TypeFloat128 | |
TypeComplex128 | |
TypeComplex256 | |
TypeRGBA32 |
Definition at line 144 of file vtkNIFTIImageHeader.h.
NIFTI header sizes.
Enumerator | |
---|---|
NIFTI1HeaderSize | |
NIFTI2HeaderSize |
Definition at line 166 of file vtkNIFTIImageHeader.h.
|
protected |
|
overrideprotected |
|
static |
Static method for construction.
|
static |
|
virtual |
Return 1 if this class is the same type of (or a subclass of) the named class.
Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkObjectBase.
|
static |
|
protectedvirtual |
vtkNIFTIImageHeader* vtkNIFTIImageHeader::NewInstance | ( | ) | const |
|
overridevirtual |
Print information about this object.
Reimplemented from vtkObject.
|
inline |
Get the magic number for the NIFTI file as a null-terminated string.
Definition at line 187 of file vtkNIFTIImageHeader.h.
|
inline |
Get the offset to the pixel data within the file.
Definition at line 192 of file vtkNIFTIImageHeader.h.
|
inline |
Get the data type.
Definition at line 197 of file vtkNIFTIImageHeader.h.
|
inline |
Get the number of bits per pixel.
Definition at line 202 of file vtkNIFTIImageHeader.h.
|
inline |
Get the nth dimension of the data, where GetDim(0) returns the number of dimensions that are defined for the file.
Definition at line 208 of file vtkNIFTIImageHeader.h.
Get the sample spacing in the nth dimension.
If GetPixDim(0) is negative, then the quaternion for the qform describes the correct orientation only after the slice ordering has been reversed.
Definition at line 216 of file vtkNIFTIImageHeader.h.
|
virtual |
Get the NIFTI intent code.
This is an enumerated value in the NIFTI header that states what the data is intended to be used for.
|
inline |
Definition at line 225 of file vtkNIFTIImageHeader.h.
void vtkNIFTIImageHeader::SetIntentName | ( | const char * | name | ) |
Get the intent name.
This should match the intent code.
|
inline |
Definition at line 232 of file vtkNIFTIImageHeader.h.
|
virtual |
Get one of the NIFTI intent parameters.
The definition of these parameters varies according to the IntentCode.
|
inline |
Definition at line 240 of file vtkNIFTIImageHeader.h.
|
virtual |
|
inline |
Definition at line 242 of file vtkNIFTIImageHeader.h.
|
virtual |
|
inline |
Definition at line 244 of file vtkNIFTIImageHeader.h.
|
virtual |
Get the scale and slope to apply to the data in order to get the real-valued data values.
|
inline |
Definition at line 253 of file vtkNIFTIImageHeader.h.
|
virtual |
|
inline |
Definition at line 255 of file vtkNIFTIImageHeader.h.
|
virtual |
Get the calibrated range of the data, i.e.
the values stored in the cal_min and cal_max fields in the header.
|
inline |
Definition at line 264 of file vtkNIFTIImageHeader.h.
|
virtual |
|
inline |
Definition at line 266 of file vtkNIFTIImageHeader.h.
|
virtual |
Get the slice_duration and toffset from the header.
|
inline |
Definition at line 274 of file vtkNIFTIImageHeader.h.
|
virtual |
|
inline |
Definition at line 276 of file vtkNIFTIImageHeader.h.
|
virtual |
Get the slice range for the data.
|
inline |
Definition at line 284 of file vtkNIFTIImageHeader.h.
|
virtual |
|
inline |
Definition at line 286 of file vtkNIFTIImageHeader.h.
|
virtual |
Get the slice code for the data.
|
inline |
Definition at line 294 of file vtkNIFTIImageHeader.h.
|
virtual |
Get a bitfield that describes the units for the first 4 dims.
|
inline |
Definition at line 302 of file vtkNIFTIImageHeader.h.
|
virtual |
Get a bitfield with extra information about the dimensions, it states which dimensions are the phase encode, frequency encode, and slice encode dimensions for MRI acquisitions.
|
inline |
Definition at line 312 of file vtkNIFTIImageHeader.h.
void vtkNIFTIImageHeader::SetDescrip | ( | const char * | descrip | ) |
Get a null-terminated file descriptor, this usually gives the name of the software that wrote the file.
It will have a maximum length of 80 characters. Use ASCII to ensure compatibility with all NIFTI software, the NIFTI standard itself does not specify what encodings are permitted.
|
inline |
Definition at line 323 of file vtkNIFTIImageHeader.h.
void vtkNIFTIImageHeader::SetAuxFile | ( | const char * | auxfile | ) |
Get an auxiliary file, e.g.
a color table, that is associated with this data. The length of the filename must be a maximum of 24 characters, and it will be assumed to be in the same directory as the NIFTI file.
|
inline |
Definition at line 332 of file vtkNIFTIImageHeader.h.
|
virtual |
Get the QForm or SForm code.
|
inline |
Definition at line 339 of file vtkNIFTIImageHeader.h.
|
virtual |
|
inline |
Definition at line 341 of file vtkNIFTIImageHeader.h.
|
virtual |
Get information about the quaternion transformation.
Note that the vtkNIFTIImageWriter ignores this part of the header if a quaternion has been set via vtkNIFTIImageWriter::SetQFormMatrix().
|
inline |
Definition at line 351 of file vtkNIFTIImageHeader.h.
|
virtual |
|
inline |
Definition at line 353 of file vtkNIFTIImageHeader.h.
|
virtual |
|
inline |
Definition at line 355 of file vtkNIFTIImageHeader.h.
|
virtual |
|
inline |
Definition at line 357 of file vtkNIFTIImageHeader.h.
|
virtual |
|
inline |
Definition at line 359 of file vtkNIFTIImageHeader.h.
|
virtual |
|
inline |
Definition at line 361 of file vtkNIFTIImageHeader.h.
Get information about the matrix transformation.
Note that the vtkNIFTIImageWriter ignores this part of the header if a matrix has been set via vtkNIFTIImageWriter::SetSFormMatrix().
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
void vtkNIFTIImageHeader::Initialize | ( | ) |
Initialize the header to default values.
void vtkNIFTIImageHeader::DeepCopy | ( | vtkNIFTIImageHeader * | o | ) |
Make a copy of the header.
void vtkNIFTIImageHeader::SetHeader | ( | const nifti_1_header * | hdr | ) |
Set the values from an existing nifti struct, or store the values in an existing nifti struct.
void vtkNIFTIImageHeader::GetHeader | ( | nifti_1_header * | hdr | ) |
void vtkNIFTIImageHeader::SetHeader | ( | const nifti_2_header * | hdr | ) |
void vtkNIFTIImageHeader::GetHeader | ( | nifti_2_header * | hdr | ) |
|
protected |
|
protected |
Definition at line 403 of file vtkNIFTIImageHeader.h.
|
protected |
Definition at line 404 of file vtkNIFTIImageHeader.h.
|
protected |
Definition at line 405 of file vtkNIFTIImageHeader.h.
|
protected |
Definition at line 406 of file vtkNIFTIImageHeader.h.
|
protected |
Definition at line 407 of file vtkNIFTIImageHeader.h.
|
protected |
Definition at line 408 of file vtkNIFTIImageHeader.h.
|
protected |
Definition at line 409 of file vtkNIFTIImageHeader.h.
|
protected |
Definition at line 410 of file vtkNIFTIImageHeader.h.
|
protected |
Definition at line 411 of file vtkNIFTIImageHeader.h.
|
protected |
Definition at line 412 of file vtkNIFTIImageHeader.h.
|
protected |
Definition at line 413 of file vtkNIFTIImageHeader.h.
|
protected |
Definition at line 414 of file vtkNIFTIImageHeader.h.
|
protected |
Definition at line 415 of file vtkNIFTIImageHeader.h.
|
protected |
Definition at line 416 of file vtkNIFTIImageHeader.h.
|
protected |
Definition at line 417 of file vtkNIFTIImageHeader.h.
|
protected |
Definition at line 418 of file vtkNIFTIImageHeader.h.
|
protected |
Definition at line 419 of file vtkNIFTIImageHeader.h.
|
protected |
Definition at line 420 of file vtkNIFTIImageHeader.h.
|
protected |
Definition at line 421 of file vtkNIFTIImageHeader.h.
|
protected |
Definition at line 422 of file vtkNIFTIImageHeader.h.
|
protected |
Definition at line 423 of file vtkNIFTIImageHeader.h.
|
protected |
Definition at line 424 of file vtkNIFTIImageHeader.h.
|
protected |
Definition at line 425 of file vtkNIFTIImageHeader.h.
|
protected |
Definition at line 426 of file vtkNIFTIImageHeader.h.
|
protected |
Definition at line 427 of file vtkNIFTIImageHeader.h.
|
protected |
Definition at line 428 of file vtkNIFTIImageHeader.h.
|
protected |
Definition at line 429 of file vtkNIFTIImageHeader.h.
|
protected |
Definition at line 430 of file vtkNIFTIImageHeader.h.
|
protected |
Definition at line 431 of file vtkNIFTIImageHeader.h.
|
protected |
Definition at line 432 of file vtkNIFTIImageHeader.h.
|
protected |
Definition at line 433 of file vtkNIFTIImageHeader.h.
|
protected |
Definition at line 434 of file vtkNIFTIImageHeader.h.
|
protected |
Definition at line 435 of file vtkNIFTIImageHeader.h.
|
protected |
Definition at line 436 of file vtkNIFTIImageHeader.h.
|
protected |
Definition at line 437 of file vtkNIFTIImageHeader.h.