OctreeContext

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

OctreeContext

Return to chapter overview

C++ C++ Java Java .NET .NET

Summary

 

The IOctreeContext (C++) and hdrcOctreeContext (Java/.NET) ...

 

oApplyAsColorizationMap
oDecRef (C++)
oFindPath (Java ) ?
oGetColorizationMap
oGetID
oGetSegmentationMap
oGetSegmented (Java)
oIncRef (C++)
oIsSegmented
oReleaseSessionResources
oSetActiveTransferFunctionIndex (Java)
oSetColorizationActiveIndex
oSetColorizationColors
oSetColorizationEnabled
oSetColorizationMap
oSetSegmentationMap
oSetSegmented
oUpdate

 

 

Methods

 

IOctreeContext::ApplyAsColorizationMap()

C++

#MERGE Merge/hdvr_cpp_x.html

MISSING DOXYGEN

hdrcOctreeContext.applyAsColorizationMap()

Java/.NET

int com.fovia.hdrc.hdrcOctreeContext.applyAsColorizationMap ( hdrcVolumeDataContext  pDataToApply,
boolean  bNormalizeValues,
int  minValue,
int  maxValue 
)

Placeholder for ()

 

IOctreeContext::DecRef()

C++

virtual signed int IOctreeContext::DecRef ( )
pure virtual

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

Implements IRoot.

 

hdrcOctreeContext.findPath()

Java/.NET

int com.fovia.hdrc.hdrcOctreeContext.findPath ( VECTOR3D  start,
VECTOR3D  finish,
int  min,
int  max,
float  oorp,
float  rg,
int  maxMem,
int  maxTime,
Vector< VECTOR3D path 
) throws IOException

Experimental. Not ready for commercial use.

Parameters
start
finish
min
max
oorp
rg
maxMem
maxTime
path
Returns
Exceptions
IOException

 

IOctreeContext::GetColorizationMap()

C++

virtual signed int IOctreeContext::GetColorizationMap ( DATABYTE ***  pBuffer,
h_int32 *  bufCount,
h_int32 **  bufSizes,
IAllocator pAlloc 
) [pure virtual]

Gets the colorization map that is applied to the dataset and returns it in the variable at address pBuffer. All returned buffers are allocated using pAlloc. Each slice of colorization information is a separate zLib compressed buffer.

See also:
SetColorizationEnabled() for a description of this segmentation technique.
Parameters:
pBufferThe address of a DATABYTE ** that is an array of pointers to zLib compressed colorization information. The array of pointers as well as the actual zLib compressed slice buffers are all allocated using pAlloc.
bufCountThe address of an h_int32 that is the number of DATABYTE * returned into pBuffer.
bufSizesThe address of an array of h_int32 that describe the compressed size of each slice descriptor in pBuffer. This array is allocated using pAlloc
pAllocThe allocator to use for allocating the returned colorization information.

 

hdrcOctreeContext.getColorizationMap()

Java/.NET

byte [][] com.fovia.hdrc.hdrcOctreeContext.getColorizationMap ( )

Placeholder for ()

 

IOctreeContext::GetID()

C++

virtual signed int IOctreeContext::GetID ( h_int64 *  id) [pure virtual]

Returns an integer that represents the server side object that contains the octree.

 

hdrcOctreeContext.getID()

Java/.NET

long com.fovia.hdrc.hdrcOctreeContext.getId ( )

This is the server side representation of the object.

Returns

 

IOctreeContext::GetSegmentationMap()

C++

virtual signed int IOctreeContext::GetSegmentationMap ( DATABYTE **  pBuffer,
h_int64 *  size,
IAllocator pAlloc 
) [pure virtual]

Returns an array that contains a zLib compressed buffer. This buffer, when decompressed, will have one bit for every 2x2x2 subvolume in the volume if the segmentation granularity is SEG_GRAN_2X2X2 or one bit for every voxel in the dataset if the segmentation granularity is SEG_GRAN_1X1X1. In SEG_GRAN_2X2X2, a bit value of 1 will turn off that sub-volume. In SEG_GRAN_2X2X2, that bit will turn off the voxel if it was segmented using bMultiTF=H_FALSE, otherwise it will show the second transfer function.

In SEG_GRAN_2X2X2, the uncompressed buffer will be ((width*height*depth)/(2*2*2))/8 bytes in size. In SEG_GRAN_1X1X1, the uncompressed buffer will be (width*height*depth)/8 bytes in size.

Segmentation types:

If the segmentation granularity is 2x2x2, then the only method of segmentation available is toggling 2x2x2 voxel sub-volumes on and off.

If the segmentation granularity is 1x1x1, any of three segmentation techniques may be applied at once in a single scene:

  • On/Off - When applying segmentations, setting bMultiTF to H_FALSE will turn off 2x2x2 sub-volumes that are completely set to bit value 1. If a 2x2x2 subvolume is partially set to 1, then the parts that are set to 1 will be rendered using the second transfer function. The parts set to 0 are rendered using the first transfer function. Using this, one can apply 1x1x1 on/off segmentation by setting the second transfer function to have identical colors as the first and zero opacity (COLORED_POINT::y2). Alternatively, one could have an opaque second transfer function and the layer between on and off will be displayed using the second transfer function (albeit at 2x2x2 granularity).
  • Two Transfer Functions - When applying segmentations, setting bMultiTF to H_TRUE will apply the second transfer function to all voxels whose segmentation buffer bit is 1. Otherwise, the first transfer function is used. The data values in COLORED_POINT used by the first transfer function are pt.x, pt.y, c and lighting1. The data values in COLORED_POINT used by the second transfer function are pt.x, y2, c2 and lighting2.
  • Colorization - Replaces COLORED_POINT::c and COLORED_POINT::c2 with one of up to 255 different colors. All COLORED_POINTs on the transfer function are replaced by the color specified by the colorization state for that voxel. See SetColorizationEnabled() for more information about this technique.

As mentioned above, all three techniques can be applied simultaneously. For example, imagine a segmentatio of the heart that is as follows: On/Off segmentation is used to remove the ribs, lungs and other unrelated anatomy. Two transfer functions are applied such that the body of the hearth is semi-transparent and the three great vessels of the heart are highly opaque. Colorization is applied such that each of the three vessels are visualized using a different color (which is cross-correlated in some user interface list).

Parameters:
pBufferThe address of the DATABYTE* to receive the buffer.
sizeThe address of an h_int32 to receive the size of the buffer.
pAllocThe allocator to use for creating the buffer

 

hdrcOctreeContext.getSegmentationMap()

Java/.NET

byte [] com.fovia.hdrc.hdrcOctreeContext.getSegmentationMap ( ) throws IOException

Returns a byte array that contains a zLib compressed buffer. This buffer, when decompressed, will have one bit for every 2x2x2 subvolume in the volume. The bit will indicate whether that subvolume will be rendered. The uncompressed buffer will be ((width*height*depth)/(2*2*2))/8 bytes in size.

Returns
byte[] - returns null if an error occurred.
Exceptions
IOExceptionPlaceholder for ()

 

hdrcOctreeContext.getSegmented()

Java/.NET

boolean com.fovia.hdrc.hdrcOctreeContext.getSegmented ( )

Is the octree segmented?

Returns

 

IOctreeContext::IncRef()

C++

virtual signed int IOctreeContext::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.

 

IOctreeContext::IsSegmented()

C++

virtual signed int IOctreeContext::IsSegmented ( h_int32 *  bVal) [pure virtual]

bVal gets H_TRUE if the dataset is segmented, H_FALSE otherwise.

Parameters:
bValGets H_TRUE if the dataset is segmented, H_FALSE otherwise.

 

hdrcOctreeContext.isSegmented()

Java/.NET

boolean com.fovia.hdrc.hdrcOctreeContext.isSegmented ( )

bVal gets H_TRUE if the dataset is segmented, H_FALSE otherwise.

Parameters
bValGets H_TRUE if the dataset is segmented, H_FALSE otherwise.

 

IOctreeContext::ReleaseSessionResources()

C++

virtual signed int IOctreeContext::ReleaseSessionResources ( )
pure virtual

Call this function if you wish to free server resources before disconnecting.

 

hdrcOctreeContext.releaseSessionResources()

Java/.NET

long com.fovia.hdrc.hdrcOctreeContext.releaseSessionResources ( ) throws IOException

Call this if you wish to free up this object on the server before disconnecting.

Returns
long - 0 if successful.
Exceptions
IOException

 

hdrcOctreeContext.setActiveTransferFunctionIndex()

Java/.NET

int com.fovia.hdrc.hdrcOctreeContext.setActiveTransferFunctionIndex ( int  idx) throws IOException

