Fovia C++ In-Process API
Public Member Functions | List of all members
IVolumeSegmentation Struct Referenceabstract
Inheritance diagram for IVolumeSegmentation:
IRoot

Public Member Functions

virtual signed int AskInterface (const BGUID *piid, IRoot **ppr)=0
 
virtual signed int AssessRangeFromPointArray (double *assessedRange, VECTOR3D *arrPoints, unsigned int numPoints)=0
 
virtual signed int CancelFindPath ()=0
 
virtual signed int CancelSegment ()=0
 
virtual signed int Clear ()=0
 
virtual signed int ClearByMask (signed int labelMask)=0
 
virtual signed int ClearEx (signed int bMultiTF, signed int bNocesOnly)=0
 
virtual signed int Crop (CROP_BOX_PARAMS cbp)=0
 
virtual signed int DecRef ()=0
 
virtual signed int DisableCustomKernel ()=0
 
virtual signed int EnableCustomKernel (char *dll_path, int size, void *paramsPtr)=0
 
virtual signed int FindPath (IRenderEngine *pEngine, VECTOR3D **arrPath, unsigned int *numPathSteps, VECTOR3D *pStart, VECTOR3D *pFinish, FIND_PATH_PARAMS *pParams, IAllocator *pAlloc)=0
 
virtual signed int FreeHandCut (IRenderEngine *pEngine, signed int numPoints, POINT *arrPoints, int ppWidth, int ppHeight)=0
 
virtual signed int GetLastSegmentSize (signed long long *sizeVoxels, double *sizeMMs)=0
 
virtual signed int GetSegmentationParams (SEGMENTATION_PARAMS *sp)=0
 
virtual signed int GetVolumeData (IVolumeOctree **octree)=0
 
virtual signed int IncRef ()=0
 
virtual signed int Invert ()=0
 
virtual signed int InvertEx (signed int bMultiTF)=0
 
virtual signed int SculptCircularBevel (unsigned char valueToSet, VECTOR3D *loc, VECTOR3D *axis, unsigned int numOffsets, double *offsets, double *radii, SegMapSpeedup *sms)=0
 
virtual signed int Segment (VERTEX3D vtx, signed int Min, signed int Max)=0
 
virtual signed int SetErosionDilationIndex (signed int index)=0
 
virtual signed int SetFreeHandCutMode (IRenderEngine *pEngine, ENUM_FHC_MODE mode)=0
 
virtual signed int SetGranularity (ENUM_SEGMENTATION_GRANULARITY gran)=0
 
virtual signed int SetSegmentationParams (SEGMENTATION_PARAMS *sp)=0
 
virtual signed int SetVolumeData (IVolumeOctree *octree)=0
 
virtual signed int UpdateCustomKernelParams (int size, void *newParamsPtr)=0
 
- Public Member Functions inherited from IRoot
template<class T >
signed int AskInterface (T **pp)
 

Detailed Description

The IVolumeSegmentation interface has utilities for segmenting a volume.

Member Function Documentation

virtual signed int IVolumeSegmentation::AskInterface ( const BGUID piid,
IRoot **  ppr 
)
pure virtual

Queries this object to see if the interface piid is supported and returns the result in ppr.

Parameters
piidThe BGUID of the requested interface.
pprThe address of an IRoot pointer which will receive the new interface.
Returns
S_OK if the interface is supported. E_FAIL if it is not.

Implements IRoot.

virtual signed int IVolumeSegmentation::CancelFindPath ( )
pure virtual

Attempts to cancel a FindPath() operation. If the FindPath does not successfully cancel within 500ms, it is hung and E_FAIL is returned. Note that if the FindPath() operation failed due to invalid parameters or some other internal failure, you will get E_FAIL from this procedure. As a reminder, failure to find a path is a success state and not a failure, so this function will return S_OK immediately in that case.

Returns
S_OK if the FindPath() operation is cancelled. E_FAIL if the FindPath() operation didn't successfully cancel within 500ms.
virtual signed int IVolumeSegmentation::Clear ( )
pure virtual

Reset all segmentation, returning the volume to a fully visible state. See ClearEx() for a more complete function.

virtual signed int IVolumeSegmentation::ClearByMask ( signed int  labelMask)
pure virtual

Clears all segmentation information masked by which labels to clear.

Parameters
labelMaskbit mask of which of the 8TF's to clear
virtual signed int IVolumeSegmentation::ClearEx ( signed int  bMultiTF,
signed int  bNocesOnly 
)
pure virtual

Clears all segmentation information and returns the volume to it's initial state.

Parameters
bMultiTFAre we in multi transfer function mode? If so, set this to true. If we're just looking at on/off segmentation, set this to false.
bNocesOnlyWhen moving from 1x1x1 on/off to multi transfer function mode, we can set this to true so that the segmentation is preserved in the change.
virtual signed int IVolumeSegmentation::Crop ( CROP_BOX_PARAMS  cbp)
pure virtual

Segment the data via a crop box. Not currently imlpemented. You may do this in real time using RENDER_PARAMS::CropBox.

Parameters
cbpStructure defining a box in the volume.
virtual signed int IVolumeSegmentation::DecRef ( )
pure virtual

Decreases the reference count on this object by 1. If the reference count reaches 0, the object is deallocated.

Implements IRoot.

virtual signed int IVolumeSegmentation::DisableCustomKernel ( )
pure virtual

Turns off the custom segmentation

virtual signed int IVolumeSegmentation::EnableCustomKernel ( char *  dll_path,
int  size,
void *  paramsPtr 
)
pure virtual

