Medical Imaging Interaction Toolkit  2018.4.99-b20efe7f
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
double GetTiltAngleInDegrees() const
Calculated tilt angle in degrees.
double GetTiltCorrectedAdditionalSize(unsigned int imageSizeZ) const
The shift between first and last slice in mm.
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).
double GetMatrixCoefficientForCorrectionInWorldCoordinates() const
The offset distance in Y direction for each slice in mm (describes the tilt result).
DataCollection - Class to facilitate loading/accessing structured data.
GantryTiltInformation()
Just so we can create empty instances for assigning results later.
Gantry tilt analysis result.
bool IsRegularGantryTilt() const
Whether the shearing is a gantry tilt or more complicated.
void Print(std::ostream &os) const
itk::Vector< double, 3 > Vector3Dd
bool IsSheared() const
Whether the slices were sheared.
double GetRealZSpacing() const
The z / inter-slice spacing. Needed to correct ImageSeriesReader&#39;s result.