Medical Imaging Interaction Toolkit  2018.4.99-a28b433c
Medical Imaging Interaction Toolkit
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 (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 ClippedSurfaceBoundsCalculator_h_included
14 #define ClippedSurfaceBoundsCalculator_h_included
15 
16 #include "mitkImage.h"
17 #include "mitkPlaneGeometry.h"
18 #include <vector>
19 
37 namespace mitk
38 {
40  {
41  public:
42  typedef std::vector<mitk::Point3D> PointListType;
43 
46  ClippedSurfaceBoundsCalculator(const PointListType pointlist, mitk::Image::Pointer image);
47 
48  void InitializeOutput();
49 
51 
52  void SetInput(const mitk::PlaneGeometry *geometry, mitk::Image *image);
53  void SetInput(const mitk::BaseGeometry *geometry, mitk::Image *image);
54  void SetInput(const PointListType pointlist, mitk::Image *image);
55 
67  void Update();
68 
72  typedef std::pair<int, int> OutputType;
73 
77  OutputType GetMinMaxSpatialDirectionX();
78 
82  OutputType GetMinMaxSpatialDirectionY();
83 
87  OutputType GetMinMaxSpatialDirectionZ();
88 
89  protected:
90  void CalculateIntersectionPoints(const mitk::PlaneGeometry *geometry);
91  void CalculateIntersectionPoints(PointListType pointList);
92 
97  void EnforceImageBounds();
98 
102  std::vector<mitk::Point3D> m_ObjectPointsInWorldCoordinates;
103  std::vector<OutputType> m_MinMaxOutput;
104  };
105 
106 } // namespace mitk
107 
108 #endif
#define MITKCORE_EXPORT
static void Update(vtkPolyData *)
Definition: mitkSurface.cpp:31
DataCollection - Class to facilitate loading/accessing structured data.
Image class for storing images.
Definition: mitkImage.h:72
mitk::Image::Pointer image
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.