edu.jhu.ece.iacl.jist.structures.image
Class ImageData

java.lang.Object
  extended by edu.jhu.ece.iacl.jist.structures.image.ImageData
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
ImageDataByte, ImageDataColor, ImageDataDouble, ImageDataFloat, ImageDataInt, ImageDataMipav, ImageDataNumber, ImageDataUByte

public abstract class ImageData
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

Structure used for storing all volumetric data.

Author:
Blake Lucas
See Also:
Serialized Form

Field Summary
protected  int cols
          The cols.
protected  int components
          The components.
protected  ImageHeader imageHeader
          The image header.
protected  java.lang.String name
          The name.
protected  int rows
          The rows.
protected  int slices
          The slices.
protected  VoxelType type
          The type.
 
Constructor Summary
ImageData()
           
 
Method Summary
abstract  ImageData clone()
           
static int[][] clone(int[][] vol)
          Clone.
static int[][][] clone(int[][][] vol)
          Clone.
static int[][][][] clone(int[][][][] vol)
          Clone.
abstract  void dispose()
          Free any resources associated with an ImageData object.
 java.lang.Number get(int i, int j)
          Gets the.
 java.lang.Number get(int i, int j, int k)
          Get voxel.
abstract  java.lang.Number get(int i, int j, int k, int l)
          Get vector component for volume.
 boolean getBoolean(int i, int j)
          Gets the boolean.
 boolean getBoolean(int i, int j, int k)
          Gets the boolean.
abstract  boolean getBoolean(int i, int j, int k, int l)
          Gets the boolean.
 byte getByte(int i, int j)
          Gets the u byte.
 byte getByte(int i, int j, int k)
          Gets the u byte.
abstract  byte getByte(int i, int j, int k, int l)
          Gets the u byte.
 java.awt.Color getColor(int i, int j)
          Gets the color.
 java.awt.Color getColor(int i, int j, int k)
          Gets the color.
abstract  java.awt.Color getColor(int i, int j, int k, int l)
          Gets the color.
 int getCols()
          Gets the cols.
 int getComponents()
          Gets the components.
 double getDouble(int i, int j)
          Gets the double.
 double getDouble(int i, int j, int k)
          Gets the double.
abstract  double getDouble(int i, int j, int k, int l)
          Gets the double.
 float getFloat(int i, int j)
          Gets the float.
 float getFloat(int i, int j, int k)
          Gets the float.
abstract  float getFloat(int i, int j, int k, int l)
          Gets the float.
 ImageHeader getHeader()
          Gets the header.
 int getInt(int i, int j)
          Gets the int.
 int getInt(int i, int j, int k)
          Gets the int.
abstract  int getInt(int i, int j, int k, int l)
          Gets the int.
 ModelImage getModelImageCopy()
          Gets the model image.
 java.lang.String getName()
          Gets the name.
 int getRows()
          Gets the rows.
 short getShort(int i, int j)
          Gets the short.
 short getShort(int i, int j, int k)
          Gets the short.
abstract  short getShort(int i, int j, int k, int l)
          Gets the short.
 int getSlices()
          Gets the slices.
 VoxelType getType()
          Gets the type.
 short getUByte(int i, int j)
          Gets the u byte.
 short getUByte(int i, int j, int k)
          Gets the u byte.
abstract  short getUByte(int i, int j, int k, int l)
          Gets the u byte.
 int getUShort(int i, int j)
          Gets the u short.
 int getUShort(int i, int j, int k)
          Gets the u short.
 int getUShort(int i, int j, int k, int l)
          Gets the u short.
 boolean isNotAvailable()
           
abstract  ImageData mimic()
          Create new cubic volume of the same subclass type with the same dimensions Does not copy the values in the volume.
