Package mgui.geometry.volume
Class VolumeEngine
java.lang.Object
mgui.geometry.volume.VolumeEngine
- All Implemented Interfaces:
AttributeObject,NamedObject,Engine
public class VolumeEngine extends java.lang.Object implements Engine
Engine to perform built-in operations on volumes.
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Andrew Reid
-
Field Summary
Fields Modifier and Type Field Description protected java.util.HashMap<java.lang.String,AttributeList>attributes -
Constructor Summary
Constructors Constructor Description VolumeEngine() -
Method Summary
Modifier and Type Method Description booleancallMethod(java.lang.String operation, java.lang.String method, java.util.ArrayList<?> params, ProgressUpdater progress)Calls the specified operation/method pair.booleancallMethod(java.lang.String operation, java.lang.String method, ProgressUpdater progress)Calls the specified operation/method pair.Attribute<?>getAttribute(java.lang.String attrName)Returns a specific attribute for this object.AttributeListgetAttributes()Returns the list of current attributes for this object.AttributeListgetAttributes(java.lang.String key)Returns the attributes corresponding tokey, wherekeyis of the form "operation (method)".AttributeListgetAttributes(java.lang.String operation, java.lang.String method)Returns the attributes list corresponding to theoperationandmethod.java.lang.ObjectgetAttributeValue(java.lang.String name)Gets the value of attributename, ornullif it does not exist.booleangetBlobsFromVolume(Volume3DInt volume)Extract blobs from a thresholded volumebooleangetIsosurfaceFromVolume(Volume3DInt volume)Creates an isosurface at a specified isovalue involume.java.util.ArrayList<java.lang.String>getMethods(java.lang.String operation)Returns a list of methods implementing a particularoperation.java.lang.StringgetName()Gets the name for this object.java.util.ArrayList<java.lang.String>getOperations()Returns a list of the operations available for thisEngine.booleanmapVolumeToVolume(Volume3DInt source, Volume3DInt target, java.lang.String method, ProgressUpdater progress_bar)Maps a column ofsourceto a column oftarget, given the attributes corresponding tomethod.voidsetAttribute(java.lang.String attrName, java.lang.Object newValue)Sets a value for a specific attribute.voidsetAttributes(AttributeList thisList)Sets the list of attributes for this object.voidsetName(java.lang.String name)Sets the name for this object.booleansmoothVolume(Volume3DInt volume, java.lang.String method, ProgressUpdater progress_bar)Geometrically smooths values fromsource_columninvolumewith the smoothing kernel specified bymethod.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
attributes
-
-
Constructor Details
-
VolumeEngine
public VolumeEngine()
-
-
Method Details
-
getAttributes
Returns the attributes corresponding tokey, wherekeyis of the form "operation (method)".- Parameters:
key-- Returns:
-
getAttributes
Description copied from interface:EngineReturns the attributes list corresponding to theoperationandmethod.- Specified by:
getAttributesin interfaceEngine- Returns:
- The corresponding attributes, or
nullif no such combination ofoperation/methodexists.
-
getOperations
public java.util.ArrayList<java.lang.String> getOperations()Description copied from interface:EngineReturns a list of the operations available for thisEngine. Operations signify a general operation, which can be implemented through any number of "methods".- Specified by:
getOperationsin interfaceEngine- Returns:
-
getMethods
public java.util.ArrayList<java.lang.String> getMethods(java.lang.String operation)Description copied from interface:EngineReturns a list of methods implementing a particularoperation.- Specified by:
getMethodsin interfaceEngine- Returns:
-
callMethod
public boolean callMethod(java.lang.String operation, java.lang.String method, ProgressUpdater progress)Description copied from interface:EngineCalls the specified operation/method pair. Returnstrueif the operation was successful.- Specified by:
callMethodin interfaceEngine- Parameters:
operation- Operation to perform.method- Method with which to perform operation. Can benullif this operation has no sub-methodsprogress- Optional progress updater (can benull)- Returns:
-
callMethod
public boolean callMethod(java.lang.String operation, java.lang.String method, java.util.ArrayList<?> params, ProgressUpdater progress)Description copied from interface:EngineCalls the specified operation/method pair. Returnstrueif the operation was successful.- Specified by:
callMethodin interfaceEngine- Parameters:
operation- Operation to perform.method- Method with which to perform operation. Can benullif this operation has no sub-methodsparams- A list of additional parameters (not in the attributes) for this methodprogress- Optional progress updater (can benull)- Returns:
-
mapVolumeToVolume
public boolean mapVolumeToVolume(Volume3DInt source, Volume3DInt target, java.lang.String method, ProgressUpdater progress_bar)Maps a column ofsourceto a column oftarget, given the attributes corresponding tomethod.- Parameters:
source-target-method-progress_bar-- Returns:
-
smoothVolume
public boolean smoothVolume(Volume3DInt volume, java.lang.String method, ProgressUpdater progress_bar)Geometrically smooths values fromsource_columninvolumewith the smoothing kernel specified bymethod. Writes the results totarget_column. Iftarget_columndoesn't exist, it will be created with the same data type assource_column. If it exists, it will maintain its current data type and its values will be overwritten.target_columncan be the same assource_column.Valid methods are:
- 'Smooth Volume (Isotropic Gaussian)' -
- Parameters:
volume-method-progress_bar-- Returns:
trueif successful
-
getBlobsFromVolume
Extract blobs from a thresholded volume- Parameters:
volume-- Returns:
-
getIsosurfaceFromVolume
Creates an isosurface at a specified isovalue involume. Creates a new surface and stores it inshape_set.- Parameters:
volume-- Returns:
-
getAttributes
Description copied from interface:AttributeObjectReturns the list of current attributes for this object.- Specified by:
getAttributesin interfaceAttributeObject- Returns:
-
getAttribute
Description copied from interface:AttributeObjectReturns a specific attribute for this object.- Specified by:
getAttributein interfaceAttributeObject- Returns:
-
setAttributes
Description copied from interface:AttributeObjectSets the list of attributes for this object.- Specified by:
setAttributesin interfaceAttributeObject
-
getAttributeValue
public java.lang.Object getAttributeValue(java.lang.String name)Description copied from interface:AttributeObjectGets the value of attributename, ornullif it does not exist.- Specified by:
getAttributeValuein interfaceAttributeObject- Parameters:
name- Name of the attribute- Returns:
- the value of attribute
name, ornullif it does not exist
-
setAttribute
public void setAttribute(java.lang.String attrName, java.lang.Object newValue)Description copied from interface:AttributeObjectSets a value for a specific attribute.- Specified by:
setAttributein interfaceAttributeObject
-
getName
public java.lang.String getName()Description copied from interface:NamedObjectGets the name for this object.- Specified by:
getNamein interfaceNamedObject- Returns:
-
setName
public void setName(java.lang.String name)Description copied from interface:NamedObjectSets the name for this object.- Specified by:
setNamein interfaceNamedObject
-