Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
mitkClippedSurfaceBoundsCalculator.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 ClippedSurfaceBoundsCalculator_h_included
18 #define ClippedSurfaceBoundsCalculator_h_included
19 
20 #include "mitkImage.h"
21 #include "mitkPlaneGeometry.h"
22 #include <vector>
23 
41 namespace mitk
42 {
44  {
45  public:
46  typedef std::vector<mitk::Point3D> PointListType;
47 
48  ClippedSurfaceBoundsCalculator(const mitk::PlaneGeometry *geometry = nullptr, mitk::Image::Pointer image = nullptr);
50  ClippedSurfaceBoundsCalculator(const PointListType pointlist, mitk::Image::Pointer image);
51 
52  void InitializeOutput();
53 
55 
56  void SetInput(const mitk::PlaneGeometry *geometry, mitk::Image *image);
57  void SetInput(const mitk::BaseGeometry *geometry, mitk::Image *image);
58  void SetInput(const PointListType pointlist, mitk::Image *image);
59 
71  void Update();
72 
76  typedef std::pair<int, int> OutputType;
77 
81  OutputType GetMinMaxSpatialDirectionX();
82 
86  OutputType GetMinMaxSpatialDirectionY();
87 
91  OutputType GetMinMaxSpatialDirectionZ();
92 
93  protected:
94  void CalculateIntersectionPoints(const mitk::PlaneGeometry *geometry);
95  void CalculateIntersectionPoints(PointListType pointList);
96 
101  void EnforceImageBounds();
102 
106  std::vector<mitk::Point3D> m_ObjectPointsInWorldCoordinates;
107  std::vector<OutputType> m_MinMaxOutput;
108  };
109 
110 } // namespace mitk
111 
112 #endif
#define MITKCORE_EXPORT
static void Update(vtkPolyData *)
Definition: mitkSurface.cpp:35
DataCollection - Class to facilitate loading/accessing structured data.
Image class for storing images.
Definition: mitkImage.h:76
Describes a two-dimensional, rectangular plane.
std::pair< int, int > OutputType
Minimum (first) and maximum (second) slice index.
BaseGeometry Describes the geometry of a data object.