Constructor for the VolumeSegmentationContext
Unique segmentation context ID.
Unload the Custom Kenrel DLL and free any memory associated with it.
This is an asynchronous method that returns a Promise as follows:
Promise .then() .catch (err: ReturnCode )
callbackFunc(err: ReturnCode )
Clears the segmentation state for one ore more label volumes.
bit mask indicating which labels to clear (e.g. 0x01 will only clear label 0, 0x02 will only clear label 1, and 0xff will clear all 8 labels).
This is an asynchronous method that returns a Promise as follows:
Promise .then() .catch (err: ReturnCode )
callbackFunc(err: ReturnCode )
Take a 3D Transfer Function and make it all a solid color (useful for visualizing the results of segmentation).
renderEngine to change the TFs of.
which Label TF to use as the shape of the TF.
which Label TF to set.
Color to use.
This is an asynchronous method that returns a Promise as follows:
Promise .then() .catch (err: ReturnCode )
callbackFunc(err: ReturnCode )
Combine two labels into one using a voxel-wise OR operation.
first label to combine.
second label to combine.
label to place the reult in (note it can be the same as one of the input labels).
This is an asynchronous method that returns a Promise as follows:
Promise .then() .catch (err: ReturnCode )
callbackFunc(err: ReturnCode )
Copy one label to another.
label to copy from.
label to copy to.
This is an asynchronous method that returns a Promise as follows:
Promise .then() .catch (err: ReturnCode )
callbackFunc(err: ReturnCode )
Expands a segmented region by adding layers to the exterior surface.
Index of which label to segment into.
Index of which label to dilate.
Origin point inside the one connected component to dilate. Note: the "closest surface to this point will be dilated even if it is a "hole" inside an object and not the object "outside" surface.
number of layers to add to the outside
This is an asynchronous method that returns a Promise as follows:
Promise .then() .catch (err: ReturnCode )
callbackFunc(err: ReturnCode )
Enables Interactive Segmentation. Specifically setup the render engines that will be rendering the results so that TF can be adjusted for subtractive and other things. As well as set flag for some things that happen automatically inside (e.g. make the working label the same TF as the seg Label).
render engines that are used with this segmentation operation
This is an asynchronous method that returns a Promise as follows:
Promise .then() .catch (err: ReturnCode )
callbackFunc(err: ReturnCode )
Contracts a segmented region by removing layers from the exterior surface.
Index of which Label to segment into.
Index of which Label to erode.
Origin point inside the one connected component to erode. Note: the "closest surface to this point will be dilated even if it is a "hole" inside an object and not the object "outside" surface.
number of layers to take off from the outside.
This is an asynchronous method that returns a Promise as follows:
Promise .then() .catch (err: ReturnCode )
callbackFunc(err: ReturnCode )
Cut a section of the data using a polygon specified by the POINT array in screen space.
The render engine used to render the image used as the basis for the freeHandCut operation.
array of Point objects defining the region to cut.
The mode to use when performing the cut operation. This defines how deeply the cut penetrates the volume.
Index of which Label to segment into.
The width of the image used for gathering the points.
The height of the image used for gathering the points.
This is an asynchronous method that returns a Promise as follows:
Promise .then() .catch (err: ReturnCode )
callbackFunc(err: ReturnCode )
Return the OctreeContext associated with this object.
OctreeContext associated with this object.
Return the segmentation context ID associated with this object.
segmentation context ID associated with this object.
Initializes the class. This function must be called before other class functions can be used.
This is an asynchronous method that returns a Promise as follows:
Promise .then() .catch (err: ReturnCode )
callbackFunc(err: ReturnCode )
End the current "cycle", the last segmentation is dropped and the persistent segmentation state remains unaltered from this cycle.
This is an asynchronous method that returns a Promise as follows:
Promise .then() .catch (err: ReturnCode )
callbackFunc(err: ReturnCode )
End the current "cycle", the last segmentation from working label is "or"-ed over to the target label.
This is an asynchronous method that returns a Promise as follows:
Promise .then() .catch (err: ReturnCode )
callbackFunc(err: ReturnCode )
Start an interactive segmentation "cycle" (Cycle is defined as a sequence of segments where the use adjusts the parameters to get some desired segmentation that is kept only on "End" without "Escape"). The working label is used for these intermittent segmentations.
Initial parameters for the segmentation operation.
This is an asynchronous method that returns a Promise as follows:
Promise .then(data) .catch (err: ReturnCode )
callbackFunc(err: ReturnCode , data)
data.sizeVoxels - The size of the segmented region (in voxels).
data.sizeMMs - The size of the segmented region (in cubic millimeters).
During a "cycle", this is called for each subsequent segment with new parameters into the working label.
Parameters for the segmentation operation.
This is an asynchronous method that returns a Promise as follows:
Promise .then(data) .catch (err: ReturnCode )
callbackFunc(err: ReturnCode , data)
data.sizeVoxels - The size of the segmented region (in voxels).
data.sizeMMs - The size of the segmented region (in cubic millimeters).
The custom Kernel DLL is loaded at runtime since it is unkown at compile time. Also a buffer for and parameters which will be used is allocated (so we an later copy new parameters in, a copy is kept here locally in case the client is remote). Parameters can be updated in SegmentationParameters for subsequent segmentation calls.
When using a custom kernel, only the min, max, radius, and customKernelParamArray values in the SegmentationParameters object are used.
The fully (or relative) qualifed pathto the dll file including extension.
Segmenataion paramaters to use. For custom kernels, only the min, max, radius, and customKernelParamArray values are used.
This is an asynchronous method that returns a Promise as follows:
Promise .then() .catch (err: ReturnCode )
callbackFunc(err: ReturnCode )
Load the label Volume (segmentation state) from disk .gipl format on the server.
File name (either fully qualifed or relative. Also with extension) to load (from server).
This is an asynchronous method that returns a Promise as follows:
Promise .then() .catch (err: ReturnCode )
callbackFunc(err: ReturnCode )
Fill in the upper TF's with colorized version of the window/level function.
RenderEngine to change the TFs.
Window width in volume values as stored in the file (e.g. for CT, the HU values are converted using DICOM rescale intercept and scale).
Window level in volume values as stroed in the file (e.g. for CT, the HU values are converted using DICOM rescale intercept and scale).
This is an asynchronous method that returns a Promise as follows:
Promise .then() .catch (err: ReturnCode )
callbackFunc(err: ReturnCode )
Fill in the upper TF's with colorized version of the main transfer function at label volume 0.
RenderEngine to change the TFs of.
This is an asynchronous method that returns a Promise as follows:
Promise .then() .catch (err: ReturnCode )
callbackFunc(err: ReturnCode )
To display segmentation on 2D Thin display we utilize a fully opaque TF with a Parallel render instead of MPR render Type. This function will create that TF. for unsegmented data use (0,0,0) to (255,255,255) to get a TF whihc looks a a W/L display on a normal MPR 2D display. It is suggested for the segmented labels to use (r/2,g/2,b/2) to (r,g,b) for a given color for that label because then you will still see the different shades of the 2D image below the color.
RenderEngine to change the TFs of.
Ehich Label TF to set.
Window width in volume values as stored in the file (e.g. for CT, the HU values are converted using DICOM rescale intercept and scale).
Window Level in volume values as stroed in the file (e.g. for CT, the HU values are converted using DICOM rescale intercept and scale).
Color to use for the minimum window value.
Color to use for the maximum window value.
This is an asynchronous method that returns a Promise as follows:
Promise .then() .catch (err: ReturnCode )
callbackFunc(err: ReturnCode )
Private method for printing the supplied segmentation state from the native code. This is used only for internal debugging purposes
specifies the parameters that should be printed to the log.
This is a synchronous method that returns void immediately upon emitted the event.
Releases server side resources assoicated with this SegmentationContext instance.
This is an asynchronous method that returns a Promise as follows:
Promise .then() .catch (err: ReturnCode )
callbackFunc(err: ReturnCode )
Save the current state as an "operation" (internally a ring buffer of 10 undo's are stored, so only the last 10 can be undone).
Which label to save.
This is an asynchronous method that returns a Promise as follows:
Promise .then(numLeft) .catch (err: ReturnCode )
callbackFunc(err: ReturnCode , numLeft)
numLeft - The number of undo operations possible after removing this one.
Save the label Volume (segmentation state) to disk in .gipl format on the server.
File name (either fully qualifed or relative. Also with extension) to save (on server).
This is an asynchronous method that returns a Promise as follows:
Promise .then() .catch (err: ReturnCode )
callbackFunc(err: ReturnCode )
Performs a segmentation operation, make sure you invoke this method with a Promise or callback so you know when it completes. You should not modify the VolumeSegmentationContext while segmentation is occuring.
Data structure containing the paramaters defining the segmentation operation.
This is an asynchronous method that returns a Promise as follows:
Promise .then(data) .catch (err: ReturnCode )
callbackFunc(err: ReturnCode , data)
data.sizeVoxels - The size of the segmented region (in voxels).
data.sizeMMs - The size of the segmented region (in cubic millimeters).
Set the label for segmentation output (the label value to segment into).
the lable index value to segment into (defaults to 1)
This is an asynchronous method that returns a Promise as follows:
Promise .then() .catch (err: ReturnCode )
callbackFunc(err: ReturnCode )
Set the mask of lables that segmentation will grow through.
A bitmask designating which label volumes 0-63 the segmentation will grow through. For up to 256 masks, if 8TF, then only use first 8 its of array[0]. (defaults to 0xfff...)
A bitmask designating which label volumes 64-127 the segmentation will grow through. Only used in 256 TF SDK version.
A bitmask designating which label volumes 128-191 the segmentation will grow through. Only used in 256 TF SDK version.
A bitmask designating which label volumes 192-255 the segmentation will grow through. Only used in 256 TF SDK version.
This is an asynchronous method that returns a Promise as follows:
Promise .then() .catch (err: ReturnCode )
callbackFunc(err: ReturnCode )
Set the type of segmentation (additive or subtractive).
Specifies either additive or subtractive segmentation.
This is an asynchronous method that returns a Promise as follows:
Promise .then() .catch (err: ReturnCode )
callbackFunc(err: ReturnCode )
Swap contents of two label volumes.
first label to swap.
second label to swap.
This is an asynchronous method that returns a Promise as follows:
Promise .then() .catch (err: ReturnCode )
callbackFunc(err: ReturnCode )
Undo the last "operation" (internally a ring buffer of 10 undo's are stored, so only the last 10 can be undone.)
This is an asynchronous method that returns a Promise as follows:
Promise .then(numLeft) .catch (err: ReturnCode )
callbackFunc(err: ReturnCode , numLeft)
numLeft - The number of undo operations possible after removing this one.
confirm that all entries are valid 8-bit values
The VolumeSegmentationContext class is used to perform a range of segmentation operations, as well as to manupulate existing segmentation data.
A VolumeSegmentationContext object is backed by a native VolumeSegmentation object, associated with this an Fovia.OctreeContext and one or more Fovia.RenderEngineContext3D objects.