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

java.lang.Object
  extended by edu.jhu.ece.iacl.jist.pipeline.PipePort<T>
      extended by edu.jhu.ece.iacl.jist.pipeline.parameter.ParamModel<java.util.List>
          extended by edu.jhu.ece.iacl.jist.pipeline.parameter.ParamFileCollection
              extended by edu.jhu.ece.iacl.jist.pipeline.parameter.ParamVolumeCollection
All Implemented Interfaces:
ObjectCollection<java.io.File>, java.lang.Cloneable, java.lang.Comparable<ParamModel>
Direct Known Subclasses:
ParamWeightedVolumeCollection

public class ParamVolumeCollection
extends ParamFileCollection

Volume collection stores a collection of files. The restrictions on the files are set to be the same as the collection.

Author:
Blake Lucas

Nested Class Summary
 
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  VoxelType type
          The type.
 
Fields inherited from class edu.jhu.ece.iacl.jist.pipeline.parameter.ParamFileCollection
extensionFilter, fileParams, mandatory, readerWriter
 
Fields inherited from class edu.jhu.ece.iacl.jist.pipeline.parameter.ParamModel
cliTag, description, factory, hidden, label, loadAndSaveOnValidate, shortLabel
 
Fields inherited from class edu.jhu.ece.iacl.jist.pipeline.PipePort
connectible, gport, incomingConnectors, listeners, maxIncoming, maxOutgoing, outgoingConnectors, owner, portType, useWire
 
Constructor Summary
ParamVolumeCollection()
          Default constructor.
ParamVolumeCollection(java.lang.String name)
          Constructor.
ParamVolumeCollection(java.lang.String name, VoxelType type)
          Construct volume collection with specified restrictions.
ParamVolumeCollection(java.lang.String name, VoxelType type, int rows, int cols, int slices, int components)
          Construct volume collection parameter with a restriction on the dimensions and data type.
ParamVolumeCollection(VoxelType type)
          Constructor.
ParamVolumeCollection(VoxelType type, int rows, int cols, int slices, int components)
          Construct volume collection parameter with a restriction on the dimensions and data type.
 
Method Summary
 ParamVolume add(java.lang.Object value)
          Add a new value to the collection.
 void clear()
          Remove all files from collection.
 ParamVolumeCollection clone()
          Clone object.
 int compareTo(ParamModel model)
          Compare restriction of one volume collection to another.
 ParamVolume create(java.lang.Object value)
          Create a new ParamVolume with the same restrictions as the collection and the specified value.
 int getCols()
          Get column restriction.
 int getComponents()
          Get component restriction.
 java.util.List<java.io.File> getFileList()
          Get list of volume file locations.
 java.util.List<ImageData> getImageDataList()
          Get list of volumes.
 java.util.List<java.lang.String> getImageNames()
          Get list of model image names.
 ParamVolume getParamVolume(int i)
           
 java.util.List<ParamVolume> getParamVolumeList()
           
 int getRows()
          Get row restriction.
 int getSlices()
          Get slice restriction.
 VoxelType getType()
          Get voxel type restriction.
 java.util.List<java.io.File> getValue()
          Get list of volume files.
 java.io.File getValue(int i)
          Get file.
 void init()
          Initialize parameter.
 boolean isCompatible(PipePort model)
          Returns true if port is compatible with this parameter's extension filter.
 int size()
          Get size of volume collection.
 void validate()
          Validate that the volume meets all restrictions.
 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.ParamFileCollection
add, clean, getExtensionFilter, getHumanReadableDataType, getParameters, getReaderWriter, getXMLValue, isMandatory, probeDefaultValue, replacePath, set, set, setCollection, setExtensionFilter, setMandatory, setReaderWriter, setValue, setXMLValue, toString
 