Enable the custom segmentation by pointing to a dll with the proper interface

Parameters
dll_pathwhich is the dll which will be actively loaded
sizewhich is the size of the data in the params ptr
paramsPtrwhich is pointer to the data buffer of actually params
virtual signed int IVolumeSegmentation::FindPath ( IRenderEngine pEngine,
VECTOR3D **  arrPath,
unsigned int *  numPathSteps,
VECTOR3D pStart,
VECTOR3D pFinish,
FIND_PATH_PARAMS pParams,
IAllocator pAlloc 
)
pure virtual

Attempts to find a path between two points in the volume using either static or dynamic upper and lower thresholds for determining the pathway.

Parameters
pEngineThe render engine to use for the path finding routine. Best performance is achieved if the engine is not constantly created/destroyed between calls or used for other purposes.
arrPathIf the operation succeeded, this will get the address of a buffer containing the result of the path find operation. The buffer will be allocated using pAlloc. If the operation failed, this parameter is untouched.
numPathStepsThe address of an integer that will get the number of elements in the resultant path buffer arrPath.
pStartThe start point for the path finding routine. Must be non-NULL.
pFinishThe finish point for the path finding routine. Must be non-NULL.
pParamsThe parameters for the path finding routine. If NULL, the values set in the default constructor for FIND_PATH_PARAMS are used. See the FIND_PATH_PARAMS description for details on each of the parameters.
pAllocThe allocator to use when allocating the resultant path arrPath. Must be non-NULL.
Returns
S_OK if a path was found. S_FALSE if a path was not found (MaxSteps taken without success). E_INVALIDARG, E_FAIL and E_OUTOFMEMORY are also possible.
virtual signed int IVolumeSegmentation::FreeHandCut ( IRenderEngine pEngine,
signed int  numPoints,
POINT arrPoints,
int  ppWidth,
int  ppHeight 
)
pure virtual

Cut a section of the data using a polygon specified by the POINT array. Call SetSegmentationParams to specify the type of free hand cut to apply.

Parameters
pEngineThe engine that is using the data set we're cutting.
numPointsNumber of points in our selection polygon.
arrPointsPoints in the polygon.
ppWidthwidth in pixels of the projection plane.
ppHeightheight in pixels of the projection plane.
virtual signed int IVolumeSegmentation::GetLastSegmentSize ( signed long long *  sizeVoxels,
double *  sizeMMs 
)
pure virtual

Get the two size of the result of the last call to segmentation.

virtual signed int IVolumeSegmentation::GetSegmentationParams ( SEGMENTATION_PARAMS sp)
pure virtual

Get the current params.

Parameters
spStructure to receive the params.
virtual signed int IVolumeSegmentation::IncRef ( )
pure virtual

Increases the reference count on this object by 1. You do not need to call this after an object is first created. It is 1 by default.

Implements IRoot.

virtual signed int IVolumeSegmentation::Invert ( )
pure virtual

Invert the segmentation. All voxels that were hidden will be visible, and all voxels that were visible will be hidden. See InvertEx() for a more complete implementation.

virtual signed int IVolumeSegmentation::InvertEx ( signed int  bMultiTF)
pure virtual

Inverts the current segmentation. Everything that was hidden will be restored and everything that was present will be hidden.

Parameters
bMultiTFSet this to true if you're doing multi transfer function rendering.
virtual signed int IVolumeSegmentation::Segment ( VERTEX3D  vtx,
signed int  Min,
signed int  Max 
)
pure virtual

Fire off a segmentation. Note that vtx, Min and Max are most easily obtained via the IRenderEngine::ShootRay() function.

Parameters
vtxThe 3D coordinate in the volume to begin the growing algorithm.
MinThe minimum HU+1024 to consider connected.
MaxThe maximem HU+1024 to consider connected.
virtual signed int IVolumeSegmentation::SetErosionDilationIndex ( signed int  index)
pure virtual

Sets the index lable that erode/dilate will use (default is to Dilate to currentActiveIndex and Erode to 0).

Parameters
indexSet this to EROSION_DILATION_CLASSIC to return to default action.
virtual signed int IVolumeSegmentation::SetFreeHandCutMode ( IRenderEngine pEngine,
ENUM_FHC_MODE  mode 
)
pure virtual

Sets the free hand cut mode. See FHC_* in sharedstructs.h for possible values.

Parameters
pEngineThe IRenderEngine interface pointer that created this object.
mode
virtual signed int IVolumeSegmentation::SetGranularity ( ENUM_SEGMENTATION_GRANULARITY  gran)
pure virtual

Sets the segmentation granularity. See SEG_GRAN_* in sharedstructs.h for possible values.

virtual signed int IVolumeSegmentation::SetSegmentationParams ( SEGMENTATION_PARAMS sp)
pure virtual

Set the params. These params will be considered when you call the other functions in this interface.

Parameters
spStructure describing the state this object should assume.
virtual signed int IVolumeSegmentation::SetVolumeData ( IVolumeOctree octree)
pure virtual

Attach volume data to this object. Must be called before calling any other IVolumeSegmentation calls.

Parameters
octreeA valid octree for the volume to segment.
virtual signed int IVolumeSegmentation::UpdateCustomKernelParams ( int  size,
void *  newParamsPtr 
)
pure virtual

Update the custom kernel segmentation parameters for the next segmetnatoin call

Parameters
sizewhich is the size of the data in the params ptr must match the initial size in the EnableCustomKernel call
newParamsPtrwhich is pointer to the data buffer of actually params