IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Classes | Typedefs | Enumerations | Functions
ipsdk::shape::segmentation Namespace Reference

Namespace aggregating basic shape segmentation components. More...

Classes

class  IPSDKBaseShapeSegmentationException
 Exception class for library IPSDKBaseShapeSegmentation. More...
 
class  PlanIndexedShape2dColl
 Collection of shape 2d collections indexed wth respect to image plans. More...
 
class  PlanIndexedShape3dColl
 Collection of shape 3d collections indexed with respect to image plans. More...
 
struct  PolygonPointInfo
 structure used to store polygon point local informations More...
 
class  Shape2dColl
 Collection of shape 2d. More...
 
class  Shape3dColl
 Collection of shape 3d. More...
 
class  ThicknessSeparator
 Class used to separate shapes. More...
 

Typedefs

typedef boost::shared_ptr< Shape2dCollShape2dCollPtr
 shared pointer to shape 2d collection object
 
typedef boost::shared_ptr< const Shape2dCollShape2dCollConstPtr
 shared pointer to const shape 2d collection object
 
typedef boost::shared_ptr< PlanIndexedShape2dCollPlanIndexedShape2dCollPtr
 shared pointer to shape 2d plan indexed collection object
 
typedef boost::shared_ptr< const PlanIndexedShape2dCollPlanIndexedShape2dCollConstPtr
 shared pointer to const shape 2d plan indexed collection object
 
typedef boost::shared_ptr< Shape3dCollShape3dCollPtr
 shared pointer to shape 3d collection object
 
typedef boost::shared_ptr< const Shape3dCollShape3dCollConstPtr
 shared pointer to const shape 3d collection object
 
typedef boost::shared_ptr< PlanIndexedShape3dCollPlanIndexedShape3dCollPtr
 shared pointer to shape 3d plan indexed collection object
 
typedef boost::shared_ptr< const PlanIndexedShape3dCollPlanIndexedShape3dCollConstPtr
 shared pointer to const shape 3d plan indexed collection object
 
typedef std::multimap< ipsdk::geom::Shape2dPoint, PolygonPointInfoPolygonPointInfoMap
 map associating point coordinates to polygon point informations More...
 

Enumerations

enum  eSkeleton2dHolesPolicy { eSHP_Ignored, eSHP_ExtractedButNotAnalyzed, eSHP_ExtractedAndAnalyzed }
 Enumerate describing polygon holes processing policy used during skeleton 2d computation. More...
 
enum  eIPSDKBaseShapeSegmentationMessage
 Enumerate describing messages. More...
 
enum  eSegmentation2dMessage { eInvalidSeparationIdx, eNulPolygonWithHolesPtr, eOutOfBoundsSeparationIdx, eSkeletonFailed }
 Enumerate describing messages. More...
 

Functions

IPSDKBASESHAPESEGMENTATION_API Shape2dCollPtr applyCalibration (const Shape2dColl &inputShape2dColl, const GeometricCalibration &calibration)
 function allowing to apply a calibration on an input shape collection
 
IPSDKBASESHAPESEGMENTATION_API bool compare (const Shape2dColl &shapeColl1, const Shape2dColl &shapeColl2, const geom::Shape2dDataType epsilon=ipsdk::NumericLimits< geom::Shape2dDataType >::sqrt_epsilon())
 function allowing to compare collections of shape 2d
 
IPSDKBASESHAPESEGMENTATION_API bool compare (const PlanIndexedShape2dColl &piShapeColl1, const PlanIndexedShape2dColl &piShapeColl2, const geom::Shape2dDataType epsilon=ipsdk::NumericLimits< geom::Shape2dDataType >::sqrt_epsilon())
 function allowing to compare plan indexed collections of shape 2d
 
IPSDKBASESHAPESEGMENTATION_API Shape3dCollPtr applyCalibration (const Shape3dColl &inputShape3dColl, const GeometricCalibration &calibration)
 function allowing to apply a calibration on an input shape collection
 
IPSDKBASESHAPESEGMENTATION_API bool compare (const Shape3dColl &shapeColl1, const Shape3dColl &shapeColl2, const geom::Shape3dDataType epsilon=ipsdk::NumericLimits< geom::Shape3dDataType >::sqrt_epsilon())
 function allowing to compare collections of shape 3d
 
IPSDKBASESHAPESEGMENTATION_API bool compare (const PlanIndexedShape3dColl &piShapeColl1, const PlanIndexedShape3dColl &piShapeColl2, const geom::Shape3dDataType epsilon=ipsdk::NumericLimits< geom::Shape3dDataType >::sqrt_epsilon())
 function allowing to compare plan indexed collections of shape 3d
 
IPSDKBASESHAPESEGMENTATION_API const std::string & getIPSDKBaseShapeSegmentationLoggerName ()
 Recovery of logger name associated to library.
 
IPSDKBASESHAPESEGMENTATION_API log4cplus::Logger & getIPSDKBaseShapeSegmentationLogger ()
 Recovery of logger associated to library.
 
IPSDKBASESHAPESEGMENTATION_API const ipsdk::LogMessageManagergetIPSDKBaseShapeSegmentationLogMessageManager ()
 Recovery of message manager associated to library.
 
IPSDKBASESHAPESEGMENTATION_API bool detectSelfIntersectingPoint (const ipsdk::geom::Shape2dPolygon &polygon, ipUInt32 &firstPointIndex, ipUInt32 &secondPointIndex)
 function allowing to detect first self intersecting points into a polygon More...
 
