Modifier and Type | Field and Description |
---|---|
static int |
SLICE_DIRECTION_AXIAL |
static int |
SLICE_DIRECTION_CORONAL |
static int |
SLICE_DIRECTION_SAGITTAL |
Constructor and Description |
---|
ImageDimensions(int cols,
int rows,
int slices,
int seriesPoints)
The only class constructor.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Returns a copy of this object.
|
boolean |
equals(ImageDimensions obj)
Deprecated.
|
boolean |
equals(Object obj)
Tests equality.
|
int |
getCols()
Gets the number of columns in a volume of this image.
|
int |
getImageOffset()
Gets the image offset.
|
int[] |
getImageOffsets()
Returns an array of image offsets for multi-file images.
|
int |
getImageTrailer()
Returns the number of bytes in the image trailer.
|
long |
getNumVoxels()
Deprecated.
|
int |
getNumVoxelsSlice()
Gets the number of voxels in a slice of this image.
|
int |
getNumVoxelsSlice(int sliceDirection)
Gets the number of voxels in a slice of this image.
|
long |
getNumVoxelsTimeseries()
Gets the number of voxels in this image.
|
int |
getNumVoxelsVolume()
Gets the number of voxels in a volume of this image.
|
int |
getRows()
Gets the number of rows in a volume of this image.
|
int |
getSlices()
Gets the number of slices in a volume of this image.
|
int |
getTimepoints()
Gets the number of timepoints in this image.
|
int |
getX()
Gets the X dimension.
|
int |
getY()
Gets the Y dimension.
|
int |
getZ()
Gets the Z dimension.
|
int |
hashCode()
Computes hash code.
|
boolean |
inRange(Coordinate coord)
Returns true if the specified coordinate is within the range of these dimensions.
|
boolean |
isTiled()
Returns true if the data is tiled (e.g., DICOM mosaic data).
|
boolean |
isValid()
Use to verify that columns, rows, slices, and timepoints have valid values.
|
boolean |
isValid(StringBuffer buf)
Use to verify that columns, rows, slices, and timepoints have valid values.
|
void |
setImageOffset(int num)
Sets the image offset.
|
void |
setImageOffsets(int[] imageOffsets)
Sets an array of image offsets for multi-file images.
|
void |
setImageTrailer(int imageTrailer)
Sets the number of bytes in the image trailer
|
void |
setTiled(boolean tiled)
Set to true if the data is tiled.
|
void |
setTimepoints(int num)
Sets the number of timepoints in this image.
|
void |
setValues(ImageDimensions id)
Set the values of this ImageDimensions to that of another.
|
void |
setValues(ImageDimensions id,
boolean updateXYZ)
Set the values of this ImageDimensions to that of another.
|
void |
setX(int num)
Sets the X dimension.
|
void |
setY(int num)
Sets the Y dimension.
|
void |
setZ(int num)
Sets the Z dimension.
|
String |
toString()
Returns a string representation of this object.
|
public static final int SLICE_DIRECTION_AXIAL
public static final int SLICE_DIRECTION_CORONAL
public static final int SLICE_DIRECTION_SAGITTAL
public ImageDimensions(int cols, int rows, int slices, int seriesPoints)
cols
- number of columnsrows
- number of rowsslices
- number of slicesseriesPoints
- number of timepointspublic Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
- clone not supported exception@Deprecated public boolean equals(ImageDimensions obj)
obj
- object to comparepublic boolean equals(Object obj)
public int getCols()
public int getImageOffset()
public int[] getImageOffsets()
public int getImageTrailer()
@Deprecated public long getNumVoxels()
public int getNumVoxelsSlice()
public int getNumVoxelsSlice(int sliceDirection)
sliceDirection
- axial, coronal, or sagittalpublic long getNumVoxelsTimeseries()
public int getNumVoxelsVolume()
public int getRows()
public int getSlices()
public int getTimepoints()
public int getX()
public int getY()
public int getZ()
public int hashCode()
public boolean inRange(Coordinate coord)
coord
- the coordinate to testpublic boolean isTiled()
public boolean isValid()
public boolean isValid(StringBuffer buf)
buf
- stores any error messagespublic void setImageOffset(int num)
num
- size of image offsetpublic void setImageOffsets(int[] imageOffsets)
imageOffsets
- an array of image offsetspublic void setImageTrailer(int imageTrailer)
imageTrailer
- number of bytespublic void setTiled(boolean tiled)
tiled
- true if the data is tiles, false otherwisepublic void setTimepoints(int num)
num
- number of timepoints in this imagepublic void setValues(ImageDimensions id)
id
- replacement ImageDimensions objectpublic void setValues(ImageDimensions id, boolean updateXYZ)
id
- replacement ImageDimensions objectupdateXYZ
- xyz values will be replaced, if truepublic void setX(int num)
num
- size of X dimensionpublic void setY(int num)
num
- size of Y dimensionpublic void setZ(int num)
num
- size of Z dimension