Medical Imaging Interaction Toolkit  2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
mitk::ClippedSurfaceBoundsCalculator Class Reference

#include <mitkClippedSurfaceBoundsCalculator.h>

Collaboration diagram for mitk::ClippedSurfaceBoundsCalculator:

Public Types

typedef std::vector< mitk::Point3DPointListType
 
typedef std::pair< int, int > OutputType
 Minimum (first) and maximum (second) slice index. More...
 

Public Member Functions

 ClippedSurfaceBoundsCalculator (const mitk::PlaneGeometry *geometry=nullptr, mitk::Image::Pointer image=nullptr)
 
 ClippedSurfaceBoundsCalculator (const mitk::BaseGeometry *geometry, mitk::Image::Pointer image)
 
 ClippedSurfaceBoundsCalculator (const PointListType pointlist, mitk::Image::Pointer image)
 
void InitializeOutput ()
 
virtual ~ClippedSurfaceBoundsCalculator ()
 
void SetInput (const mitk::PlaneGeometry *geometry, mitk::Image *image)
 
void SetInput (const mitk::BaseGeometry *geometry, mitk::Image *image)
 
void SetInput (const PointListType pointlist, mitk::Image *image)
 
void Update ()
 Request calculation. More...
 
OutputType GetMinMaxSpatialDirectionX ()
 What X coordinates (slice indices) are cut/visible in given plane. More...
 
OutputType GetMinMaxSpatialDirectionY ()
 What Y coordinates (slice indices) are cut/visible in given plane. More...
 
OutputType GetMinMaxSpatialDirectionZ ()
 What Z coordinates (slice indices) are cut/visible in given plane. More...
 

Protected Member Functions

void CalculateIntersectionPoints (const mitk::PlaneGeometry *geometry)
 
void CalculateIntersectionPoints (PointListType pointList)
 
void EnforceImageBounds ()
 Clips the resulting index-coordinates to make sure they do not exceed the imagebounds. More...
 

Protected Attributes

mitk::PlaneGeometry::ConstPointer m_PlaneGeometry
 
mitk::BaseGeometry::ConstPointer m_Geometry3D
 
mitk::Image::Pointer m_Image
 
std::vector< mitk::Point3Dm_ObjectPointsInWorldCoordinates
 
std::vector< OutputTypem_MinMaxOutput
 

Detailed Description

Definition at line 39 of file mitkClippedSurfaceBoundsCalculator.h.

Member Typedef Documentation

◆ OutputType

Minimum (first) and maximum (second) slice index.

Definition at line 72 of file mitkClippedSurfaceBoundsCalculator.h.

◆ PointListType

Constructor & Destructor Documentation

◆ ClippedSurfaceBoundsCalculator() [1/3]

mitk::ClippedSurfaceBoundsCalculator::ClippedSurfaceBoundsCalculator ( const mitk::PlaneGeometry geometry = nullptr,
mitk::Image::Pointer  image = nullptr 
)

◆ ClippedSurfaceBoundsCalculator() [2/3]

mitk::ClippedSurfaceBoundsCalculator::ClippedSurfaceBoundsCalculator ( const mitk::BaseGeometry geometry,
mitk::Image::Pointer  image 
)

◆ ClippedSurfaceBoundsCalculator() [3/3]

mitk::ClippedSurfaceBoundsCalculator::ClippedSurfaceBoundsCalculator ( const PointListType  pointlist,
mitk::Image::Pointer  image 
)

◆ ~ClippedSurfaceBoundsCalculator()

virtual mitk::ClippedSurfaceBoundsCalculator::~ClippedSurfaceBoundsCalculator ( )
virtual

Member Function Documentation

◆ CalculateIntersectionPoints() [1/2]

void mitk::ClippedSurfaceBoundsCalculator::CalculateIntersectionPoints ( const mitk::PlaneGeometry geometry)
protected

◆ CalculateIntersectionPoints() [2/2]

void mitk::ClippedSurfaceBoundsCalculator::CalculateIntersectionPoints ( PointListType  pointList)
protected

◆ EnforceImageBounds()

void mitk::ClippedSurfaceBoundsCalculator::EnforceImageBounds ( )
protected

Clips the resulting index-coordinates to make sure they do not exceed the imagebounds.

◆ GetMinMaxSpatialDirectionX()

OutputType mitk::ClippedSurfaceBoundsCalculator::GetMinMaxSpatialDirectionX ( )

What X coordinates (slice indices) are cut/visible in given plane.

◆ GetMinMaxSpatialDirectionY()

OutputType mitk::ClippedSurfaceBoundsCalculator::GetMinMaxSpatialDirectionY ( )

What Y coordinates (slice indices) are cut/visible in given plane.

◆ GetMinMaxSpatialDirectionZ()

OutputType mitk::ClippedSurfaceBoundsCalculator::GetMinMaxSpatialDirectionZ ( )

What Z coordinates (slice indices) are cut/visible in given plane.

◆ InitializeOutput()

void mitk::ClippedSurfaceBoundsCalculator::InitializeOutput ( )

◆ SetInput() [1/3]

void mitk::ClippedSurfaceBoundsCalculator::SetInput ( const mitk::BaseGeometry geometry,
mitk::Image image 
)

◆ SetInput() [2/3]

void mitk::ClippedSurfaceBoundsCalculator::SetInput ( const mitk::PlaneGeometry geometry,
mitk::Image image 
)

◆ SetInput() [3/3]

void mitk::ClippedSurfaceBoundsCalculator::SetInput ( const PointListType  pointlist,
mitk::Image image 
)

◆ Update()

void mitk::ClippedSurfaceBoundsCalculator::Update ( )

Request calculation.

How cut/visible slice indices are determined:

  1. construct a bounding box of the image. This is the box that connect the outer voxel centers(!).
  2. check the edges of this box.
  3. intersect each edge with the plane geometry
    • if the intersection point is within the image box, we update the visible/cut slice indices for all dimensions.
    • else we ignore the cut

Member Data Documentation

◆ m_Geometry3D

mitk::BaseGeometry::ConstPointer mitk::ClippedSurfaceBoundsCalculator::m_Geometry3D
protected

Definition at line 100 of file mitkClippedSurfaceBoundsCalculator.h.

◆ m_Image

mitk::Image::Pointer mitk::ClippedSurfaceBoundsCalculator::m_Image
protected

Definition at line 101 of file mitkClippedSurfaceBoundsCalculator.h.

◆ m_MinMaxOutput

std::vector<OutputType> mitk::ClippedSurfaceBoundsCalculator::m_MinMaxOutput
protected

Definition at line 103 of file mitkClippedSurfaceBoundsCalculator.h.

◆ m_ObjectPointsInWorldCoordinates

std::vector<mitk::Point3D> mitk::ClippedSurfaceBoundsCalculator::m_ObjectPointsInWorldCoordinates
protected

Definition at line 102 of file mitkClippedSurfaceBoundsCalculator.h.

◆ m_PlaneGeometry

mitk::PlaneGeometry::ConstPointer mitk::ClippedSurfaceBoundsCalculator::m_PlaneGeometry
protected

Definition at line 99 of file mitkClippedSurfaceBoundsCalculator.h.


The documentation for this class was generated from the following file: