Helper class. More...
#include <ImageOrientationHelper.h>
Public Types | |
enum | PossibleImageOrientations { RAI = 0, RPS = 1, RIP = 2, RSA = 3, LAS = 4, LPI = 5, LIA = 6, ARS = 7, ALI = 8, AIR = 9, ASL = 10, PRI = 11, PLS = 12, PIL = 13, PSR = 14, IRA = 15, ILP = 16, IAL = 17, IPR = 18, SRP = 19, SLA = 20, SAR = 22, SPL = 23, UNKNOWN = 50 } |
For each axis (x, y or z), 6 possibilities: More... | |
Static Public Member Functions | |
static PossibleImageOrientations | getOrientationAsEnum (QString orientation) |
Returns the Possible Medical Image orientation in PossibleImageOrientations enumeration format from a QString format. More... | |
static QString | getOrientationAsQString (PossibleImageOrientations orientation) |
Returns the Possible Medical Image orientation in QString format from a PossibleImageOrientation enumeration format. More... | |
static const QStringList | getPossibleImageOrientations () |
Returns the enumeration type PossibleImageOrientations in the format of a QStringList. More... | |
static vtkSmartPointer< vtkMatrix4x4 > | getTransformFromRAI (PossibleImageOrientations orientation, double dimX, double dimY, double dimZ) |
Given a possible Dicom Image Orientation, this method returns the transform matrix to express an RAI image in this orientation. More... | |
static vtkSmartPointer< vtkMatrix4x4 > | getTransformFromRAI (QString orientation, double dimX, double dimY, double dimZ) |
Given a possible Dicom Image Orientation, this method returns the transform matrix to express an RAI image in this orientation. More... | |
static vtkSmartPointer< vtkMatrix4x4 > | getTransformToRAI (PossibleImageOrientations orientation, double dimX, double dimY, double dimZ) |
Given a possible Dicom Image Orientation, this method returns the transform matrix to express the image in the RAI (x: Right to Left, y: Anterior to Posterior, z: Inferior to Superior) orientation. More... | |
static vtkSmartPointer< vtkMatrix4x4 > | getTransformToRAI (QString orientation, double dimX, double dimY, double dimZ) |
Given a possible Dicom Image Orientation, this method returns the transform matrix to express the image in the RAI (x: Right to Left, y: Anterior to Posterior, z: Inferior to Superior) orientation. More... | |
Helper class.
By convention, vtkImageDatas stored in ImageComponents MUST BE in RAI format. Indeed, for the 2D Axial, Coronal and Sagittal viewers to display correct views in CamiTK, all images should be oriented the same way, that is to say:
This class gives Transformation Matrices to orient Medical Images acquired in standard Dicom Image Orientation from or toward RAI orientation.
Note: this class only consideres Direct image orientations.
For each axis (x, y or z), 6 possibilities:
So 6 possibilities for x, 4 for y and 2 for z -> 48 possibilities 24 direct and 24 indirect.
Only Direct Orientations are considered here.
|
static |
Returns the Possible Medical Image orientation in PossibleImageOrientations enumeration format from a QString format.
References getPossibleImageOrientations(), and UNKNOWN.
Referenced by getTransformFromRAI(), and getTransformToRAI().
|
static |
Returns the Possible Medical Image orientation in QString format from a PossibleImageOrientation enumeration format.
References getPossibleImageOrientations().
|
static |
Returns the enumeration type PossibleImageOrientations in the format of a QStringList.
This may be needed for GUI not using enums.
Note: the index of each orientation String refers to the corresponding enum number for example the getPossibleImageOrientations().indexOf("LAS") returns 4 which is the enum number of LAS in the PossibleImageOrientations enumeration
Referenced by getOrientationAsEnum(), getOrientationAsQString(), and RawDataDialog::init().
|
static |
Given a possible Dicom Image Orientation, this method returns the transform matrix to express an RAI image in this orientation.
orientation | new orientation wiched for the image (originnally in RAI orientation). |
dimX | image dimension in X direction in millimeters (mm). It can be generally calculated the following way: dimX = (number of voxels in X direction) * (size of a voxel in X direction) |
dimY | image dimension in Y direction in millimeters (mm). It can be generally calculated the following way: dimY = (number of voxels in Y direction) * (size of a voxel in Y direction) |
dimZ | image dimension in Z direction in millimeters (mm). It can be generally calculated the following way: dimZ = (number of voxels in Z direction) * (size of a voxel in Z direction) |
References AIR, ALI, ARS, ASL, IAL, ILP, IPR, IRA, LAS, LIA, LPI, PIL, PLS, PRI, PSR, RAI, RIP, RPS, RSA, SAR, SLA, SPL, SRP, and camitk::transform.
Referenced by getTransformFromRAI(), and getTransformToRAI().
|
static |
Given a possible Dicom Image Orientation, this method returns the transform matrix to express an RAI image in this orientation.
orientation | new orientation for the image (originnally in RAI orientation). |
dimX | image dimension in X direction in millimeters (mm). It can be generally calculated the following way: dimX = (number of voxels in X direction) * (size of a voxel in X direction) |
dimY | image dimension in Y direction in millimeters (mm). It can be generally calculated the following way: dimY = (number of voxels in Y direction) * (size of a voxel in Y direction) |
dimZ | image dimension in Z direction in millimeters (mm). It can be generally calculated the following way: dimZ = (number of voxels in Z direction) * (size of a voxel in Z direction) |
References getOrientationAsEnum(), getTransformFromRAI(), and UNKNOWN.
|
static |
Given a possible Dicom Image Orientation, this method returns the transform matrix to express the image in the RAI (x: Right to Left, y: Anterior to Posterior, z: Inferior to Superior) orientation.
orientation | original orientation of the image (this orientation should have been encoded in the input image file) as PossibleImageOrientations ennumeration. |
dimX | image dimension in X direction in millimeters (mm). It can be generally calculated the following way: dimX = (number of voxels in X direction) * (size of a voxel in X direction) |
dimY | image dimension in Y direction in millimeters (mm). It can be generally calculated the following way: dimY = (number of voxels in Y direction) * (size of a voxel in Y direction) |
dimZ | image dimension in Z direction in millimeters (mm). It can be generally calculated the following way: dimZ = (number of voxels in Z direction) * (size of a voxel in Z direction) |
Note: The original image dimensions are needed to re-translate the image to the origin after a possible rotation.
References AIR, ALI, ARS, ASL, getTransformFromRAI(), IAL, ILP, IPR, IRA, LAS, LIA, LPI, PIL, PLS, PRI, PSR, RAI, RIP, RPS, RSA, SAR, SLA, SPL, SRP, and camitk::transform.
Referenced by getTransformToRAI().
|
static |
Given a possible Dicom Image Orientation, this method returns the transform matrix to express the image in the RAI (x: Right to Left, y: Anterior to Posterior, z: Inferior to Superior) orientation.
orientation | original orientation of the image (this orientation should have been encoded in the input image file) in QString format. |
dimX | image dimension in X direction in millimeters (mm). It can be generally calculated the following way: dimX = (number of voxels in X direction) * (size of a voxel in X direction) |
dimY | image dimension in Y direction in millimeters (mm). It can be generally calculated the following way: dimY = (number of voxels in Y direction) * (size of a voxel in Y direction) |
dimZ | image dimension in Z direction in millimeters (mm). It can be generally calculated the following way: dimZ = (number of voxels in Z direction) * (size of a voxel in Z direction) |
Note: The original image dimensions are needed to re-translate the image to the origin after a possible rotation.
References getOrientationAsEnum(), getTransformToRAI(), and UNKNOWN.