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

Public Member Functions

virtual signed int ApplyAsColorizationMap (IVolumeData *pDataToApply, signed int bNormalizeValues, signed int minValue, signed int maxValue)=0
 
virtual signed int AskInterface (const BGUID *piid, IRoot **ppr)=0
 
virtual signed int CreateColorizationMap (DATABYTE ***pDest, IAllocator *pAlloc)=0
 
virtual signed int DecRef ()=0
 
virtual signed int GetColorizationActiveIndex (signed int *idx)=0
 
virtual signed int GetColorizationMap (DATABYTE ***pBuffer)=0
 
virtual signed int GetMaximumPixelValue (signed int *pValue)=0
 
virtual signed int GetMinimumPixelValue (signed int *pValue)=0
 
virtual signed int GetOctreeHandle (void **)=0
 
virtual signed int GetSegmentationMap (DATABYTE *pBuffer)=0
 
virtual signed int GetSegmentationMapSize (signed long long *pSizeInBytes)=0
 
virtual signed int GetVolumeData (IVolumeData **vd)=0
 
virtual signed int IncRef ()=0
 
virtual signed int LoadSegStateFromGIPL (char *fileName)=0
 
virtual signed int OrLabels (signed int inIndex1, signed int inIndex2, signed int outIndex)=0
 
virtual signed int SaveSegStateAsGIPL (char *fileName)=0
 
virtual signed int SetColorizationActiveIndex (signed int idx)=0
 
virtual signed int SetColorizationColors (signed int numColors, signed int *colors)=0
 
virtual signed int SetColorizationMap (DATABYTE **pBuffer)=0
 
virtual signed int SetColorizationMapEx (DATABYTE **pBuffer, signed int bOwnData)=0
 
virtual signed int SetSegmentationMap (DATABYTE *pBuffer)=0
 
virtual signed int SetSegmentationMapEx (DATABYTE *pBuffer, signed int bMultiTF)=0
 
virtual signed int SetSegmentationMapFlags (ENUM_SEGMENTATION_MAP_FLAGS flags)=0
 
virtual signed int SetVolumeData (IVolumeData *vd)=0
 
virtual signed int SetVolumeDataEx (IVolumeData *vd, ENUM_SMOOTH_PARAM smoothType)=0
 
virtual signed int SetVolumeDataEx2 (IVolumeData *vd, ENUM_OCTREE_MEMORY_MODE mode, ENUM_SMOOTH_PARAM smoothType)=0
 
virtual signed int Update (ENUM_UPDATE_MODE mode, CROP_BOX_PARAMS *cbp, unsigned int labelMask=0xff)=0
 
virtual signed int UpdateEx (ENUM_UPDATE_MODE mode, SegMapSpeedup *pSpeedup, unsigned int Reserved)=0
 
- Public Member Functions inherited from IRoot
template<class T >
signed int AskInterface (T **pp)
 

Detailed Description

The IVolumeOctree interface represents a supplemental data structure required for rendering in all but the Thin MIP/MPR rendering engine.

Member Function Documentation

virtual signed int IVolumeOctree::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 IVolumeOctree::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 IVolumeOctree::GetColorizationActiveIndex ( signed int *  idx)
pure virtual

Gets the current index to apply colorization.

virtual signed int IVolumeOctree::GetColorizationMap ( DATABYTE ***  pBuffer)
pure virtual

Gets the colorization map set in SetColorizationMap()

virtual signed int IVolumeOctree::GetMaximumPixelValue ( signed int *  pValue)
pure virtual

Puts the maximum pixel value contained in the dataset this octree is built from in pValue.

Parameters
pValueGets the maximum pixel value in the dataset this octree is built from.
virtual signed int IVolumeOctree::GetMinimumPixelValue ( signed int *  pValue)
pure virtual

Puts the minimum pixel value contained in the dataset this octree is built from in pValue.

Parameters
pValueGets the minimum pixel value in the dataset this octree is built from.
virtual signed int IVolumeOctree::GetOctreeHandle ( void **  )
pure virtual

For internal use only. Do not call this function.

virtual signed int IVolumeOctree::GetSegmentationMap ( DATABYTE pBuffer)
pure virtual

Fills pBuffer with the current state of segmentation. Use GetSegmentationMapSize to determine the size of buffer needed for the map. In 2x2x2 segmentation, one bit is needed for each 2x2x2 subvolume in the data set. In 1x1x1 segmentation, one bit is needed for each voxel in the data set. The bits are laid out in a manner consistent with the layout of the voxel data.

2x2x2 subvolume (x,y,z) = (x/2) + ((y*width)/2) + ((z*width*height)/2)

1x1x1 voxel (x,y,z) = x + y*width + z*width*height

This information can be used to implement an undo/redo system for segmentation. Note that the buffers returned are quite large, but compress incredibly well. It is reccomended that you compress the data that is returned when not using it.

Parameters
pBufferPreallocated buffer to fill.
virtual signed int IVolumeOctree::GetSegmentationMapSize ( signed long long *  pSizeInBytes)
pure virtual