In 8 transfer function mode, this will set the transfer function to which free hand cut and region growing segmentation functions apply.

Parameters
idx
Returns
Exceptions
IOException

 

IOctreeContext::SetColorizationActiveIndex()

C++

virtual signed int IOctreeContext::SetColorizationActiveIndex ( h_int32  idx) [pure virtual]

Sets the current colorization index for free hand cut and region growing segmentation functions. Positive values are indices into the array you pass into SetColorizationColors(). -1 will use the second transfer function instead of these colors.

Parameters:
idxThe current colorization index to use for segmentation.

 

hdrcOctreeContext.setColorizationActiveIndex()

Java/.NET

int com.fovia.hdrc.hdrcOctreeContext.setColorizationActiveIndex ( int  idx) throws IOException

Sets the current colorization index for free hand cut and region growing segmentation functions. Positive values are indices into the array you pass into setColorizationColors(). -1 will use the second transfer function instead of these colors.

Parameters
idx
Returns
Exceptions
IOException

 

IOctreeContext::SetColorizationColors()

C++

virtual signed int IOctreeContext::SetColorizationColors ( h_int32  numColors,
h_int32 *  colors 
) [pure virtual]

Sets an array of colors to use for solid color highlighting. SetColorizationActiveIndex() will choose the color to use in segmentation functions. SetColorizationEnabled() must be set to H_TRUE before calling these functions.

Parameters:
numColorsThe number of colors in the parameter colors.
colorsA array of colors to set for colorization mapping.

 

hdrcOctreeContext.setColorizationColors()

Java/.NET

int com.fovia.hdrc.hdrcOctreeContext.setColorizationColors ( Color  colors[]) throws IOException

Sets an array of colors to use for solid color highlighting. setColorizationActiveIndex() will choose the color to use in segmentation functions. setColorizationEnabled() must be set to true before calling these functions.

Parameters
colors
Returns
Exceptions
IOException

 

IOctreeContext::SetColorizationEnabled()

C++

virtual signed int IOctreeContext::SetColorizationEnabled ( h_int32  val,
IVolumeDataContext vd 
) [pure virtual]

Enables or disables solid color highlighting for this octree/volume data pair. Enabling this feature will consume x*y*z bytes of memory (50% of the dataset size). Note that this technique is only available if the segmentation granularity is set to 1x1x1 using IVolumeSegmentationContext::SetGranularity().

Colorization is a segmentation technique where you can replace ALL of the color values on a transfer function with a single color defined by SetColorizationColors(). This technique can coexist with the two transfer function technique described in GetSegmentationMap(). The colors are all replaced. This includes colors in the first and the second transfer function.

Implementation-wise, the segmentation state for colorization is specified by a single byte per voxel. A byte value of 0 indicates that the colors on the first or second transfer function should be used as is. 1-255 will map into index 0-254 in the array of colors passed into SetColorizationColors(). To avoid requiring large contiguous buffers, each slice has its own segmentation state as a separate buffer. To avoid sending too much data across a TCP/IP channel, each buffer is zLib compressed and may be decompressed by the client using this open library if required.

Parameters:
valH_TRUE if you wish to enable colorization. H_FALSE otherwise.
vdThe volume data that this octree is attached to.

 

hdrcOctreeContext.setColorizationEnabled()

Java/.NET

int com.fovia.hdrc.hdrcOctreeContext.setColorizationEnabled ( boolean  val,
hdrcVolumeDataContext  vd 
) throws IOException

Enables or disables solid color highlighting for this octree/volume data pair. Enabling this feature will consume x*y*z bytes of memory.

Parameters
val
vd
Returns
Exceptions
IOException

 

IOctreeContext::SetColorizationMap()

C++

virtual signed int IOctreeContext::SetColorizationMap ( DATABYTE **  pBuffer,
h_int32 *  bufSize 
) [pure virtual]

Sets the colorization on the dataset to the state contained in pBuffer. pBuffer should be an array of zLib compressed buffers representing the state of a slice per buffer.

See also:
SetColorizationEnabled() for a description of this segmentation technique.
Parameters:
pBufferAn array of pointers to buffers that each contain a zLib compressed buffer representing the state of a slice per buffer.
bufSizeAn array of h_int32 that each describe the length of the buffer for each slice description in pBuffer.

 

hdrcOctreeContext.setColorizationMap()

