edu.jhu.ece.iacl.jist.pipeline.parameter
Class ParamVolume

java.lang.Object
  extended by edu.jhu.ece.iacl.jist.pipeline.PipePort<T>
      extended by edu.jhu.ece.iacl.jist.pipeline.parameter.ParamModel<java.io.File>
          extended by edu.jhu.ece.iacl.jist.pipeline.parameter.ParamFile
              extended by edu.jhu.ece.iacl.jist.pipeline.parameter.ParamObject<ImageData>
                  extended by edu.jhu.ece.iacl.jist.pipeline.parameter.ParamVolume
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable<ParamModel>
Direct Known Subclasses:
ParamDataLabel, ParamWeightedVolume

public class ParamVolume
extends ParamObject<ImageData>

Parameter volume specifies a CubicVolume with restrictions for the dimensions and data type.

Author:
Blake Lucas

Nested Class Summary
 
Nested classes/interfaces inherited from class edu.jhu.ece.iacl.jist.pipeline.parameter.ParamFile
ParamFile.DialogType
 
Nested classes/interfaces inherited from class edu.jhu.ece.iacl.jist.pipeline.PipePort
PipePort.PortListener, PipePort.type
 
Field Summary
protected  int cols
          The cols.
protected  int components
          The components.
protected  int rows
          The rows.
protected  int slices
          The slices.
protected  ImageData volume
          The volume.
protected  VoxelType voxelType
          The voxel type.
 
Fields inherited from class edu.jhu.ece.iacl.jist.pipeline.parameter.ParamObject
obj, readerWriter
 
Fields inherited from class edu.jhu.ece.iacl.jist.pipeline.parameter.ParamFile
dialogType, extensionFilter, file, uri
 
Fields inherited from class edu.jhu.ece.iacl.jist.pipeline.parameter.ParamModel
cliTag, description, factory, hidden, label, loadAndSaveOnValidate, mandatory, shortLabel
 
Fields inherited from class edu.jhu.ece.iacl.jist.pipeline.PipePort
connectible, gport, incomingConnectors, listeners, maxIncoming, maxOutgoing, outgoingConnectors, owner, portType, useWire
 
Constructor Summary
ParamVolume()
          Default constructor.
ParamVolume(java.lang.String name)
          Constructor.
ParamVolume(java.lang.String name, VoxelType type)
          Constructor.
ParamVolume(java.lang.String name, VoxelType type, int rows, int cols, int slices, int components)
          Construct volume parameter with a restriction on the dimensions and data type.
ParamVolume(VoxelType type)
          Construct volume parameter with a restriction on the data type.
ParamVolume(VoxelType type, int rows, int cols, int slices, int components)
          Construct volume parameter with a restriction on the dimensions and data type.
 
Method Summary
 void clear()
          Clear volume parameter.
 ParamVolume clone()
          Clone object.
 int compareTo(ParamModel model)
          Compare restrictions of parameters.
 void dispose()
          Dispose of volume in memory.
 boolean equalVolume(java.lang.Object obj)
          Compare parameter volumes by model image names.
 int getCols()
          Get column restriction.
 int getComponents()
          Get component restriction.
 ImageData getImageData()
          Get the CubicVolume specified.
 ImageData getImageData(boolean loadIfNotLoaded)
           
 java.lang.String getName()
          Get the parameter's name, which should be unique.
 ImageData getObject()
          Deprecated. 
 int getRows()
          Get row restriction.
 int getSlices()
          Get slice restriction.
 java.io.File getValue()
          Get file location of Model Image if it exists.
 VoxelType getVoxelType()
          Get voxel type restriction.
 void init()
          Initialize parameter.
 boolean isCompatible(PipePort model)
          Returns true if port is compatible with this parameter's extension filter.
 void setObject(ImageData obj)
          Set volume.
 void setValue(java.io.File file)
          Set volume filename.
 void setValue(ImageData value)
          Set the value for the parameter.
 void setValue(java.net.URI uri)
          Set volume filename.
 java.lang.String toString()
          Get volume description.
 void validate()
          Validate volume.
 void writeAndFreeNow(ProcessingAlgorithm src)
          Attempt to export the current parameter now, and, if possible, free associated memory.
 
Methods inherited from class edu.jhu.ece.iacl.jist.pipeline.parameter.ParamObject
getReaderWriter, setFileName, setReaderWriter, setValue, writeObject
 
Methods inherited from class edu.jhu.ece.iacl.jist.pipeline.parameter.ParamFile
clean, getDialogType, getExtensionFilter, getHumanReadableDataType, getURI, getXMLValue, probeDefaultValue, replacePath, setExtensionFilter, setXMLValue, translatePath
 
Methods inherited from class edu.jhu.ece.iacl.jist.pipeline.parameter.ParamModel
createMipavParameter, createTreeNode, equals, getCliTag, getDescription, getFactory, getInputView, getLabel, getOutputView, getShortLabel, getView, hide, importMipavParameter, importParameter, isConnectible, isHidden, isMandatory, loadResources, loadResources, read, read, saveResources, setCliTag, setDescription, setFactory, setHidden, setInputView, setLabel, setLoadAndSaveOnValidate, setMandatory, setName, setOutputView, setShortLabel, toXML, write, write
 
