Medical Imaging Interaction Toolkit  2016.11.0
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 43 of file mitkClippedSurfaceBoundsCalculator.h.

Member Typedef Documentation

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

Definition at line 76 of file mitkClippedSurfaceBoundsCalculator.h.

Constructor & Destructor Documentation

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

Definition at line 21 of file mitkClippedSurfaceBoundsCalculator.cpp.

References InitializeOutput(), and SetInput().

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

Definition at line 30 of file mitkClippedSurfaceBoundsCalculator.cpp.

References InitializeOutput(), and SetInput().

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

Definition at line 59 of file mitkClippedSurfaceBoundsCalculator.cpp.

Member Function Documentation

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

Definition at line 250 of file mitkClippedSurfaceBoundsCalculator.cpp.

References ROUND_P.

void mitk::ClippedSurfaceBoundsCalculator::EnforceImageBounds ( )
protected

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

Definition at line 279 of file mitkClippedSurfaceBoundsCalculator.cpp.

References max(), and min().

mitk::ClippedSurfaceBoundsCalculator::OutputType mitk::ClippedSurfaceBoundsCalculator::GetMinMaxSpatialDirectionX ( )

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

Definition at line 96 of file mitkClippedSurfaceBoundsCalculator.cpp.

Referenced by CheckIntersectionWithPointCloud().

mitk::ClippedSurfaceBoundsCalculator::OutputType mitk::ClippedSurfaceBoundsCalculator::GetMinMaxSpatialDirectionY ( )

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

Definition at line 101 of file mitkClippedSurfaceBoundsCalculator.cpp.

Referenced by CheckIntersectionWithRotatedGeometry90().

void mitk::ClippedSurfaceBoundsCalculator::InitializeOutput ( )

Definition at line 48 of file mitkClippedSurfaceBoundsCalculator.cpp.

References max(), and min().

Referenced by ClippedSurfaceBoundsCalculator().

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

Definition at line 74 of file mitkClippedSurfaceBoundsCalculator.cpp.

void mitk::ClippedSurfaceBoundsCalculator::SetInput ( const PointListType  pointlist,
mitk::Image image 
)
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

Definition at line 111 of file mitkClippedSurfaceBoundsCalculator.cpp.

References mitk::SlicedGeometry3D::GetPlaneGeometry(), mitk::SlicedGeometry3D::GetSlices(), max(), and min().

Referenced by CheckIntersectionPointsOfTwoGeometry3D(), CheckIntersectionWithPointCloud(), CheckIntersectionWithRotatedGeometry(), CheckIntersectionWithRotatedGeometry90(), CheckPlanesInsideBoundingBox(), CheckPlanesInsideBoundingBoxOnlyOnOneSlice(), and CheckPlanesOutsideOfBoundingBox().

Member Data Documentation

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

Definition at line 104 of file mitkClippedSurfaceBoundsCalculator.h.

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

Definition at line 105 of file mitkClippedSurfaceBoundsCalculator.h.

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

Definition at line 107 of file mitkClippedSurfaceBoundsCalculator.h.

std::vector<mitk::Point3D> mitk::ClippedSurfaceBoundsCalculator::m_ObjectPointsInWorldCoordinates
protected
mitk::PlaneGeometry::ConstPointer mitk::ClippedSurfaceBoundsCalculator::m_PlaneGeometry
protected

Definition at line 103 of file mitkClippedSurfaceBoundsCalculator.h.


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