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 to DataBuffer 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 a Point3f.
    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 dimension t.
    void setAxes​(org.jogamp.vecmath.Vector3f[] axes)
    Sets the S, T, and R axes of this volume.
    void setDataDims​(int[] dims)
    Sets the data dimensions
    void setDataType​(int type)
    Sets the data type; must correspond to DataBuffer types.
    void setFromMetadata​(VolumeMetadata metadata)
    Sets this metadata from another metadata object.
    void setFromVolume​(Volume3DInt volume)
    Sets this metadata from volume.
    void setFromVolume​(Volume3DInt volume, java.lang.String column)
    Sets this metadata from grid, for the specified column.
    void setGeomDims​(float[] dims)
    Sets the geometric dimensions
    void setOrigin​(org.jogamp.vecmath.Point3f origin)
    Sets the origin
    void 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 a Point3f. 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 to DataBuffer 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 to DataBuffer 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

      void setFromVolume​(Volume3DInt volume)
      Sets this metadata from volume.
      Parameters:
      grid -
    • setFromVolume

      void setFromVolume​(Volume3DInt volume, java.lang.String column)
      Sets this metadata from grid, for the specified column.
      Parameters:
      grid -
      channel -
    • readVolume

      java.util.ArrayList<MguiNumber> readVolume​(int t, DataType data_type, ProgressUpdater progress) throws java.io.IOException
      Reads the 3D volume at voxel dimension t.
      Parameters:
      t -
      Returns:
      Throws:
      java.io.IOException
    • setFromMetadata

      void setFromMetadata​(VolumeMetadata metadata)
      Sets this metadata from another metadata object.
      Parameters:
      metadata -