Methods inherited from class edu.jhu.ece.iacl.jist.pipeline.PipePort
addListener, disconnect, disconnect, disconnect, disconnect, getGraphPort, getIncomingConnector, getIncomingConnectors, getIncomingPorts, getListeners, getMaxIncoming, getMaxOutgoing, getOutgoingConnector, getOutgoingConnectors, getOutgoingPorts, getOwner, getPortType, isConnected, isConnectedTo, isInputPort, isOutputPort, notifyListenersOfConnection, notifyListenersOfDisconnection, removeAllListeners, removeListener, setConnectable, setGraphPort, setMaxIncoming, setMaxOutgoing, setOwner, setPortType, setUseConnector, usingConnector
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

rows

protected int rows
The rows.


cols

protected int cols
The cols.


slices

protected int slices
The slices.


components

protected int components
The components.


voxelType

protected VoxelType voxelType
The voxel type.


volume

protected transient ImageData volume
The volume.

Constructor Detail

ParamVolume

public ParamVolume()
Default constructor.


ParamVolume

public ParamVolume(java.lang.String name)
Constructor.

Parameters:
name - parameter name

ParamVolume

public ParamVolume(java.lang.String name,
                   VoxelType type)
Constructor.

Parameters:
name - parameter name
type - voxel type restriction

ParamVolume

public ParamVolume(java.lang.String name,
                   VoxelType type,
                   int rows,
                   int cols,
                   int slices,
                   int components)
Construct volume parameter with a restriction on the dimensions and data type.

Parameters:
name - volume name
type - data type restriction
rows - rows restriction
cols - columns restriction
slices - slices restriction
components - components restriction

ParamVolume

public ParamVolume(VoxelType type)
Construct volume parameter with a restriction on the data type.

Parameters:
type - data type restriction

ParamVolume

public ParamVolume(VoxelType type,
                   int rows,
                   int cols,
                   int slices,
                   int components)
Construct volume parameter with a restriction on the dimensions and data type.

Parameters:
type - data type restriction
rows - rows restriction
cols - columns restriction
slices - slices restriction
components - components restriction
Method Detail

clear

public void clear()
Clear volume parameter.


clone

public ParamVolume clone()
Clone object.

Overrides:
clone in class ParamObject<ImageData>
Returns:
the param volume

compareTo

public int compareTo(ParamModel model)
Compare restrictions of parameters.

Specified by:
compareTo in interface java.lang.Comparable<ParamModel>
Overrides:
compareTo in class ParamFile
Parameters:
model - the model
Returns:
the int

dispose

public void dispose()
Dispose of volume in memory.

Overrides:
dispose in class ParamModel<java.io.File>

equalVolume

public boolean equalVolume(java.lang.Object obj)
Compare parameter volumes by model image names.

Parameters:
obj - a parameter volume or a string image name
Returns:
the model image names for the two objects are the same

getCols

public int getCols()
Get column restriction.

Returns:
columns

getComponents

public int getComponents()
Get component restriction.

Returns:
components

getObject

@Deprecated
public ImageData getObject()
Deprecated. 

Description copied from class: ParamObject
Get object.

Overrides:
getObject in class ParamObject<ImageData>
Returns:
object

getRows

public int getRows()
Get row restriction.

Returns:
rows

getSlices

public int getSlices()
Get slice restriction.

Returns:
slices

getValue

public java.io.File getValue()
Get file location of Model Image if it exists.

Overrides:
getValue in class ParamFile
Returns:
the value

getName

public java.lang.String getName()
Description copied from class: ParamModel
Get the parameter's name, which should be unique.

Overrides:
getName in class ParamModel<java.io.File>
Returns:
name

getImageData

public ImageData getImageData()
Get the CubicVolume specified.

Returns:
volume

getImageData

public ImageData getImageData(boolean loadIfNotLoaded)

getVoxelType

public VoxelType getVoxelType()
Get voxel type restriction.

Returns:
type voxel type

init

public void init()
Initialize parameter.

Overrides:
init in class ParamObject<ImageData>

isCompatible

public boolean isCompatible(PipePort model)
Description copied from class: ParamFile
Returns true if port is compatible with this parameter's extension filter.

Overrides:
isCompatible in class ParamFile
Parameters:
model - the model
Returns:
true, if checks if is compatible

setObject

public void setObject(ImageData obj)
Set volume.

Overrides:
setObject in class ParamObject<ImageData>
Parameters:
obj - the obj

setValue

public void setValue(ImageData value)
Set the value for the parameter. A volume parameter will accept a CubicVolume, the string name for the image, the file location of the image or a ModelImage.

Parameters:
value - parameter value

setValue

public void setValue(java.io.File file)
Set volume filename.

Overrides:
setValue in class ParamObject<ImageData>
Parameters:
file - the file

setValue

public void setValue(java.net.URI uri)
Set volume filename.

Overrides:
setValue in class ParamFile
Parameters:
file - the file

toString

public java.lang.String toString()
Get volume description.

Overrides:
toString in class ParamObject<ImageData>
Returns:
the string

validate

public void validate()
              throws InvalidParameterException
Validate volume.

Overrides:
validate in class ParamObject<ImageData>
Throws:
InvalidParameterException - the invalid parameter exception

writeAndFreeNow

public void writeAndFreeNow(ProcessingAlgorithm src)
Description copied from class: ParamModel
Attempt to export the current parameter now, and, if possible, free associated memory. Does not apply in cases where the algorithm is being run in process. By default, does nothing. Only possibly active for parameters with setLoadAndSaveOnValidate(false)

Overrides:
writeAndFreeNow in class ParamModel<java.io.File>
Parameters:
src - - Parent ProcessingAlgorithm needed to determine output location