Medical Imaging Interaction Toolkit  2025.12.02
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 
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 
78 
83 
88 
89  protected:
92 
98 
99  mitk::PlaneGeometry::ConstPointer m_PlaneGeometry;
100  mitk::BaseGeometry::ConstPointer m_Geometry3D;
102  std::vector<mitk::Point3D> m_ObjectPointsInWorldCoordinates;
103  std::vector<OutputType> m_MinMaxOutput;
104  };
105 
106 } // namespace mitk
107 
108 #endif
#define MITKCORE_EXPORT
BaseGeometry Describes the geometry of a data object.
void EnforceImageBounds()
Clips the resulting index-coordinates to make sure they do not exceed the imagebounds.
ClippedSurfaceBoundsCalculator(const mitk::PlaneGeometry *geometry=nullptr, mitk::Image::Pointer image=nullptr)
OutputType GetMinMaxSpatialDirectionY()
What Y coordinates (slice indices) are cut/visible in given plane.
std::pair< int, int > OutputType
Minimum (first) and maximum (second) slice index.
ClippedSurfaceBoundsCalculator(const mitk::BaseGeometry *geometry, mitk::Image::Pointer image)
void CalculateIntersectionPoints(const mitk::PlaneGeometry *geometry)
void SetInput(const mitk::BaseGeometry *geometry, mitk::Image *image)
void SetInput(const mitk::PlaneGeometry *geometry, mitk::Image *image)
void SetInput(const PointListType pointlist, mitk::Image *image)
OutputType GetMinMaxSpatialDirectionZ()
What Z coordinates (slice indices) are cut/visible in given plane.
ClippedSurfaceBoundsCalculator(const PointListType pointlist, mitk::Image::Pointer image)
void Update()
Request calculation.
OutputType GetMinMaxSpatialDirectionX()
What X coordinates (slice indices) are cut/visible in given plane.
void CalculateIntersectionPoints(PointListType pointList)
Image class for storing images.
Definition: mitkImage.h:70
Describes a two-dimensional, rectangular plane.
Find image slices visible on a given plane.