Returns the required size of the segmentation map buffer in bytes.

Parameters
pSizeInBytesAddress of variable to receive size.
virtual signed int IVolumeOctree::GetVolumeData ( IVolumeData **  vd)
pure virtual

Get volume data interface associated with this object (or NULL if there isn't one).

Parameters
vdpointer to an IVolumeData pointer that will receive the location of our IVolumeData.
virtual signed int IVolumeOctree::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 IVolumeOctree::LoadSegStateFromGIPL ( char *  fileName)
pure virtual

Load the segmentation State from a .gipl format file (only supports 8TF builds)

Parameters
fileNameFile Name with Path on Server (or local machine for In-Proc).
virtual signed int IVolumeOctree::OrLabels ( signed int  inIndex1,
signed int  inIndex2,
signed int  outIndex 
)
pure virtual

Or's two labels together.This is a way to do "additive" segmentation with a working label and a cummulative label.

Parameters
inIndex1first label to Or.
inIndex2second label to Or.
outIndexlable ot place the reults (can overlap either inIndex).
virtual signed int IVolumeOctree::SaveSegStateAsGIPL ( char *  fileName)
pure virtual

Save the segmentation state to a .gipl format file (only supports 8TF builds)

Parameters
fileNameFile Name with Path on Server (or local machine for In-Proc).
virtual signed int IVolumeOctree::SetColorizationActiveIndex ( signed int  idx)
pure virtual

Sets the current index to apply colorization when doing free hand cut and region growing segmentation. A value of -1 will use the second transfer function rather than this type of color highlighting.

virtual signed int IVolumeOctree::SetColorizationColors ( signed int  numColors,
signed int *  colors 
)
pure virtual

Sets the colors to apply for color highlighting. The index into the array is the same index used in SetColorizationIndex and is also the actual data value in the buffers in the SetColorizationMap() buffers.

virtual signed int IVolumeOctree::SetColorizationMap ( DATABYTE **  pBuffer)
pure virtual

Sets a solid color map for segmenting the data in up to 255 different states.

Parameters
pBufferArray of pointers to buffers representing the segmentation state of each slice. Each buffer should be x*y bytes in length and should be allocated using the default library allocator (see ILibrary to retrieve this object).
virtual signed int IVolumeOctree::SetSegmentationMap ( DATABYTE pBuffer)
pure virtual

Sets the state of segmentation. See GetSegmentationMap for more details. If you're using multi transfer function visualization, you'll need to call SetSegmentationMapEx to specify what mode you're in.

Parameters
pBufferBuffer to assign.
virtual signed int IVolumeOctree::SetSegmentationMapEx ( DATABYTE pBuffer,
signed int  bMultiTF 
)
pure virtual

Just like SetSegmentationMap, except you can specify that you're in two transfer function mode. If this mode is not set, only the thin layer between the on and off portions of the data set will have the appearance of the second transfer function.

Parameters
pBufferBuffer to assign
bMultiTFZero if false, one if true.
virtual signed int IVolumeOctree::SetSegmentationMapFlags ( ENUM_SEGMENTATION_MAP_FLAGS  flags)
pure virtual

Reserved for future use

virtual signed int IVolumeOctree::SetVolumeData ( IVolumeData vd)
pure virtual

Attaches this octree to the specified volume data. See the SetVolumeDataEx for more details.

virtual signed int IVolumeOctree::SetVolumeDataEx ( IVolumeData vd,
ENUM_SMOOTH_PARAM  smoothType 
)
pure virtual

Attaches this octree to the specified volume data. For more natural gradients in 3D rendering modes, it is reccomended that you smooth the data set. The smoothType parameter specifies what type of smoothing to perform. Tri-linear is what SetVolumeData defaults to. Tri-cubic is the most accurate, but takes significantly longer than Tri-linear. None will ensure that the input data is not modified.

Parameters
vdThe volume data.
smoothTypeThe type of smoothing to apply.
virtual signed int IVolumeOctree::SetVolumeDataEx2 ( IVolumeData vd,
ENUM_OCTREE_MEMORY_MODE  mode,
ENUM_SMOOTH_PARAM  smoothType 
)
pure virtual
Deprecated:
Additional function that exposes the deprecated parameter for memory saving. In the past, this provided faster segmentation at the cost of more memory usage. Now, the memory usage is the lower amount and the performance is still fast, so this call is unnecessary and should be considered deprecated.
virtual signed int IVolumeOctree::Update ( ENUM_UPDATE_MODE  mode,
CROP_BOX_PARAMS cbp,
unsigned int  labelMask = 0xff 
)
pure virtual

Update octree data after segmentation. Note that there are very few situations where you would need to call this explicitly. Most segmentation functions will call it automatically.

Parameters
modeThe type of update to perform.
cbpSpecifies what subset of the octree to rebuild. Note that this in not currently supported.
virtual signed int IVolumeOctree::UpdateEx ( ENUM_UPDATE_MODE  mode,
SegMapSpeedup *  pSpeedup,
unsigned int  Reserved 
)
pure virtual

Reserved for future use