DGtal
1.5.beta
|
Aim: Functor that embeds a 2D point into a 3D space from two axis vectors and an origin point given in the 3D space. More...
#include <DGtal/kernel/BasicPointFunctors.h>
Public Types | |
typedef SpaceND< 3, TInteger > | Space |
typedef Space::Point | Point |
typedef Space::Integer | Integer |
Public Member Functions | |
Point2DEmbedderIn3D (const TDomain3D &aDomain3DImg, const Point &anOriginPoint, const Point &anUpperPointOnAxis1, const Point &anUpperPointOnAxis2, const Point &aDefautPoint=Point(0, 0, 0)) | |
Point2DEmbedderIn3D (const TDomain3D &aDomain3DImg, const Point &anOriginPoint, const typename Space::RealPoint &aNormalVector, const typename Point::Component &aWidth, const Point &aDefautPoint=Point(0, 0, 0)) | |
Point2DEmbedderIn3D (const TDomain3D &aDomain3DImg, const Point &anOriginPoint, const typename Space::RealPoint &aNormalVector, const typename Space::RealPoint &orientXaxisVector, const typename Point::Component &aWidth, const Point &aDefautPoint=Point(0, 0, 0)) | |
template<typename TPoint2D > | |
Point | operator() (const TPoint2D &aPoint, bool checkInsideDomain=true) const |
void | shiftOriginPoint (const typename Space::RealPoint &shift) |
Private Attributes | |
TDomain3D | myDomain |
Space::RealPoint | myOriginPointEmbeddedIn3D |
Point | myDefaultPoint |
Space::RealPoint | myFirstAxisEmbeddedDirection |
Space::RealPoint | mySecondAxisEmbeddedDirection |
Aim: Functor that embeds a 2D point into a 3D space from two axis vectors and an origin point given in the 3D space.
Description of template class 'Point2DEmbedderIn3D'
It also checks if the resulting point is inside the 3D domain, else it returns a particular point (by default the point at domain origin (from the domain method lowerBound())).
It can be used to extract 2D images from volumetric files. For instance (see full example images/extract2DImagesFrom3D.cpp):
TDomain3D | the type of the 3d domain. |
TInteger | specifies the integer number type used to define the space. |
Definition at line 372 of file BasicPointFunctors.h.
typedef Space::Integer DGtal::functors::Point2DEmbedderIn3D< TDomain3D, TInteger >::Integer |
Definition at line 378 of file BasicPointFunctors.h.
typedef Space::Point DGtal::functors::Point2DEmbedderIn3D< TDomain3D, TInteger >::Point |
Definition at line 377 of file BasicPointFunctors.h.
typedef SpaceND< 3, TInteger> DGtal::functors::Point2DEmbedderIn3D< TDomain3D, TInteger >::Space |
Definition at line 376 of file BasicPointFunctors.h.
|
inline |
Constructor. Construct the functor from an origin 3D point, and two other 3D points defining the upper part of the 2D domain.
aDomain3DImg | the 3D domain used to keep the resulting point in the domain. |
anOriginPoint | the origin point given in the 3D domain. |
anUpperPointOnAxis1 | the upper point given in the 3D domain to define the first axis of the 2D domain. |
anUpperPointOnAxis2 | the upper point given in the 3D domain to define the second axis of the 2D domain. |
aDefautPoint | the point given when the resulting point is outside the domain (default Point(0,0,0)). |
Definition at line 390 of file BasicPointFunctors.h.
References DGtal::functors::Point2DEmbedderIn3D< TDomain3D, TInteger >::myFirstAxisEmbeddedDirection, DGtal::functors::Point2DEmbedderIn3D< TDomain3D, TInteger >::mySecondAxisEmbeddedDirection, and DGtal::PointVector< dim, TEuclideanRing, TContainer >::norm().
|
inline |
Constructor. Construct the functor from an origin 3D point, an normal vector (normal to the 2D domain), and a width. The points of an 2D domain are embedded in 3D by using a normal vector giving the direction of the 2D domain embedded in the 3D space.
aDomain3DImg | the 3D domain used to keep the resulting point in the domain. |
anOriginPoint | the center point given in the 3D domain. |
aNormalVector | the normal vector to the 2d domain embedded in 3D. |
aWidth | the width to determine the 2d domain bounds (the resulting 2d domain will be a square of length aWidth). |
aDefautPoint | the point given when the resulting point is outside the domain (default Point(0,0,0)). |
Definition at line 422 of file BasicPointFunctors.h.
References DGtal::functors::Point2DEmbedderIn3D< TDomain3D, TInteger >::myFirstAxisEmbeddedDirection, DGtal::functors::Point2DEmbedderIn3D< TDomain3D, TInteger >::myOriginPointEmbeddedIn3D, DGtal::functors::Point2DEmbedderIn3D< TDomain3D, TInteger >::mySecondAxisEmbeddedDirection, and DGtal::PointVector< dim, TEuclideanRing, TContainer >::norm().
|
inline |
Constructor. Construct the functor from an origin 3D point, an normal vector (normal to the 2D domain), another vector fixing the direction of the the image plane (from the x axis) and a width. The points of an 2D domain are embedded in 3D by using a normal vector giving the direction of the 2D domain embedded in the 3D space.
aDomain3DImg | the 3D domain used to keep the resulting point in the domain. |
anOriginPoint | the center point given in the 3D domain. |
aNormalVector | the normal vector to the 2d domain embedded in 3D. |
orientXaxisVector | the vector determining the 3D orientation of the image plane (from the x axis). |
aWidth | the width to determine the 2d domain bounds (the resulting 2d domain will be a square of length aWidth). |
aDefautPoint | the point given when the resulting point is outside the domain (default Point(0,0,0)). |
Definition at line 480 of file BasicPointFunctors.h.
References DGtal::functors::Point2DEmbedderIn3D< TDomain3D, TInteger >::myFirstAxisEmbeddedDirection, DGtal::functors::Point2DEmbedderIn3D< TDomain3D, TInteger >::myOriginPointEmbeddedIn3D, DGtal::functors::Point2DEmbedderIn3D< TDomain3D, TInteger >::mySecondAxisEmbeddedDirection, and DGtal::PointVector< dim, TEuclideanRing, TContainer >::norm().
|
inline |
The operator just recover the 3D Point associated to the Point2DEmbederIn3D parameters.
[in] | aPoint | point of the input domain (of dimension 2). |
checkInsideDomain | if 'true', checks that the point lies inside the domain. |
Definition at line 510 of file BasicPointFunctors.h.
References aPoint(), DGtal::functors::Point2DEmbedderIn3D< TDomain3D, TInteger >::myDefaultPoint, DGtal::functors::Point2DEmbedderIn3D< TDomain3D, TInteger >::myDomain, DGtal::functors::Point2DEmbedderIn3D< TDomain3D, TInteger >::myFirstAxisEmbeddedDirection, DGtal::functors::Point2DEmbedderIn3D< TDomain3D, TInteger >::myOriginPointEmbeddedIn3D, DGtal::functors::Point2DEmbedderIn3D< TDomain3D, TInteger >::mySecondAxisEmbeddedDirection, DGtal::PointVector< dim, TEuclideanRing, TContainer >::size(), DGtal::trace, and DGtal::Trace::warning().
|
inline |
Shift the image plane center of the functor (without modify the the image plane direction).
[in] | shift | direction. |
Definition at line 541 of file BasicPointFunctors.h.
References DGtal::functors::Point2DEmbedderIn3D< TDomain3D, TInteger >::myOriginPointEmbeddedIn3D, and DGtal::PointVector< dim, TEuclideanRing, TContainer >::size().
Referenced by testProjector().
|
private |
Definition at line 555 of file BasicPointFunctors.h.
Referenced by DGtal::functors::Point2DEmbedderIn3D< TDomain3D, TInteger >::operator()().
|
private |
Definition at line 550 of file BasicPointFunctors.h.
Referenced by DGtal::functors::Point2DEmbedderIn3D< TDomain3D, TInteger >::operator()().
|
private |
Definition at line 558 of file BasicPointFunctors.h.
Referenced by DGtal::functors::Point2DEmbedderIn3D< TDomain3D, TInteger >::operator()(), and DGtal::functors::Point2DEmbedderIn3D< TDomain3D, TInteger >::Point2DEmbedderIn3D().
|
private |
Definition at line 553 of file BasicPointFunctors.h.
Referenced by DGtal::functors::Point2DEmbedderIn3D< TDomain3D, TInteger >::operator()(), DGtal::functors::Point2DEmbedderIn3D< TDomain3D, TInteger >::Point2DEmbedderIn3D(), and DGtal::functors::Point2DEmbedderIn3D< TDomain3D, TInteger >::shiftOriginPoint().
|
private |
Definition at line 561 of file BasicPointFunctors.h.
Referenced by DGtal::functors::Point2DEmbedderIn3D< TDomain3D, TInteger >::operator()(), and DGtal::functors::Point2DEmbedderIn3D< TDomain3D, TInteger >::Point2DEmbedderIn3D().