Medical Imaging Interaction Toolkit  2016.11.0
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef mitkGantryTiltInformation_h
18 #define mitkGantryTiltInformation_h
19 
20 #include "mitkPoint.h"
21 #include "mitkVector.h"
22 #include "mitkPoint.h"
23 
24 namespace mitk
25 {
26 
43 {
44  public:
45 
46  // two types to avoid any rounding errors
47  typedef itk::Point<double,3> Point3Dd;
48  typedef itk::Vector<double,3> Vector3Dd;
49 
54 
55  void Print(std::ostream& os) const;
56 
73  GantryTiltInformation( const Point3D& origin1,
74  const Point3D& origin2,
75  const Vector3D& right,
76  const Vector3D& up, unsigned int numberOfSlicesApart);
77 
83  static
85  MakeFromTagValues( const std::string& origin1String,
86  const std::string& origin2String,
87  const std::string orientationString,
88  unsigned int numberOfSlicesApart);
89 
95  bool IsSheared() const;
96 
106  bool IsRegularGantryTilt() const;
107 
112 
113 
117  double GetRealZSpacing() const;
118 
124  double GetTiltCorrectedAdditionalSize(unsigned int imageSizeZ) const;
125 
129  double GetTiltAngleInDegrees() const;
130 
131  private:
132 
136  Point3D projectPointOnLine( Point3Dd p, Point3Dd lineOrigin, Vector3Dd lineDirection );
137 
138  double m_ShiftUp;
139  double m_ShiftRight;
140  double m_ShiftNormal;
141  double m_ITKAssumedSliceSpacing;
142  unsigned int m_NumberOfSlicesApart;
143 };
144 
145 } // namespace
146 
147 #endif
bool IsRegularGantryTilt() const
Whether the shearing is a gantry tilt or more complicated.
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.
void Print(std::ostream &os) const
double GetRealZSpacing() const
The z / inter-slice spacing. Needed to correct ImageSeriesReader's result.
bool IsSheared() const
Whether the slices were sheared.
GantryTiltInformation()
Just so we can create empty instances for assigning results later.
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).
Gantry tilt analysis result.
double GetTiltCorrectedAdditionalSize(unsigned int imageSizeZ) const
The shift between first and last slice in mm.
itk::Vector< double, 3 > Vector3Dd
double GetTiltAngleInDegrees() const
Calculated tilt angle in degrees.