abstract  ImageData mimic(int rows, int cols, int slices, int components)
          Mimic.
 void set(int i, int j, boolean a)
          Debugging routine for printing non-zero entries in matrix.
 void set(int i, int j, byte a)
          Sets the.
 void set(int i, int j, java.awt.Color a)
          Sets the.
 void set(int i, int j, double a)
          Sets the.
 void set(int i, int j, float a)
          Sets the.
 void set(int i, int j, int a)
          Sets the.
 void set(int i, int j, int k, boolean a)
          Sets the.
 void set(int i, int j, int k, byte a)
          Sets the.
 void set(int i, int j, int k, java.awt.Color a)
          Sets the.
 void set(int i, int j, int k, double a)
          Sets the.
 void set(int i, int j, int k, float a)
          Sets the.
 void set(int i, int j, int k, int a)
          Sets the.
abstract  void set(int i, int j, int k, int l, boolean a)
          Sets the.
abstract  void set(int i, int j, int k, int l, java.awt.Color a)
          Sets the.
abstract  void set(int i, int j, int k, int l, double a)
          Sets the.
abstract  void set(int i, int j, int k, int l, float a)
          Sets the.
abstract  void set(int i, int j, int k, int l, int a)
          Sets the.
abstract  void set(int i, int j, int k, int l, java.lang.Number a)
          Sets the.
abstract  void set(int i, int j, int k, int l, short a)
          Sets the.
 void set(int i, int j, int k, java.lang.Number a)
          Sets the.
 void set(int i, int j, int k, short a)
          Sets the.
 void set(int i, int j, java.lang.Number a)
          Sets the.
 void set(int i, int j, short a)
          Sets the.
abstract  void set(Voxel a)
          Sets the.
 void setHeader(ImageHeader header)
          Sets the header.
 void setName(java.lang.String name)
          Volume name used my MIPAV images when saving.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

rows

protected int rows
The rows.


cols

protected int cols
The cols.


slices

protected int slices
The slices.


components

protected int components
The components.


type

protected VoxelType type
The type.


name

protected java.lang.String name
The name.


imageHeader

protected ImageHeader imageHeader
The image header.

Constructor Detail

ImageData

public ImageData()
Method Detail

clone

public static int[][] clone(int[][] vol)
Clone.

Parameters:
vol - the vol
Returns:
the int[][]

clone

public static int[][][] clone(int[][][] vol)
Clone.

Parameters:
vol - the vol
Returns:
the int[][][]

clone

public static int[][][][] clone(int[][][][] vol)
Clone.

Parameters:
vol - the vol
Returns:
the int[][][][]

getHeader

public ImageHeader getHeader()
Gets the header.

Returns:
the header

setHeader

public void setHeader(ImageHeader header)
Sets the header.

Parameters:
header - the new header

clone

public abstract ImageData clone()
Overrides:
clone in class java.lang.Object

get

public java.lang.Number get(int i,
                            int j)
Gets the.

Parameters:
i - the i
j - the j
Returns:
the number

get

public java.lang.Number get(int i,
                            int j,
                            int k)
Get voxel.

Parameters:
i - row
j - column
k - slice
Returns:
Voxel

get

public abstract java.lang.Number get(int i,
                                     int j,
                                     int k,
                                     int l)
Get vector component for volume.

Parameters:
i - row
j - column
k - slice
l - component
Returns:
the number

getBoolean

public boolean getBoolean(int i,
                          int j)
Gets the boolean.

Parameters:
i - the i
j - the j
Returns:
the boolean

getBoolean

public boolean getBoolean(int i,
                          int j,
                          int k)
Gets the boolean.

Parameters:
i - the i
j - the j
k - the k
Returns:
the boolean

getBoolean

public abstract boolean getBoolean(int i,
                                   int j,
                                   int k,
                                   int l)
Gets the boolean.

Parameters:
i - the i
j - the j
k - the k
l - the l
Returns:
the boolean

getColor

public java.awt.Color getColor(int i,
                               int j)
Gets the color.

Parameters:
i - the i
j - the j
Returns:
the color

getColor

public java.awt.Color getColor(int i,
                               int j,
                               int k)
Gets the color.

Parameters:
i - the i
j - the j
k - the k
Returns:
the color

getColor

public abstract java.awt.Color getColor(int i,
                                        int j,
                                        int k,
                                        int l)
Gets the color.

Parameters:
i - the i
j - the j
k - the k
l - the l
Returns:
the color

getCols

public int getCols()
Gets the cols.

Returns:
the cols

getComponents

