Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
mitkGantryTiltInformation.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkGantryTiltInformation_h
14 #define mitkGantryTiltInformation_h
15 
16 #include "mitkPoint.h"
17 #include "mitkVector.h"
18 #include "mitkPoint.h"
19 
20 namespace mitk
21 {
22 
39 {
40  public:
41 
42  // two types to avoid any rounding errors
43  typedef itk::Point<double,3> Point3Dd;
44  typedef itk::Vector<double,3> Vector3Dd;
45 
50 
51  void Print(std::ostream& os) const;
52 
69  GantryTiltInformation( const Point3D& origin1,
70  const Point3D& origin2,
71  const Vector3D& right,
72  const Vector3D& up, unsigned int numberOfSlicesApart);
73 
79  static
81  MakeFromTagValues( const std::string& origin1String,
82  const std::string& origin2String,
83  const std::string& orientationString,
84  unsigned int numberOfSlicesApart);
85 
91  bool IsSheared() const;
92 
102  bool IsRegularGantryTilt() const;
103 
108 
109 
113  double GetRealZSpacing() const;
114 
120  double GetTiltCorrectedAdditionalSize(unsigned int imageSizeZ) const;
121 
125  double GetTiltAngleInDegrees() const;
126 
127  private:
128 
132  Point3D projectPointOnLine( Point3Dd p, Point3Dd lineOrigin, Vector3Dd lineDirection );
133 
134  double m_ShiftUp;
135  double m_ShiftRight;
136  double m_ShiftNormal;
137  double m_ITKAssumedSliceSpacing;
138  unsigned int m_NumberOfSlicesApart;
139 };
140 
141 } // namespace
142 
143 #endif
mitk::GantryTiltInformation::Vector3Dd
itk::Vector< double, 3 > Vector3Dd
Definition: mitkGantryTiltInformation.h:44
mitk::GantryTiltInformation::GetTiltCorrectedAdditionalSize
double GetTiltCorrectedAdditionalSize(unsigned int imageSizeZ) const
The shift between first and last slice in mm.
mitk::GantryTiltInformation::GantryTiltInformation
GantryTiltInformation()
Just so we can create empty instances for assigning results later.
mitkPoint.h
mitk::GantryTiltInformation::IsRegularGantryTilt
bool IsRegularGantryTilt() const
Whether the shearing is a gantry tilt or more complicated.
mitk::GantryTiltInformation
Gantry tilt analysis result.
Definition: mitkGantryTiltInformation.h:38
mitk::GantryTiltInformation::GetMatrixCoefficientForCorrectionInWorldCoordinates
double GetMatrixCoefficientForCorrectionInWorldCoordinates() const
The offset distance in Y direction for each slice in mm (describes the tilt result).
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::GantryTiltInformation::IsSheared
bool IsSheared() const
Whether the slices were sheared.
mitk::GantryTiltInformation::GetRealZSpacing
double GetRealZSpacing() const
The z / inter-slice spacing. Needed to correct ImageSeriesReader's result.
mitk::Vector< ScalarType, 3 >
mitk::GantryTiltInformation::GetTiltAngleInDegrees
double GetTiltAngleInDegrees() const
Calculated tilt angle in degrees.
mitk::Point< ScalarType, 3 >
mitk::GantryTiltInformation::Print
void Print(std::ostream &os) const
mitk::GantryTiltInformation::MakeFromTagValues
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).
mitkVector.h
mitk::GantryTiltInformation::Point3Dd
itk::Point< double, 3 > Point3Dd
Definition: mitkGantryTiltInformation.h:43