template<typename TPointIdentifier = IdentifierType, unsigned int VPointDimension = 3, typename TCoordRep = float, typename TPointsContainer = VectorContainer<TPointIdentifier, Point<TCoordRep, VPointDimension>>>
class itk::BoundingBox< TPointIdentifier, VPointDimension, TCoordRep, TPointsContainer >
Represent and compute information about bounding boxes.
BoundingBox is a supporting class that represents, computes, and caches information about bounding boxes. The bounding box can be computed from several sources, including manual specification and computation from an input points container.
This is a templated, n-dimensional version of the bounding box. Bounding boxes are represented by n pairs of (min,max) pairs, where min is the minimum coordinate value and max is the maximum coordinate value for coordinate axis i.
Template parameters for BoundingBox:
- Template Parameters
-
TPointIdentifier | The type used to access a particular point (i.e., a point's id) |
TCoordRep | Numerical type with which to represent each coordinate value. |
VPointDimension | Geometric dimension of space. |
- Examples
- SphinxExamples/src/Core/Common/BoundingBoxOfAPointSet/Code.cxx.
Definition at line 70 of file itkBoundingBox.h.
template<typename TPointIdentifier = IdentifierType, unsigned int VPointDimension = 3, typename TCoordRep = float, typename TPointsContainer = VectorContainer<TPointIdentifier, Point<TCoordRep, VPointDimension>>>
Get the length squared of the diagonal of the bounding box. Returns zero if bounding box cannot be computed. Note that the Accumulate type is used to represent the length.
Definition at line 175 of file itkBoundingBox.h.
template<typename TPointIdentifier = IdentifierType, unsigned int VPointDimension = 3, typename TCoordRep = float, typename TPointsContainer = VectorContainer<TPointIdentifier, Point<TCoordRep, VPointDimension>>>
Hold on to the type information specified by the template parameters.
Definition at line 91 of file itkBoundingBox.h.
template<typename TPointIdentifier = IdentifierType, unsigned int VPointDimension = 3, typename TCoordRep = float, typename TPointsContainer = VectorContainer<TPointIdentifier, Point<TCoordRep, VPointDimension>>>
template<typename TPointIdentifier = IdentifierType, unsigned int VPointDimension = 3, typename TCoordRep = float, typename TPointsContainer = VectorContainer<TPointIdentifier, Point<TCoordRep, VPointDimension>>>
bool itk::BoundingBox< TPointIdentifier, VPointDimension, TCoordRep, TPointsContainer >::ComputeBoundingBox |
( |
| ) |
const |
Method that actually computes bounding box.
template<typename TPointIdentifier = IdentifierType, unsigned int VPointDimension = 3, typename TCoordRep = float, typename TPointsContainer = VectorContainer<TPointIdentifier, Point<TCoordRep, VPointDimension>>>
Compute and return the corners of the bounding box.
- Note
- This function returns the same points as the legacy member function
GetCorners()
, but it is const
, and it avoids dynamic memory allocation by using std::array
.
template<typename TPointIdentifier = IdentifierType, unsigned int VPointDimension = 3, typename TCoordRep = float, typename TPointsContainer = VectorContainer<TPointIdentifier, Point<TCoordRep, VPointDimension>>>
Adjust bounds (if necessary) as if the given point was in the set of points being considered. Does not add the given point to the set. Therefore, this point not considered in future computeboundingbox/gets once the point set is changed.
template<typename TPointIdentifier = IdentifierType, unsigned int VPointDimension = 3, typename TCoordRep = float, typename TPointsContainer = VectorContainer<TPointIdentifier, Point<TCoordRep, VPointDimension>>>
virtual::itk::LightObject::Pointer itk::BoundingBox< TPointIdentifier, VPointDimension, TCoordRep, TPointsContainer >::CreateAnother |
( |
| ) |
const |
|
virtual |
Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.
Reimplemented from itk::LightObject.
template<typename TPointIdentifier = IdentifierType, unsigned int VPointDimension = 3, typename TCoordRep = float, typename TPointsContainer = VectorContainer<TPointIdentifier, Point<TCoordRep, VPointDimension>>>
Duplicates this bounding box
template<typename TPointIdentifier = IdentifierType, unsigned int VPointDimension = 3, typename TCoordRep = float, typename TPointsContainer = VectorContainer<TPointIdentifier, Point<TCoordRep, VPointDimension>>>
template<typename TPointIdentifier = IdentifierType, unsigned int VPointDimension = 3, typename TCoordRep = float, typename TPointsContainer = VectorContainer<TPointIdentifier, Point<TCoordRep, VPointDimension>>>
Get the center of the bounding box. Returns a point at the origin when the bounding box object is just default-initialized.
template<typename TPointIdentifier = IdentifierType, unsigned int VPointDimension = 3, typename TCoordRep = float, typename TPointsContainer = VectorContainer<TPointIdentifier, Point<TCoordRep, VPointDimension>>>
Get the maximum point of the bounding box. Returns a point at the origin when the bounding box object is just default-initialized.
template<typename TPointIdentifier = IdentifierType, unsigned int VPointDimension = 3, typename TCoordRep = float, typename TPointsContainer = VectorContainer<TPointIdentifier, Point<TCoordRep, VPointDimension>>>
Get the minimum point of the bounding box. Returns a point at the origin when the bounding box object is just default-initialized.
template<typename TPointIdentifier = IdentifierType, unsigned int VPointDimension = 3, typename TCoordRep = float, typename TPointsContainer = VectorContainer<TPointIdentifier, Point<TCoordRep, VPointDimension>>>
Method Compute the Modified Time based on changed to the components.
Reimplemented from itk::Object.
template<typename TPointIdentifier = IdentifierType, unsigned int VPointDimension = 3, typename TCoordRep = float, typename TPointsContainer = VectorContainer<TPointIdentifier, Point<TCoordRep, VPointDimension>>>
virtual const char* itk::BoundingBox< TPointIdentifier, VPointDimension, TCoordRep, TPointsContainer >::GetNameOfClass |
( |
| ) |
const |
|
virtual |
Run-time type information (and related methods).
Reimplemented from itk::Object.
template<typename TPointIdentifier = IdentifierType, unsigned int VPointDimension = 3, typename TCoordRep = float, typename TPointsContainer = VectorContainer<TPointIdentifier, Point<TCoordRep, VPointDimension>>>
bool itk::BoundingBox< TPointIdentifier, VPointDimension, TCoordRep, TPointsContainer >::IsInside |
( |
const PointType & |
| ) |
const |
Method that checks if a point is inside the bounding box.
template<typename TPointIdentifier = IdentifierType, unsigned int VPointDimension = 3, typename TCoordRep = float, typename TPointsContainer = VectorContainer<TPointIdentifier, Point<TCoordRep, VPointDimension>>>
Method for creation through the object factory.
template<typename TPointIdentifier = IdentifierType, unsigned int VPointDimension = 3, typename TCoordRep = float, typename TPointsContainer = VectorContainer<TPointIdentifier, Point<TCoordRep, VPointDimension>>>
void itk::BoundingBox< TPointIdentifier, VPointDimension, TCoordRep, TPointsContainer >::PrintSelf |
( |
std::ostream & |
os, |
|
|
Indent |
indent |
|
) |
| const |
|
overrideprotectedvirtual |
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from itk::LightObject.
template<typename TPointIdentifier = IdentifierType, unsigned int VPointDimension = 3, typename TCoordRep = float, typename TPointsContainer = VectorContainer<TPointIdentifier, Point<TCoordRep, VPointDimension>>>
Set the maximum point of the bounding box. May not be valid for the given set of points. Will be preserved until this filter's (i.e., the point set's) modified time changes.
template<typename TPointIdentifier = IdentifierType, unsigned int VPointDimension = 3, typename TCoordRep = float, typename TPointsContainer = VectorContainer<TPointIdentifier, Point<TCoordRep, VPointDimension>>>
Set the minimum point of the bounding box. May not be valid for the given set of points. Will be preserved until this filter's (i.e., the point set's) modified time changes.
template<typename TPointIdentifier = IdentifierType, unsigned int VPointDimension = 3, typename TCoordRep = float, typename TPointsContainer = VectorContainer<TPointIdentifier, Point<TCoordRep, VPointDimension>>>
Set/Get the points from which the bounding box should be computed. The bounding box is cached and is not recomputed if the points are not changed.
template<typename TPointIdentifier = IdentifierType, unsigned int VPointDimension = 3, typename TCoordRep = float, typename TPointsContainer = VectorContainer<TPointIdentifier, Point<TCoordRep, VPointDimension>>>
constexpr unsigned int itk::BoundingBox< TPointIdentifier, VPointDimension, TCoordRep, TPointsContainer >::PointDimension = VPointDimension |
|
staticconstexpr |
Hold on to the dimensions specified by the template parameters.
Definition at line 101 of file itkBoundingBox.h.