Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
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 mitkClippedSurfaceBoundsCalculator_h
14 #define mitkClippedSurfaceBoundsCalculator_h
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 
44  ClippedSurfaceBoundsCalculator(const mitk::PlaneGeometry *geometry = nullptr, mitk::Image::Pointer image = nullptr);
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
mitk::ClippedSurfaceBoundsCalculator::m_ObjectPointsInWorldCoordinates
std::vector< mitk::Point3D > m_ObjectPointsInWorldCoordinates
Definition: mitkClippedSurfaceBoundsCalculator.h:102
mitkImage.h
mitk::PlaneGeometry
Describes a two-dimensional, rectangular plane.
Definition: mitkPlaneGeometry.h:78
mitk::ClippedSurfaceBoundsCalculator::PointListType
std::vector< mitk::Point3D > PointListType
Definition: mitkClippedSurfaceBoundsCalculator.h:42
mitk::Image
Image class for storing images.
Definition: mitkImage.h:69
itk::SmartPointer< Self >
mitk::ClippedSurfaceBoundsCalculator
Definition: mitkClippedSurfaceBoundsCalculator.h:39
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::ClippedSurfaceBoundsCalculator::m_MinMaxOutput
std::vector< OutputType > m_MinMaxOutput
Definition: mitkClippedSurfaceBoundsCalculator.h:103
mitk::BaseGeometry
BaseGeometry Describes the geometry of a data object.
Definition: mitkBaseGeometry.h:94
mitk::ClippedSurfaceBoundsCalculator::m_PlaneGeometry
mitk::PlaneGeometry::ConstPointer m_PlaneGeometry
Definition: mitkClippedSurfaceBoundsCalculator.h:99
mitk::ClippedSurfaceBoundsCalculator::m_Image
mitk::Image::Pointer m_Image
Definition: mitkClippedSurfaceBoundsCalculator.h:101
mitk::ClippedSurfaceBoundsCalculator::OutputType
std::pair< int, int > OutputType
Minimum (first) and maximum (second) slice index.
Definition: mitkClippedSurfaceBoundsCalculator.h:72
mitk::ClippedSurfaceBoundsCalculator::m_Geometry3D
mitk::BaseGeometry::ConstPointer m_Geometry3D
Definition: mitkClippedSurfaceBoundsCalculator.h:100
MITKCORE_EXPORT
#define MITKCORE_EXPORT
Definition: MitkCoreExports.h:15
mitkPlaneGeometry.h