Medical Imaging Interaction Toolkit  2018.4.99-9a29ffc6
Medical Imaging Interaction Toolkit
mitk::GantryTiltInformation Class Reference

Gantry tilt analysis result. More...

#include <mitkGantryTiltInformation.h>

Public Types

typedef itk::Point< double, 3 > Point3Dd
 
typedef itk::Vector< double, 3 > Vector3Dd
 

Public Member Functions

 GantryTiltInformation ()
 Just so we can create empty instances for assigning results later. More...
 
void Print (std::ostream &os) const
 
 GantryTiltInformation (const Point3D &origin1, const Point3D &origin2, const Vector3D &right, const Vector3D &up, unsigned int numberOfSlicesApart)
 THE constructor, which does all the calculations. More...
 
bool IsSheared () const
 Whether the slices were sheared. More...
 
bool IsRegularGantryTilt () const
 Whether the shearing is a gantry tilt or more complicated. More...
 
double GetMatrixCoefficientForCorrectionInWorldCoordinates () const
 The offset distance in Y direction for each slice in mm (describes the tilt result). More...
 
double GetRealZSpacing () const
 The z / inter-slice spacing. Needed to correct ImageSeriesReader's result. More...
 
double GetTiltCorrectedAdditionalSize (unsigned int imageSizeZ) const
 The shift between first and last slice in mm. More...
 
double GetTiltAngleInDegrees () const
 Calculated tilt angle in degrees. More...
 

Static Public Member Functions

static GantryTiltInformation MakeFromTagValues (const std::string &origin1String, const std::string &origin2String, const std::string &orientationString, unsigned int numberOfSlicesApart)
 Factory method to create GantryTiltInformation from tag values (strings). More...
 

Detailed Description

Gantry tilt analysis result.

Takes geometry information for two slices of a DICOM series and calculates whether these fit into an orthogonal block or not. If NOT, they can either be the result of an acquisition with gantry tilt OR completly broken by some shearing transformation.

Most calculations are done in the constructor, results can then be read via the remaining methods.

This class is a helper to DICOMITKSeriesGDCMReader and can not be used outside of The DICOMReader Module

Definition at line 38 of file mitkGantryTiltInformation.h.

Member Typedef Documentation

◆ Point3Dd

typedef itk::Point<double,3> mitk::GantryTiltInformation::Point3Dd

Definition at line 43 of file mitkGantryTiltInformation.h.

◆ Vector3Dd

typedef itk::Vector<double,3> mitk::GantryTiltInformation::Vector3Dd

Definition at line 44 of file mitkGantryTiltInformation.h.

Constructor & Destructor Documentation

◆ GantryTiltInformation() [1/2]

mitk::GantryTiltInformation::GantryTiltInformation ( )

Just so we can create empty instances for assigning results later.

Definition at line 21 of file mitkGantryTiltInformation.cpp.

Referenced by MakeFromTagValues().

◆ GantryTiltInformation() [2/2]

mitk::GantryTiltInformation::GantryTiltInformation ( const Point3D origin1,
const Point3D origin2,
const Vector3D right,
const Vector3D up,
unsigned int  numberOfSlicesApart 
)

THE constructor, which does all the calculations.

Determining the amount of tilt is done by checking the distances of origin1 from planes through origin2. Two planes are considered:

  • normal vector along normal of slices (right x up): gives the slice distance
  • normal vector along orientation vector "up": gives the shift parallel to the plane orientation

The tilt angle can then be calculated from these distances

Parameters
origin1origin of the first slice
origin2origin of the second slice
rightright/up describe the orientatation of borth slices
upright/up describe the orientatation of borth slices
numberOfSlicesAparthow many slices are the given origins apart (1 for neighboring slices)

Definition at line 44 of file mitkGantryTiltInformation.cpp.

References doublepoint, doublevector, MakeFromTagValues(), and MITK_DEBUG.

Member Function Documentation

◆ GetMatrixCoefficientForCorrectionInWorldCoordinates()

double mitk::GantryTiltInformation::GetMatrixCoefficientForCorrectionInWorldCoordinates ( ) const

The offset distance in Y direction for each slice in mm (describes the tilt result).

Definition at line 225 of file mitkGantryTiltInformation.cpp.

◆ GetRealZSpacing()

double mitk::GantryTiltInformation::GetRealZSpacing ( ) const

The z / inter-slice spacing. Needed to correct ImageSeriesReader's result.

Definition at line 232 of file mitkGantryTiltInformation.cpp.

◆ GetTiltAngleInDegrees()

double mitk::GantryTiltInformation::GetTiltAngleInDegrees ( ) const

Calculated tilt angle in degrees.

Definition at line 219 of file mitkGantryTiltInformation.cpp.

◆ GetTiltCorrectedAdditionalSize()

double mitk::GantryTiltInformation::GetTiltCorrectedAdditionalSize ( unsigned int  imageSizeZ) const

The shift between first and last slice in mm.

Needed to resize an orthogonal image volume.

Definition at line 213 of file mitkGantryTiltInformation.cpp.

◆ IsRegularGantryTilt()

bool mitk::GantryTiltInformation::IsRegularGantryTilt ( ) const

Whether the shearing is a gantry tilt or more complicated.

Gantry tilt will only produce shifts in ONE orientation, not in both.

Since the correction code currently only coveres one tilt direction AND we don't know of medical images with two tilt directions, the loading code wants to check if our assumptions are true.

Definition at line 248 of file mitkGantryTiltInformation.cpp.

Referenced by mitk::EquiDistantBlocksSorter::AnalyzeFileForITKImageSeriesReaderSpacingAssumption(), mitk::ThreeDnTDICOMSeriesReader::LoadMitkImageForImageBlockDescriptor(), and mitk::DICOMITKSeriesGDCMReader::LoadMitkImageForImageBlockDescriptor().

◆ IsSheared()

bool mitk::GantryTiltInformation::IsSheared ( ) const

Whether the slices were sheared.

True if any of the shifts along right or up vector are non-zero.

Definition at line 239 of file mitkGantryTiltInformation.cpp.

Referenced by mitk::EquiDistantBlocksSorter::AnalyzeFileForITKImageSeriesReaderSpacingAssumption().

◆ MakeFromTagValues()

mitk::GantryTiltInformation mitk::GantryTiltInformation::MakeFromTagValues ( const std::string &  origin1String,
const std::string &  origin2String,
const std::string &  orientationString,
unsigned int  numberOfSlicesApart 
)
static

◆ Print()

void mitk::GantryTiltInformation::Print ( std::ostream &  os) const

Definition at line 183 of file mitkGantryTiltInformation.cpp.

Referenced by MakeFromTagValues().


The documentation for this class was generated from the following files: