edu.jhu.ece.iacl.jist.pipeline.parameter
Class ParamWeightedVolumeCollection<T>

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

public class ParamWeightedVolumeCollection<T>
extends ParamVolumeCollection

Weighted volumes stores a collection of cubic volumes and weights associated with each volume.

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  java.util.ArrayList<ParamFile> cachedParams
          Cache of old weighted volumes
protected  ParamModel<T> prototype
          Prototype class for weights
 
Fields inherited from class edu.jhu.ece.iacl.jist.pipeline.parameter.ParamVolumeCollection
cols, components, rows, slices, 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
ParamWeightedVolumeCollection()
          Construct a new weighted volume collection with no restrictions.
ParamWeightedVolumeCollection(java.lang.String name, ParamModel<T> prototype)
          Construct a new weighted volume collection with specified restrictions.
ParamWeightedVolumeCollection(java.lang.String name, ParamModel<T> prototype, VoxelType type)
          Construct a new weighted volume collection with specified restrictions.
ParamWeightedVolumeCollection(java.lang.String name, ParamModel<T> prototype, VoxelType type, int rows, int cols, int slices, int components)
          Construct a new weighted volume collection with specified restrictions.
ParamWeightedVolumeCollection(VoxelType type, ParamModel<T> prototype)
          Construct a new weighted volume collection with specified restrictions.
ParamWeightedVolumeCollection(VoxelType type, ParamModel<T> prototype, int rows, int cols, int slices, int components)
          Construct a new weighted volume collection with specified restrictions.
 
Method Summary
 void addWeightedVolume()
           
 void clear()
          Clear list and add members to cache
 ParamWeightedVolumeCollection<T> clone()
          Clone object.
 ParamWeightedVolume<T> create(java.lang.Object value)
          A new ParamWeightedVolume is created with the value set to the specified value.
 ParamModel<T> getPrototype()
           
 T getWeight(int i)
          Get the volume weight for the specified volume index.
 ParamWeightedVolume<T> getWeightedImage(int i)
          Construct a new weighted volume collection with specified restrictions.
 java.util.ArrayList<T> getWeightList()
          Get list of weights
 java.lang.String getXMLValue()
           
 void init()
          Initialize parameter.
 void setPrototype(ParamModel<T> prototype)
           
 void setUseConnector(boolean useWire)
          Indicate that this port should use a connector instead of a default value.
 void setWeight(int i, T weight)
          Set the volume weight for the specified volume index.
 void setXMLValue(java.lang.String arg)
           
 java.lang.String toString()
          Get description of volumes.
 
Methods inherited from class edu.jhu.ece.iacl.jist.pipeline.parameter.ParamVolumeCollection
add, compareTo, getCols, getComponents, getFileList, getImageDataList, getImageNames, getParamVolume, getParamVolumeList, getRows, getSlices, getType, getValue, getValue, isCompatible, size, validate, writeAndFreeNow
 
Methods inherited from class edu.jhu.ece.iacl.jist.pipeline.parameter.ParamFileCollection
add, clean, getExtensionFilter, getHumanReadableDataType, getParameters, getReaderWriter, isMandatory, probeDefaultValue, replacePath, set, set, setCollection, setExtensionFilter, setMandatory, setReaderWriter, setValue
 
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, usingConnector
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

prototype

protected ParamModel<T> prototype
Prototype class for weights


cachedParams

protected transient java.util.ArrayList<ParamFile> cachedParams
Cache of old weighted volumes

Constructor Detail

ParamWeightedVolumeCollection

public ParamWeightedVolumeCollection()
Construct a new weighted volume collection with no restrictions.


ParamWeightedVolumeCollection

public ParamWeightedVolumeCollection(java.lang.String name,
                                     ParamModel<T> prototype)
Construct a new weighted volume collection with specified restrictions.

Parameters:
name - parameter name

ParamWeightedVolumeCollection

public ParamWeightedVolumeCollection(java.lang.String name,
                                     ParamModel<T> prototype,
                                     VoxelType type)
Construct a new weighted volume collection with specified restrictions.

Parameters:
name - parameter name
type - voxel type restriction

ParamWeightedVolumeCollection

public ParamWeightedVolumeCollection(java.lang.String name,
                                     ParamModel<T> prototype,
                                     VoxelType type,
                                     int rows,
                                     int cols,
                                     int slices,
                                     int components)
Construct a new weighted volume collection with specified restrictions.

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

ParamWeightedVolumeCollection

public ParamWeightedVolumeCollection(VoxelType type,
                                     ParamModel<T> prototype)
Construct a new weighted volume collection with specified restrictions.

Parameters:
type - voxel type restriction

ParamWeightedVolumeCollection

public ParamWeightedVolumeCollection(VoxelType type,
                                     ParamModel<T> prototype,
                                     int rows,
                                     int cols,
                                     int slices,
                                     int components)
Construct a new weighted volume collection with specified restrictions.

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

create

public ParamWeightedVolume<T> create(java.lang.Object value)
A new ParamWeightedVolume is created with the value set to the specified value.

Overrides:
create in class ParamVolumeCollection
Parameters:
value - parameter value
Returns:
weighted parameter volume

getWeightList

public java.util.ArrayList<T> getWeightList()
Get list of weights


getWeight

public T getWeight(int i)
Get the volume weight for the specified volume index.

Parameters:
i - the i
Returns:
the weight

getWeightedImage

public ParamWeightedVolume<T> getWeightedImage(int i)
Construct a new weighted volume collection with specified restrictions.

Parameters:
i - index
Returns:
the weighted volume

init

public void init()
Initialize parameter.

Overrides:
init in class ParamVolumeCollection

setWeight

public void setWeight(int i,
                      T weight)
Set the volume weight for the specified volume index.

Parameters:
i - index
weight - volume weight

getPrototype

public ParamModel<T> getPrototype()
Returns:
the prototype

setPrototype

public void setPrototype(ParamModel<T> prototype)
Parameters:
prototype - the prototype to set

clone

public ParamWeightedVolumeCollection<T> clone()
Clone object.

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

toString

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

Overrides:
toString in class ParamFileCollection
Returns:
the string

clear

public void clear()
Clear list and add members to cache

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

addWeightedVolume

public void addWeightedVolume()

setUseConnector

public void setUseConnector(boolean useWire)
Description copied from class: PipePort
Indicate that this port should use a connector instead of a default value.

Overrides:
setUseConnector in class PipePort<java.util.List>
Parameters:
useWire - the use wire

getXMLValue

public java.lang.String getXMLValue()
Overrides:
getXMLValue in class ParamFileCollection

setXMLValue

public void setXMLValue(java.lang.String arg)
Overrides:
setXMLValue in class ParamFileCollection