public int getComponents()
Gets the components.

Returns:
the components

getDouble

public double getDouble(int i,
                        int j)
Gets the double.

Parameters:
i - the i
j - the j
Returns:
the double

getDouble

public double getDouble(int i,
                        int j,
                        int k)
Gets the double.

Parameters:
i - the i
j - the j
k - the k
Returns:
the double

getDouble

public abstract double getDouble(int i,
                                 int j,
                                 int k,
                                 int l)
Gets the double.

Parameters:
i - the i
j - the j
k - the k
l - the l
Returns:
the double

getFloat

public float getFloat(int i,
                      int j)
Gets the float.

Parameters:
i - the i
j - the j
Returns:
the float

getFloat

public float getFloat(int i,
                      int j,
                      int k)
Gets the float.

Parameters:
i - the i
j - the j
k - the k
Returns:
the float

getFloat

public abstract float getFloat(int i,
                               int j,
                               int k,
                               int l)
Gets the float.

Parameters:
i - the i
j - the j
k - the k
l - the l
Returns:
the float

getInt

public int getInt(int i,
                  int j)
Gets the int.

Parameters:
i - the i
j - the j
Returns:
the int

getInt

public int getInt(int i,
                  int j,
                  int k)
Gets the int.

Parameters:
i - the i
j - the j
k - the k
Returns:
the int

getInt

public abstract int getInt(int i,
                           int j,
                           int k,
                           int l)
Gets the int.

Parameters:
i - the i
j - the j
k - the k
l - the l
Returns:
the int

getModelImageCopy

public ModelImage getModelImageCopy()
Gets the model image.

Returns:
the model image

getName

public java.lang.String getName()
Gets the name.

Returns:
the name

getRows

public int getRows()
Gets the rows.

Returns:
the rows

getShort

public short getShort(int i,
                      int j)
Gets the short.

Parameters:
i - the i
j - the j
Returns:
the short

getShort

public short getShort(int i,
                      int j,
                      int k)
Gets the short.

Parameters:
i - the i
j - the j
k - the k
Returns:
the short

getShort

public abstract short getShort(int i,
                               int j,
                               int k,
                               int l)
Gets the short.

Parameters:
i - the i
j - the j
k - the k
l - the l
Returns:
the short

getSlices

public int getSlices()
Gets the slices.

Returns:
the slices

getType

public VoxelType getType()
Gets the type.

Returns:
the type

getUByte

public short getUByte(int i,
                      int j)
Gets the u byte.

Parameters:
i - the i
j - the j
Returns:
the u byte

getUByte

public short getUByte(int i,
                      int j,
                      int k)
Gets the u byte.

Parameters:
i - the i
j - the j
k - the k
Returns:
the u byte

getUByte

public abstract short getUByte(int i,
                               int j,
                               int k,
                               int l)
Gets the u byte.

Parameters:
i - the i
j - the j
k - the k
l - the l
Returns:
the u byte

getUShort

public int getUShort(int i,
                     int j)
Gets the u short.

Parameters:
i - the i
j - the j
Returns:
the u short

getUShort

public int getUShort(int i,
                     int j,
                     int k)
Gets the u short.

Parameters:
i - the i
j - the j
k - the k
Returns:
the u short

getUShort

public int getUShort(int i,
                     int j,
                     int k,
                     int l)
Gets the u short.

Parameters:
i - the i
j - the j
k - the k
l - the l
Returns:
the u short

mimic

public abstract ImageData mimic()
Create new cubic volume of the same subclass type with the same dimensions Does not copy the values in the volume.

Returns:
the image data

mimic

public abstract ImageData mimic(int rows,
                                int cols,
                                int slices,
                                int components)
Mimic.

Parameters:
rows - the rows
cols - the cols
slices - the slices
components - the components
Returns:
the image data

set

public void set(int i,
                int j,
                boolean a)
Debugging routine for printing non-zero entries in matrix.

Parameters:
i - the i
j - the j
a - the a

set

public void set(int i,
                int j,
                byte a)
Sets the.

Parameters:
i - the i
j - the j
a - the a

set

public void set(int i,
                int j,
                java.awt.Color a)
Sets the.

Parameters:
i - the i
j - the j
a - the a

set

public void set(int i,
                int j,
                double a)
Sets the.

Parameters:
i - the i
j - the j
a - the a

set

public void set(int i,
                int j,
                float a)
Sets the.

Parameters:
i - the i
j - the j
a - the a

set

public void set(int i,
                int j,
                int a)
Sets the.

Parameters:
i - the i
j - the j
a - the a

set

public void set(int i,
                int j,
                int k,
                boolean a)
Sets the.

Parameters:
i - the i
j - the j
k - the k
a - the a

set

public void set(int i,
                int j,
                int k,
                byte a)
Sets the.

Parameters:
i - the i
j - the j
k - the k
a - the a

set

public void set(int i,
                int j,
                int k,
                java.awt.Color a)
Sets the.

Parameters:
i - the i
j - the j
k - the k
a - the a

set

public void set(int i,
                int j,
                int k,
                double a)
Sets the.

Parameters:
i - the i
j - the j
k - the k
a - the a

set

public void set(int i,
                int j,
                int k,
                float a)
Sets the.

Parameters:
i - the i
j - the j
k - the k
a - the a

set

public void set(int i,
                int j,
                int k,
                int a)
Sets the.

Parameters:
i - the i
j - the j
k - the k
a - the a

set

public void set(int i,
                int j,
                int k,
                short a)
Sets the.

Parameters:
i - the i
j - the j
k - the k
a - the a

set

public void set(int i,
                int j,
                short a)
Sets the.

Parameters:
i - the i
j - the j
a - the a

set

public abstract void set(int i,
                         int j,
                         int k,
                         int l,
                         boolean a)
Sets the.

Parameters:
i - the i
j - the j
k - the k
l - the l
a - the a

set

public abstract void set(int i,
                         int j,
                         int k,
                         int l,
                         short a)
Sets the.

Parameters:
i - the i
j - the j
k - the k
l - the l
a - the a

set

public abstract void set(int i,
                         int j,
                         int k,
                         int l,
                         int a)
Sets the.

Parameters:
i - the i
j - the j
k - the k
l - the l
a - the a

set

public abstract void set(int i,
                         int j,
                         int k,
                         int l,
                         double a)
Sets the.

Parameters:
i - the i
j - the j
k - the k
l - the l
a - the a

set

public abstract void set(int i,
                         int j,
                         int k,
                         int l,
                         float a)
Sets the.

Parameters:
i - the i
j - the j
k - the k
l - the l
a - the a

set

public abstract void set(int i,
                         int j,
                         int k,
                         int l,
                         java.awt.Color a)
Sets the.

Parameters:
i - the i
j - the j
k - the k
l - the l
a - the a

set

public abstract void set(int i,
                         int j,
                         int k,
                         int l,
                         java.lang.Number a)
Sets the.

Parameters:
i - the i
j - the j
k - the k
l - the l
a - the a

set

public void set(int i,
                int j,
                int k,
                java.lang.Number a)
Sets the.

Parameters:
i - the i
j - the j
k - the k
a - the a

set

public void set(int i,
                int j,
                java.lang.Number a)
Sets the.

Parameters:
i - the i
j - the j
a - the a

set

public abstract void set(Voxel a)
Sets the.

Parameters:
a - the a

setName

public void setName(java.lang.String name)
Volume name used my MIPAV images when saving.

Parameters:
name - the name

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

dispose

public abstract void dispose()
Free any resources associated with an ImageData object. This is NOT necessary. It might encourage the garbage collector to collect resources more efficiently.


isNotAvailable

public boolean isNotAvailable()

getByte

public byte getByte(int i,
                    int j)
Gets the u byte.

Parameters:
i - the i
j - the j
Returns:
the u byte

getByte

public byte getByte(int i,
                    int j,
                    int k)
Gets the u byte.

Parameters:
i - the i
j - the j
k - the k
Returns:
the u byte

getByte

public abstract byte getByte(int i,
                             int j,
                             int k,
                             int l)
Gets the u byte.

Parameters:
i - the i
j - the j
k - the k
l - the l
Returns:
the u byte