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

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
                      extended by edu.jhu.ece.iacl.jist.pipeline.parameter.ParamDataLabel
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable<ParamModel>

public class ParamDataLabel
extends ParamVolume

Data Label Parameter.

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  java.io.File labelFile
          The label file.
protected  DataLabelCollection labels
          The labels.
 
Fields inherited from class edu.jhu.ece.iacl.jist.pipeline.parameter.ParamVolume
cols, components, rows, slices, volume, voxelType
 
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
ParamDataLabel()
          Default constructor.
ParamDataLabel(java.lang.String name)
          Construct data labels parameter with no restrictions.
ParamDataLabel(java.lang.String name, VoxelType type)
          Construct data label parameter with restriction on voxel type.
ParamDataLabel(java.lang.String name, VoxelType type, int rows, int cols, int slices, int components)
          Construct new data label the specified restrictions.
ParamDataLabel(VoxelType type)
          Default constructor.
ParamDataLabel(VoxelType type, int rows, int cols, int slices, int components)
          Default constructor.
 
Method Summary
 void add(DataLabel label)
          Add data label to collection.
 ParamDataLabel clone()
          Clone this object.
 void createDefaultLabels()
          Create default labels based on volume values.
 DataLabelCollection getDataLabels()
          Get label collection.
 java.io.File getLabelFile()
          Get location of label file.
 void init()
          Initialize parameter.
 void openLabelFile()
          Open label file and load it into parameter.
 void openLabelFile(java.io.File file)
          Open the specified label file and load it into the parameter.
 void setLabelFile(java.io.File labelFile)
          Set the label file location for this parameter.
 void setValue(DataLabelCollection value)
          The set value method accepts all value types inherited from ParamVolume plus DataLabelCollection.
 void setValue(java.io.File value)
          Set file location.
 void setValue(ImageData value)
          Set volume.
 void setValue(java.lang.String value)
          Set file location.
 java.lang.String toString()
          Get description.
 void validate()
          Validate that the data labels exist.
 
Methods inherited from class edu.jhu.ece.iacl.jist.pipeline.parameter.ParamVolume
clear, compareTo, dispose, equalVolume, getCols, getComponents, getImageData, getImageData, getName, getObject, getRows, getSlices, getValue, getVoxelType, isCompatible, setObject, setValue, writeAndFreeNow
 
Methods inherited from class edu.jhu.ece.iacl.jist.pipeline.parameter.ParamObject
getReaderWriter, setFileName, setReaderWriter, 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

labels

protected transient DataLabelCollection labels
The labels.


labelFile

protected java.io.File labelFile
The label file.

Constructor Detail

ParamDataLabel

public ParamDataLabel()
Default constructor.


ParamDataLabel

public ParamDataLabel(java.lang.String name)
Construct data labels parameter with no restrictions.

Parameters:
name - parameter name

ParamDataLabel

public ParamDataLabel(java.lang.String name,
                      VoxelType type)
Construct data label parameter with restriction on voxel type.

Parameters:
name - parameter name
type - voxel type restriction

ParamDataLabel

public ParamDataLabel(java.lang.String name,
                      VoxelType type,
                      int rows,
                      int cols,
                      int slices,
                      int components)
Construct new data label the specified restrictions.

Parameters:
name - parameter name
type - voxel type restriction
rows - rows restriction
cols - columns restriction
slices - slices restriction
components - components restriction

ParamDataLabel

public ParamDataLabel(VoxelType type)
Default constructor.

Parameters:
type - the type

ParamDataLabel

public ParamDataLabel(VoxelType type,
                      int rows,
                      int cols,
                      int slices,
                      int components)
Default constructor.

Parameters:
type - voxel type
rows - rows
cols - columns
slices - slices
components - components
Method Detail

add

public void add(DataLabel label)
Add data label to collection.

Parameters:
label - the label

clone

public ParamDataLabel clone()
Clone this object.

Overrides:
clone in class ParamVolume
Returns:
the param data label

createDefaultLabels

public void createDefaultLabels()
Create default labels based on volume values.


getDataLabels

public DataLabelCollection getDataLabels()
Get label collection.

Returns:
label collection

getLabelFile

public java.io.File getLabelFile()
Get location of label file.

Returns:
label file

init

public void init()
Initialize parameter.

Overrides:
init in class ParamVolume

openLabelFile

public void openLabelFile()
Open label file and load it into parameter.


openLabelFile

public void openLabelFile(java.io.File file)
Open the specified label file and load it into the parameter.

Parameters:
file - the file

setLabelFile

public void setLabelFile(java.io.File labelFile)
Set the label file location for this parameter.

Parameters:
labelFile - the label file

setValue

public void setValue(ImageData value)
Set volume.

Overrides:
setValue in class ParamVolume
Parameters:
value - the value

setValue

public void setValue(DataLabelCollection value)
The set value method accepts all value types inherited from ParamVolume plus DataLabelCollection. 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 value)
Set file location.

Overrides:
setValue in class ParamVolume
Parameters:
value - the value

setValue

public void setValue(java.lang.String value)
Set file location.

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

toString

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

Overrides:
toString in class ParamVolume
Returns:
the string

validate

public void validate()
              throws InvalidParameterException
Validate that the data labels exist.

Overrides:
validate in class ParamVolume
Throws:
InvalidParameterException - parameter does not meet value restriction