Methods inherited from class edu.jhu.ece.iacl.jist.pipeline.parameter.ParamModel
createMipavParameter, createTreeNode, dispose, equals, getCliTag, getDescription, getFactory, getInputView, getLabel, getName, getOutputView, getShortLabel, getView, hide, importMipavParameter, importParameter, isConnectible, isHidden, loadResources, loadResources, read, read, saveResources, setCliTag, setDescription, setFactory, setHidden, setInputView, setLabel, setLoadAndSaveOnValidate, 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

type

protected VoxelType type
The type.


rows

protected int rows
The rows.


cols

protected int cols
The cols.


slices

protected int slices
The slices.


components

protected int components
The components.

Constructor Detail

ParamVolumeCollection

public ParamVolumeCollection()
Default constructor.


ParamVolumeCollection

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

Parameters:
name - parameter name

ParamVolumeCollection

public ParamVolumeCollection(java.lang.String name,
                             VoxelType type)
Construct volume collection with specified restrictions.

Parameters:
name - string name
type - voxel type restriction

ParamVolumeCollection

public ParamVolumeCollection(java.lang.String name,
                             VoxelType type,
                             int rows,
                             int cols,
                             int slices,
                             int components)
Construct volume collection 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

ParamVolumeCollection

public ParamVolumeCollection(VoxelType type)
Constructor.

Parameters:
type - voxel type restriction

ParamVolumeCollection

public ParamVolumeCollection(VoxelType type,
                             int rows,
                             int cols,
                             int slices,
                             int components)
Construct volume collection 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

add

public ParamVolume add(java.lang.Object value)
Add a new value to the collection.

Overrides:
add in class ParamFileCollection
Parameters:
value - the value
Returns:
the param volume

clear

public void clear()
Remove all files from collection.

Specified by:
clear in interface ObjectCollection<java.io.File>
Overrides:
clear in class ParamFileCollection

clone

public ParamVolumeCollection clone()
Clone object.

Overrides:
clone in class ParamFileCollection
Returns:
the param volume collection

compareTo

public int compareTo(ParamModel model)
Compare restriction of one volume collection to another.

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

create

public ParamVolume create(java.lang.Object value)
Create a new ParamVolume with the same restrictions as the collection and the specified value.

Overrides:
create in class ParamFileCollection
Parameters:
value - the value
Returns:
the param volume

getCols

public int getCols()
Get column restriction.

Returns:
the cols

getComponents

public int getComponents()
Get component restriction.

Returns:
the components

getFileList

public java.util.List<java.io.File> getFileList()
Get list of volume file locations.

Returns:
the files

getImageNames

public java.util.List<java.lang.String> getImageNames()
Get list of model image names.

Returns:
the image names

getRows

public int getRows()
Get row restriction.

Returns:
the rows

getSlices

public int getSlices()
Get slice restriction.

Returns:
the slices

getType

public VoxelType getType()
Get voxel type restriction.

Returns:
the type

getValue

public java.util.List<java.io.File> getValue()
Get list of volume files.

Overrides:
getValue in class ParamFileCollection
Returns:
the value

getValue

public java.io.File getValue(int i)
Get file.

Specified by:
getValue in interface ObjectCollection<java.io.File>
Overrides:
getValue in class ParamFileCollection
Parameters:
i - the i
Returns:
the value

getParamVolume

public ParamVolume getParamVolume(int i)

getImageDataList

public java.util.List<ImageData> getImageDataList()
Get list of volumes.

Returns:
the volumes

init

public void init()
Initialize parameter.

Overrides:
init in class ParamFileCollection

isCompatible

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

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

size

public int size()
Get size of volume collection.

Specified by:
size in interface ObjectCollection<java.io.File>
Overrides:
size in class ParamFileCollection
Returns:
the int

validate

public void validate()
              throws InvalidParameterException
Validate that the volume meets all restrictions.

Overrides:
validate in class ParamFileCollection
Throws:
InvalidParameterException - parameter does not meet value restrictions

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.util.List>
Parameters:
src - - Parent ProcessingAlgorithm needed to determine output location

getParamVolumeList

public java.util.List<ParamVolume> getParamVolumeList()