Package mgui.interfaces.shapes.volume
Interface VolumeMetadata
- All Known Implementing Classes:
FSLVolumeMetadata
,NiftiMetadata
,WunilDataset
public interface VolumeMetadata
An interface for extracting metadata from a volume header.
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Andrew Reid
-
Method Summary
Modifier and Type Method Description org.jogamp.vecmath.Vector3f[]
getAxes()
Returns the S, T, and R axes of this volume, respectively.Box3D
getBounds()
The geometric bounds of this volume; note that the bounding box will be scaled up by one voxel length in each axis direction, and its origin will be shifted a half voxel, such that voxel center points are positioned correctly.int[]
getDataDims()
The data dimensions: (x, y, z) or (x, y, z, t).int
getDataType()
The data type; must correspond toDataBuffer
types.float[]
getGeomDims()
The geometric dimensions of the volume (x, y, z) or (S, T, R) in texture coordinates.org.jogamp.vecmath.Point3f
getOrigin()
The geometric origin of the volume as aPoint3f
.int
getVoxelDim()
Returns the intravoxel dimension (e.g., time or vector/tensor information)java.util.ArrayList<MguiNumber>
readVolume(int t, DataType data_type, ProgressUpdater progress)
Reads the 3D volume at voxel dimensiont
.void
setAxes(org.jogamp.vecmath.Vector3f[] axes)
Sets the S, T, and R axes of this volume.void
setDataDims(int[] dims)
Sets the data dimensionsvoid
setDataType(int type)
Sets the data type; must correspond toDataBuffer
types.void
setFromMetadata(VolumeMetadata metadata)
Sets this metadata from another metadata object.void
setFromVolume(Volume3DInt volume)
Sets this metadata fromvolume
.void
setFromVolume(Volume3DInt volume, java.lang.String column)
Sets this metadata fromgrid
, for the specified column.void
setGeomDims(float[] dims)
Sets the geometric dimensionsvoid
setOrigin(org.jogamp.vecmath.Point3f origin)
Sets the originvoid
setVoxelDim(int t)
Sets the intravoxel dimension (e.g., time or vector/tensor information)
-
Method Details
-
getDataDims
int[] getDataDims()The data dimensions: (x, y, z) or (x, y, z, t).- Returns:
- The data dimensions.
-
getGeomDims
float[] getGeomDims()The geometric dimensions of the volume (x, y, z) or (S, T, R) in texture coordinates. Note this is the distance from the center point of the origin voxel to the center point of the last voxel in the direction of the axis. The geometric extent of the bounding box will be a full voxel length larger, in order to place the voxel centers at the correct coordinate.- Returns:
- The geometric dimensions of the volume.
-
getAxes
org.jogamp.vecmath.Vector3f[] getAxes()Returns the S, T, and R axes of this volume, respectively.- Returns:
-
getVoxelDim
int getVoxelDim()Returns the intravoxel dimension (e.g., time or vector/tensor information)- Returns:
-
getOrigin
org.jogamp.vecmath.Point3f getOrigin()The geometric origin of the volume as aPoint3f
. Note that this is the center point of the origin voxel. The origin of the bounding box will be a half voxel displaced from this point, to place its center point correctly. Metadata handlers must adjust according to the policy of their data formats, to return the correct coordinates.- Returns:
- The geometric origin of the volume
-
getDataType
int getDataType()The data type; must correspond toDataBuffer
types.- Returns:
-
getBounds
Box3D getBounds()The geometric bounds of this volume; note that the bounding box will be scaled up by one voxel length in each axis direction, and its origin will be shifted a half voxel, such that voxel center points are positioned correctly.- Returns:
-
setDataDims
void setDataDims(int[] dims)Sets the data dimensions- Parameters:
dims
-
-
setGeomDims
void setGeomDims(float[] dims)Sets the geometric dimensions- Parameters:
dims
-
-
setAxes
void setAxes(org.jogamp.vecmath.Vector3f[] axes)Sets the S, T, and R axes of this volume.- Parameters:
axes
- Three vectors, in the order S, T, and R.
-
setVoxelDim
void setVoxelDim(int t)Sets the intravoxel dimension (e.g., time or vector/tensor information)- Parameters:
t
-
-
setOrigin
void setOrigin(org.jogamp.vecmath.Point3f origin)Sets the origin- Parameters:
origin
-
-
setDataType
void setDataType(int type)Sets the data type; must correspond toDataBuffer
types. Note that this is the origin of the bounding box; thus the corner of the first voxel, rather than its center point. Metadata handlers must adjust according to the policy of their data formats.- Parameters:
type
-
-
setFromVolume
Sets this metadata fromvolume
.- Parameters:
grid
-
-
setFromVolume
Sets this metadata fromgrid
, for the specified column.- Parameters:
grid
-channel
-
-
readVolume
java.util.ArrayList<MguiNumber> readVolume(int t, DataType data_type, ProgressUpdater progress) throws java.io.IOExceptionReads the 3D volume at voxel dimensiont
.- Parameters:
t
-- Returns:
- Throws:
java.io.IOException
-
setFromMetadata
Sets this metadata from another metadata object.- Parameters:
metadata
-
-