edu.washington.biostr.sig.brainj3d.volume
Class VolumeData

java.lang.Object
  extended by java.util.Observable
      extended by edu.washington.biostr.sig.brainj3d.data.Data
          extended by edu.washington.biostr.sig.brainj3d.volume.VolumeData
All Implemented Interfaces:
Serializable

public class VolumeData
extends Data
implements Serializable

Default view parameters:
Structural:
nThreashold = 0
pThreashold = 0
pWindow = top .5%
nWindow = bottom .5%
pColor = "White"
nColor = "cyan"

alpha = .5
Function:
nThreashold = 0
pThreashold = 0
pWindow = max
nWindow = min
pColor = "warm"
nColor = "cold"
alpha = .5

Version:
1.0
Author:
Eider Moore
See Also:
Serialized Form

Field Summary
static String ATLAS_COLOR
           
static String PROP_ALPHA
           
static String PROP_N_SCHEME
           
static String PROP_N_THRESHOLD
           
static String PROP_N_WINDOW
           
static String PROP_P_SCHEME
           
static String PROP_P_THRESHOLD
           
static String PROP_P_WINDOW
           
 
Fields inherited from class edu.washington.biostr.sig.brainj3d.data.Data
file, SAVE_STATE_CHANGED, saved
 
Constructor Summary
VolumeData(VolumeArray data)
          Create a volume 3d.
 
Method Summary
 boolean canDiskCache()
          Return true if we can cache this Data or part of it to disk.
 VolumeArray getArray()
           
 double getCutoff(double percent, boolean top)
          Get the cutoff between the top percent% and the bottom.
 Map<String,Object> getDefaultParameters(Set<Tag> metadata)
          Get the default parameters for this Data.
 javax.vecmath.Vector3f getDown(int slice)
           
 javax.vecmath.Matrix4d getIndex2Space()
           
 int getInterval()
           
 javax.vecmath.Point3f getLocation(float xPercent, float yPercent, float zPercent)
          Get a location from a percent.
 Object getLock()
          Get the lock that this data uses to synchronize itself.
 int getMaxTime()
           
 double getMaxValue()
           
 float getMaxX()
           
 float getMaxY()
           
 float getMaxZ()
           
 int getMinTime()
           
 double getMinValue()
           
 float getMinX()
           
 float getMinY()
           
 float getMinZ()
           
 void getPercent(javax.vecmath.Point3f p)
          Get the percent equivilant for the given point.
 javax.vecmath.Vector3f getRight(int slice)
           
 javax.vecmath.Matrix4d getSpace2Index()
           
 FileType getType()
          Every piece of data has a type.
 javax.vecmath.Point3f getUL(int slice, javax.vecmath.Point3f percent)
           
 boolean hasTime()
          return true if this data varies with time
protected  void initialize()
          Set up some of the variables that we need from the transform.
 boolean invertX()
           
 boolean invertY()
           
 boolean invertZ()
           
 boolean isImmutable()
          Find out if this data is immutable.
 void setInvertX(boolean invert)
           
 void setInvertY(boolean invert)
           
 void setInvertZ(boolean invert)
           
 boolean shareable()
           
 
Methods inherited from class edu.washington.biostr.sig.brainj3d.data.Data
cacheTo, finalize, getFile, isSaved, isSerialized, readFrom, setFile, setSaved, sharable, toString
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROP_ALPHA

public static final String PROP_ALPHA
See Also:
Constant Field Values

PROP_P_SCHEME

public static final String PROP_P_SCHEME
See Also:
Constant Field Values

PROP_N_SCHEME

public static final String PROP_N_SCHEME
See Also:
Constant Field Values

PROP_P_WINDOW

public static final String PROP_P_WINDOW
See Also:
Constant Field Values

PROP_N_WINDOW

public static final String PROP_N_WINDOW
See Also:
Constant Field Values

PROP_P_THRESHOLD

public static final String PROP_P_THRESHOLD
See Also:
Constant Field Values

PROP_N_THRESHOLD

public static final String PROP_N_THRESHOLD
See Also:
Constant Field Values

ATLAS_COLOR

public static final String ATLAS_COLOR
See Also:
Constant Field Values
Constructor Detail

VolumeData

public VolumeData(VolumeArray data)
Create a volume 3d.

Parameters:
x - The maximum x index.
y - The maximum y index.
z - The maximum z index.
trans - The transform from indices to physical units (most likely mm).
Method Detail

invertX

public boolean invertX()

invertY

public boolean invertY()

invertZ

public boolean invertZ()

setInvertX

public void setInvertX(boolean invert)

setInvertY

public void setInvertY(boolean invert)

setInvertZ

public void setInvertZ(boolean invert)

getType

public FileType getType()
Description copied from class: Data
Every piece of data has a type. The type is used to filter out file names, get the decoders and the encoders.

Specified by:
getType in class Data
Returns:

getLock

public Object getLock()
Description copied from class: Data
Get the lock that this data uses to synchronize itself. It may return null if the data is immutable.

Overrides:
getLock in class Data
Returns:
by default this.

isImmutable

public boolean isImmutable()
Description copied from class: Data
Find out if this data is immutable.

Overrides:
isImmutable in class Data
Returns:
false by default

getMaxValue

public double getMaxValue()

getMinValue

public double getMinValue()

getArray

public VolumeArray getArray()

getMinX

public float getMinX()

getMaxX

public float getMaxX()

getMinY

public float getMinY()

getMaxY

public float getMaxY()

getMinZ

public float getMinZ()

getMaxZ

public float getMaxZ()

getMaxTime

public int getMaxTime()

getMinTime

public int getMinTime()

getInterval

public int getInterval()

getIndex2Space

public javax.vecmath.Matrix4d getIndex2Space()

getSpace2Index

public javax.vecmath.Matrix4d getSpace2Index()

initialize

protected final void initialize()
Set up some of the variables that we need from the transform.


getLocation

public javax.vecmath.Point3f getLocation(float xPercent,
                                         float yPercent,
                                         float zPercent)
Get a location from a percent.

Parameters:
xPercent -
yPercent -
zPercent -
Returns:

getPercent

public void getPercent(javax.vecmath.Point3f p)
Get the percent equivilant for the given point. The percent is the percent in each direction from the start of the bounding box for this object to the end of the bounding box. If there is no bounding box, leaving the point unedited is appropriate.

Parameters:
point -

getDown

public javax.vecmath.Vector3f getDown(int slice)

getRight

public javax.vecmath.Vector3f getRight(int slice)

getUL

public javax.vecmath.Point3f getUL(int slice,
                                   javax.vecmath.Point3f percent)

shareable

public boolean shareable()

canDiskCache

public boolean canDiskCache()
Description copied from class: Data
Return true if we can cache this Data or part of it to disk.

Specified by:
canDiskCache in class Data
Returns:

getCutoff

public double getCutoff(double percent,
                        boolean top)
Get the cutoff between the top percent% and the bottom.

Parameters:
percent -
whether - to get the top or bottom percent.
Returns:

getDefaultParameters

public Map<String,Object> getDefaultParameters(Set<Tag> metadata)
Description copied from class: Data
Get the default parameters for this Data.

Overrides:
getDefaultParameters in class Data
Returns:

hasTime

public boolean hasTime()
Description copied from class: Data
return true if this data varies with time

Overrides:
hasTime in class Data
Returns:
false by default


Copyright © 2006 University of Washington. All Rights Reserved.