Modifier and Type | Field and Description |
---|---|
static String[] |
UNIT_STRING |
static short |
UNITS_HZ |
static short |
UNITS_METER |
static short |
UNITS_MICRON |
static short |
UNITS_MM |
static short |
UNITS_MSEC |
static short |
UNITS_PPM |
static short |
UNITS_RADS |
static short |
UNITS_SEC |
static short |
UNITS_UNKNOWN |
static short |
UNITS_USEC |
Constructor and Description |
---|
VoxelDimensions(double colSize,
double rowSize,
double sliceThickness,
double TR)
The only class constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
clearNegativeVoxelSizes()
Replaces any stored negative voxel sizes with their absolute value.
|
Object |
clone()
Returns a copy of this object.
|
boolean |
equals(Object obj)
Tests equality.
|
boolean |
equals(VoxelDimensions obj)
Deprecated.
|
double |
getAxialArea()
Returns the area of a voxel in the axial plane.
|
double |
getColSize(boolean abs)
Returns the size of a voxel's column dimension.
|
double |
getCoronalArea()
Returns the area of a voxel in the coronal plane.
|
double |
getRowSize(boolean abs)
Returns the size of a voxel's row dimension.
|
double |
getSagittalArea()
Returns the area of a voxel in the sagittal plane.
|
double |
getSliceThickness(boolean abs)
Returns the size of a voxel's slice dimension.
|
int |
getSpatialUnit()
Returns the spatial unit code.
|
double |
getSpatialUnitMultiplier()
Returns a multiplier to convert units to mm.
|
double |
getTE1()
Returns the TE1.
|
double |
getTE2()
Returns the TE2.
|
int |
getTemporalUnit()
Returns the temporal unit code.
|
double |
getTemporalUnitMultiplier()
Returns a multiplier to convert units to seconds.
|
double |
getTR()
Returns the TR.
|
float[] |
getVariableSpacing()
Returns an array of variable slice spacings.
|
float[] |
getVariableTiming()
Returns an array of variable volume durations.
|
double |
getVolume()
Returns the volume of a voxel.
|
double |
getXSize()
Returns the size of a voxel along the X dimension.
|
double |
getYSize()
Returns the size of a voxel along the Y dimension.
|
double |
getZSize()
Returns the size of a voxel along the Z dimension.
|
int |
hashCode()
Compute hash code.
|
boolean |
isFlip() |
boolean |
isValid()
Use to verify that column, row, and slice sizes and TR have valid values.
|
boolean |
isValid(StringBuffer buf)
Use to verify that column, row, and slice sizes and TR have valid values.
|
void |
setColNegativeState(boolean bool)
Sets the negative state of voxel column size.
|
void |
setColSize(double val)
Sets the size of a voxel along the column dimension.
|
void |
setFlip(boolean flip) |
void |
setRowNegativeState(boolean bool)
Sets the negative state of voxel row size.
|
void |
setRowSize(double val)
Sets the size of a voxel along the row dimension.
|
void |
setSliceNegativeState(boolean bool)
Sets the negative state of voxel slice size.
|
void |
setSliceThickness(double val)
Sets the size of a voxel along the slice dimension.
|
void |
setSpatialUnit(int unit)
Sets the spatial unit of the voxel.
|
void |
setSpatialUnit(String unit)
Sets the spatial unit of the voxel.
|
void |
setTE1(double num)
Sets the TE1.
|
void |
setTE2(double num)
Sets the TE2.
|
void |
setTemporalUnit(int unit)
Sets the temporal unit of the voxel.
|
void |
setTemporalUnit(String unit)
Sets the temporal unit of the voxel.
|
void |
setTR(double num)
Sets the TR.
|
void |
setValues(VoxelDimensions vd)
Set the values of this VoxelDimensions to that of another.
|
void |
setValues(VoxelDimensions vd,
boolean updateXYZ)
Set the values of this VoxelDimensions to that of another.
|
void |
setVariableSpacing(float[] variableSpacing)
Sets an array of variable slice spacings.
|
void |
setVariableTiming(float[] variableTiming)
Sets an array of variable volume durations.
|
void |
setXSize(double num)
Sets the size of a voxel along the X dimension.
|
void |
setYSize(double num)
Sets the size of a voxel along the Y dimension.
|
void |
setZSize(double num)
Sets the size of a voxel along the Z dimension.
|
String |
toString()
Returns a string representation of this object.
|
public static final String[] UNIT_STRING
public static final short UNITS_HZ
public static final short UNITS_METER
public static final short UNITS_MICRON
public static final short UNITS_MM
public static final short UNITS_MSEC
public static final short UNITS_PPM
public static final short UNITS_RADS
public static final short UNITS_SEC
public static final short UNITS_UNKNOWN
public static final short UNITS_USEC
public VoxelDimensions(double colSize, double rowSize, double sliceThickness, double TR)
colSize
- size of a voxel's column dimensionrowSize
- size of a voxel's row dimensionsliceThickness
- size of a voxel's slice dimensionTR
- temporal resolutionpublic void clearNegativeVoxelSizes()
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
- clone not supported exception@Deprecated public boolean equals(VoxelDimensions obj)
obj
- object to comparepublic boolean equals(Object obj)
public double getAxialArea()
public double getColSize(boolean abs)
abs
- a negative value will be converted to positive, if truepublic double getCoronalArea()
public double getRowSize(boolean abs)
abs
- a negative value will be converted to positive, if truepublic double getSagittalArea()
public double getSliceThickness(boolean abs)
abs
- negative value will be converted to positive, if truepublic int getSpatialUnit()
public double getSpatialUnitMultiplier()
public double getTE1()
public double getTE2()
public int getTemporalUnit()
public double getTemporalUnitMultiplier()
public double getTR()
public float[] getVariableSpacing()
public float[] getVariableTiming()
public double getVolume()
public double getXSize()
public double getYSize()
public double getZSize()
public int hashCode()
public boolean isValid()
public boolean isValid(StringBuffer buf)
buf
- stores any error messagespublic void setColNegativeState(boolean bool)
bool
- if true, column size will be set as negative; positive otherwisepublic void setColSize(double val)
val
- size of a voxel along the column dimensionpublic void setRowNegativeState(boolean bool)
bool
- if true, row size will be set as negative; positive otherwisepublic void setRowSize(double val)
val
- size of a voxel along the row dimensionpublic void setSliceNegativeState(boolean bool)
bool
- if true, slice size will be set as negative; positive otherwisepublic void setSliceThickness(double val)
val
- size of a voxel along the slice dimensionpublic void setSpatialUnit(int unit)
unit
- spatial unit codepublic void setSpatialUnit(String unit)
unit
- spatial unit namepublic void setTE1(double num)
num
- size of TE1public void setTE2(double num)
num
- size of TE2public void setTemporalUnit(int unit)
unit
- temporal unit codepublic void setTemporalUnit(String unit)
unit
- temporal unit namepublic void setTR(double num)
num
- size of TRpublic void setValues(VoxelDimensions vd)
vd
- replacement VoxelDimensions objectpublic void setValues(VoxelDimensions vd, boolean updateXYZ)
vd
- replacement VoxelDimensions objectupdateXYZ
- xyz values will be replaced, if truepublic void setVariableSpacing(float[] variableSpacing)
variableSpacing
- the arraypublic void setVariableTiming(float[] variableTiming)
variableTiming
- the arraypublic void setXSize(double num)
num
- size of voxel along the X dimensionpublic void setYSize(double num)
num
- size of voxel along the Y dimensionpublic void setZSize(double num)
num
- size of voxel along the Z dimensionpublic String toString()
public boolean isFlip()
public void setFlip(boolean flip)