IPSDKBASESHAPESEGMENTATION_API void extractLocalPointInfo (const ipsdk::geom::Shape2dPolygonWithHolesPtr &pPolygon, PolygonPointInfoMap &polygonPointInfoMap)
 function allowing to extract local informations around polygon points More...
 
IPSDKBASESHAPESEGMENTATION_API void normalize (ipsdk::geom::Shape2dPolygonWithHoles &polygonWithHoles)
 function allowing to normalize a polygon to ensure that : More...
 
IPSDKBASESHAPESEGMENTATION_API void separateSelfIntersecting (ipsdk::geom::Shape2d &shape2d)
 function allowing to separate self intersecting polygons associated to a shape
 
IPSDKBASESHAPESEGMENTATION_API ipsdk::geom::Shape2dPolygonWithHolesPtr createSeparation (const ipUInt64 startPointIndex, const ipUInt64 endPointIndex, ipsdk::geom::Shape2dPolygonWithHoles &polygonWithHoles)
 function allowing to separate a polygon into two sub polygons More...
 
IPSDKBASESHAPESEGMENTATION_API bool hasAlignedPoints (const ipsdk::geom::Shape2dPolygon &polygon)
 function allowing to check whether a polygon contains aligned points
 
IPSDKBASESHAPESEGMENTATION_API bool hasAlignedPoints (const ipsdk::geom::Shape2dPolygonWithHoles &polygonWithHoles)
 function allowing to check whether a polygon contains aligned points
 
IPSDKBASESHAPESEGMENTATION_API void removeAlignedPoints (ipsdk::geom::Shape2dPolygon &polygon)
 function allowing to remove consecutive aligned points from polygon
 
IPSDKBASESHAPESEGMENTATION_API void removeAlignedPoints (ipsdk::geom::Shape2dPolygonWithHoles &polygonWithHoles)
 function allowing to remove consecutive aligned points from polygon
 

Detailed Description

Namespace aggregating basic shape segmentation components.

Typedef Documentation

◆ PolygonPointInfoMap

map associating point coordinates to polygon point informations

Note
a point can be shared by a polygon and one of its holes

Enumeration Type Documentation

◆ eSkeleton2dHolesPolicy

Enumerate describing polygon holes processing policy used during skeleton 2d computation.

Note
This object is associated to a strong enumerate definition
See also
IPSDK_Enum
Enumerator
eSHP_Ignored 

Polygon holes will simply be ignored during processing.

eSHP_ExtractedButNotAnalyzed 

Polygon holes will be taken into account during processing.

but associated sub skeletons will not be analyzed

eSHP_ExtractedAndAnalyzed 

Polygon holes will be taken into account during processing.

and associated sub skeletons will not be analyzed

◆ eIPSDKBaseShapeSegmentationMessage

Enumerate describing messages.

Note
This enumerate is associated to a message map
See also
IPSDK_Message_Map

◆ eSegmentation2dMessage

Enumerate describing messages.

Note
This enumerate is associated to a message map
See also
IPSDK_Message_Map
Enumerator
eInvalidSeparationIdx 

Separation point start index d should be lower than separation point end index s.

eNulPolygonWithHolesPtr 

Input polygon with holes shared pointer should not be null.

eOutOfBoundsSeparationIdx 

Separation point index point index d is out of bounds for point collection with size d.

eSkeletonFailed 

Failed to create skeleton associated to polygon
s.

Function Documentation

◆ detectSelfIntersectingPoint()

IPSDKBASESHAPESEGMENTATION_API bool ipsdk::shape::segmentation::detectSelfIntersectingPoint ( const ipsdk::geom::Shape2dPolygon polygon,
ipUInt32 firstPointIndex,
ipUInt32 secondPointIndex 
)

function allowing to detect first self intersecting points into a polygon

Returns
false if no intersection have been found

◆ extractLocalPointInfo()

IPSDKBASESHAPESEGMENTATION_API void ipsdk::shape::segmentation::extractLocalPointInfo ( const ipsdk::geom::Shape2dPolygonWithHolesPtr pPolygon,
PolygonPointInfoMap polygonPointInfoMap 
)

function allowing to extract local informations around polygon points

Note
Angle associated to interior polygon are reversed, ie negative for convex points and positive for concave (material is outside)

◆ normalize()

IPSDKBASESHAPESEGMENTATION_API void ipsdk::shape::segmentation::normalize ( ipsdk::geom::Shape2dPolygonWithHoles polygonWithHoles)

function allowing to normalize a polygon to ensure that :

  • hole points are covered by parent polygon (interior or boundary)
  • hole and parent polygon do not share parts of segment with non null length
  • hole and parent boundaries can share a point only if this is a point belonging to both point collections (hole point cannot be interior to a parent polygon boundary segment)
  • polygon (and sub polygons) point collection do not contains consecutive aligned points

◆ createSeparation()

IPSDKBASESHAPESEGMENTATION_API ipsdk::geom::Shape2dPolygonWithHolesPtr ipsdk::shape::segmentation::createSeparation ( const ipUInt64  startPointIndex,
const ipUInt64  endPointIndex,
ipsdk::geom::Shape2dPolygonWithHoles polygonWithHoles 
)

function allowing to separate a polygon into two sub polygons

Note
input polygon is modified
Returns
newly created polygon
Exceptions
ipsdk::shape::segmentation::IPSDKBaseShapeSegmentationExceptionif startPointIndex >= endPointIndex
ipsdk::shape::segmentation::IPSDKBaseShapeSegmentationExceptionif endPointIndex >= polygonWithHoles.getNbExteriorPoints()