Java/.NET

int com.fovia.hdrc.hdrcOctreeContext.setColorizationMap ( byte  map[][])

 

IOctreeContext::SetSegmentationMap()

C++

virtual signed int IOctreeContext::SetSegmentationMap ( DATABYTE pBuffer,
h_int64  size 
) [pure virtual]

Applies a segmentation map retreived by either manual creation or GetSegmentationMap() to the dataset. See GetSegmentationMap() for details about this buffer. Note that the behavior of this function is undefined for a target dataset that is of different dimensions than the source.

Parameters:
pBufferThe zLib compressed buffer to use for segmenting this dataset.
sizeThe size of pBuffer in bytes.
virtual signed int IOctreeContext::SetSegmentationMapEx ( DATABYTE pBuffer,
h_int64  size,
h_int32  bMultiTF 
) [pure virtual]

See GetSegmentationMap for more details.

Parameters:
pBufferThe zLib compressed buffer to use for segmenting this dataset.
sizeThe size of pBuffer in bytes.
bMultiTFH_TRUE if we're segmenting for two transfer functions, H_FALSE if we're segmenting for on/off segmentation.

 

hdrcOctreeContext.setSegmentationMap()

Java/.NET

int com.fovia.hdrc.hdrcOctreeContext.setSegmentationMap ( byte  map[],
boolean  bMultiTF 
) throws IOException

Applies the specified segmentation to the data set. Note that the segmentation should be in the same granularity as the current granularity of segmentation on this data. The granularity is set by spawning an hdrcIVolumeSegmentation from this data set.

Parameters
map
bMultiTF
Returns
Exceptions
IOException

References com.fovia.hdrc.hdrcOctreeContext.setSegmentationMap().

int com.fovia.hdrc.hdrcOctreeContext.setSegmentationMap ( byte  map[]) throws IOException

See getSegmentationMap for more details.

Parameters
mapbyte[]
Returns
int - Values less than 0 indicate an error.
Exceptions
IOException

Referenced by com.fovia.hdrc.interact.hdrcUndoSegmentationChange.redo(), com.fovia.hdrc.hdrcOctreeContext.setSegmentationMap(), and com.fovia.hdrc.interact.hdrcUndoSegmentationChange.undo().

 

IOctreeContext::SetSegmented()

C++

virtual signed int IOctreeContext::SetSegmented ( h_int32  bVal) [pure virtual]

Used for bookkeeping on segmentation state. Since segmentation can use a decent chunk of memory, it's nice to know when we really have to persist it.

Parameters:
bValH_TRUE if the volume has been segmented, H_FALSE otherwise.

 

hdrcOctreeContext.setSegmented()

Java/.NET

void com.fovia.hdrc.hdrcOctreeContext.setSegmented ( boolean  bVal)

Used for bookkeeping on segmentation state. Since segmentation can use a decent chunk of memory, it's nice to know when we really have to persist it.

Parameters
bVal

 

IOctreeContext::Update()

C++

virtual signed int IOctreeContext::Update ( h_int32  mode,
CROP_BOX_PARAMS cbp 
) [pure virtual]

Update the octree after any operation that makes it invalid. The supported modes are indicated in the ENUM_UPDATE_MODE. The server will ignore the crop box as of now

Parameters:
modeA octree update mode to indicate how the octree should be regenerated, as indicated in the ENUM_UPDATE_MODE
cbpIndicate crop box params to update octree for only for a certain section. Currently this is not supported

 

hdrcOctreeContext.update()

Java/.NET

int com.fovia.hdrc.hdrcOctreeContext.update ( int  mode,
CROP_BOX_PARAMS  cbp 
)

Update the octree after any operation that makes it invalid. The supported modes are indicated in the ENUM_UPDATE_MODE. The server will ignore the crop box as of now

Parameters
modeA octree update mode to indicate how the octree should be regenerated, as indicated in the ENUM_UPDATE_MODE
cbpIndicate crop box params to update octree for only for a certain section. Currently this is not supported
labelMaskIf UPDATE_MODE_CLEAR_BY_MASK modes is selected, this allows the specification of a bitmask to indicate which segmentation labels are to be cleared.

 

 

Doxygen Links

 

Complete details of member variables and class names are available in the source level documentation available from these links to Doxygen.

 

C++

IOctreeContext

Java / .NET

hdrcOctreeContext