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

java.lang.Object
  extended by edu.jhu.ece.iacl.jist.structures.image.ImageData
      extended by edu.jhu.ece.iacl.jist.structures.image.ImageDataMipav
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
ImageDataMipavPointer, ImageDataMipavWrapper

public class ImageDataMipav
extends ImageData

Cubic volume adapter to MIPAV ModelImage type. Model Images can be wrapped in this class without copying data values and preserving header information.

Author:
Blake Lucas
See Also:
Serialized Form

Field Summary
protected  ModelImage img
          The img.
 
Fields inherited from class edu.jhu.ece.iacl.jist.structures.image.ImageData
cols, components, imageHeader, name, rows, slices, type
 
Constructor Summary
protected ImageDataMipav()
           
  ImageDataMipav(ImageData vol)
          Instantiates a new image data mipav.
  ImageDataMipav(ModelImage img)
           
  ImageDataMipav(java.lang.String name, int rows, int cols)
          Instantiates a new image data mipav.
  ImageDataMipav(java.lang.String name, int rows, int cols, int slices)
          Instantiates a new image data mipav.
  ImageDataMipav(java.lang.String name, int rows, int cols, int slices, int components)
          Instantiates a new image data mipav.
  ImageDataMipav(java.lang.String name, VoxelType type, int rows, int cols, int slices)
          Instantiates a new image data mipav.
  ImageDataMipav(java.lang.String name, VoxelType type, int rows, int cols, int slices, int components)
          Instantiates a new image data mipav.
 
Method Summary
 ImageData clone()
           
static void copyDataToModelImage(ImageData vol, ModelImage img)
          Copy data to model image.
static ModelImage createModelImage(ImageData vol)
          Creates the model image.
static ModelImage createModelImage(ImageData vol, ModelImage img)
          Creates the model image.
 void dispose()
          Free any resources associated with an ImageData object.
 ModelImage extractModelImage()
           
protected  void finalize()
           
 java.lang.Number get(int i, int j, int k, int l)
          Get vector component for volume.
 boolean getBoolean(int i, int j, int k, int l)
          Gets the boolean.
 byte getByte(int i, int j, int k, int l)
          Gets the u byte.
 java.awt.Color getColor(int i, int j, int k, int l)
          Gets the color.
 double getDouble(int i, int j, int k, int l)
          Gets the double.
 float getFloat(int i, int j, int k, int l)
          Gets the float.
 int getInt(int i, int j, int k, int l)
          Gets the int.
static int getMipavType(VoxelType type)
          Get MIPAV voxel type for specified voxel type MIPAV types are ambiguous because they use integers instead of enums This function is not reflexive for Vector types since MIPAV doesn't have a Vector type.
 ModelImage getModelImageCopy()
          Gets the model image.
 ModelImage getModelImageDirect()
           
 short getShort(int i, int j, int k, int l)
          Gets the short.
 short getUByte(int i, int j, int k, int l)
          Gets the u byte.
static VoxelType getVoxelType(int mipavType)
          Get voxel type for specified MIPAV voxel type MIPAV types are ambiguous because they use integers instead of enums.
 void ImageDataMipavPrivate(ModelImage img)
          Instantiates a new image data mipav.
 boolean isNotAvailable()
           
 ImageDataMipav mimic()
          Create new cubic volume of the same subclass type with the same dimensions Does not copy the values in the volume.
 ImageDataMipav mimic(int rows, int cols, int slices, int components)
          Mimic.
 void set(int i, int j, java.awt.Color c)
          Sets the.
 void set(int i, int j, int k, int l, boolean a)
          Sets the.
 void set(int i, int j, int k, int l, byte a)
          Sets the.
 void set(int i, int j, int k, int l, java.awt.Color c)
          Sets the.
 void set(int i, int j, int k, int l, double a)
          Sets the.
 void set(int i, int j, int k, int l, float a)
          Sets the.
 void set(int i, int j, int k, int l, int a)
          Sets the.
 void set(int i, int j, int k, int l, java.lang.Number a)
          Sets the.
 void set(int i, int j, int k, int l, short a)
          Set vector Component.
 void set(Voxel a)
          Sets the.
 void setHeader(ImageHeader info)
          Sets the header.
 void setName(java.lang.String name)
          Volume name used my MIPAV images when saving.
 
Methods inherited from class edu.jhu.ece.iacl.jist.structures.image.ImageData
clone, clone, clone, get, get, getBoolean, getBoolean, getByte, getByte, getColor, getColor, getCols, getComponents, getDouble, getDouble, getFloat, getFloat, getHeader, getInt, getInt, getName, getRows, getShort, getShort, getSlices, getType, getUByte, getUByte, getUShort, getUShort, getUShort, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

img

protected ModelImage img
The img.

Constructor Detail

ImageDataMipav

public ImageDataMipav(ImageData vol)
Instantiates a new image data mipav.

Parameters:
vol - the vol

ImageDataMipav

public ImageDataMipav(ModelImage img)

ImageDataMipav

public ImageDataMipav(java.lang.String name,
                      int rows,
                      int cols)
Instantiates a new image data mipav.

Parameters:
name - the name
rows - the rows
cols - the cols
slices - the slices

ImageDataMipav

public ImageDataMipav(java.lang.String name,
                      int rows,
                      int cols,
                      int slices)
Instantiates a new image data mipav.

Parameters:
name - the name
rows - the rows
cols - the cols
slices - the slices

ImageDataMipav

public ImageDataMipav(java.lang.String name,
                      int rows,
                      int cols,
                      int slices,
                      int components)
Instantiates a new image data mipav.

Parameters:
name - the name
rows - the rows
cols - the cols
slices - the slices
components - the components

ImageDataMipav

public ImageDataMipav(java.lang.String name,
                      VoxelType type,
                      int rows,
                      int cols,
                      int slices)
Instantiates a new image data mipav.

Parameters:
name - the name
type - the type
rows - the rows
cols - the cols
slices - the slices

ImageDataMipav

public ImageDataMipav(java.lang.String name,
                      VoxelType type,
                      int rows,
                      int cols,
                      int slices,
                      int components)
Instantiates a new image data mipav.

Parameters:
name - the name
type - the type
rows - the rows
cols - the cols
slices - the slices
components - the components

ImageDataMipav

protected ImageDataMipav()
Method Detail

copyDataToModelImage

public static void copyDataToModelImage(ImageData vol,
                                        ModelImage img)
Copy data to model image.

Parameters:
vol - the vol
img - the img

createModelImage

public static ModelImage createModelImage(ImageData vol)
Creates the model image.

Parameters:
vol - the vol
Returns:
the model image

setHeader

public void setHeader(ImageHeader info)
Description copied from class: ImageData
Sets the header.

Overrides:
setHeader in class ImageData
Parameters:
info - the new header

createModelImage

public static ModelImage createModelImage(ImageData vol,
                                          ModelImage img)
Creates the model image.

Parameters:
vol - the vol
img - the img
Returns:
the model image

getMipavType

public static int getMipavType(VoxelType type)
Get MIPAV voxel type for specified voxel type MIPAV types are ambiguous because they use integers instead of enums This function is not reflexive for Vector types since MIPAV doesn't have a Vector type.

Parameters:
type - the type
Returns:
the mipav type

getVoxelType

public static VoxelType getVoxelType(int mipavType)
Get voxel type for specified MIPAV voxel type MIPAV types are ambiguous because they use integers instead of enums.

Parameters:
mipavType - the mipav type
Returns:
the voxel type

ImageDataMipavPrivate

public void ImageDataMipavPrivate(ModelImage img)
Instantiates a new image data mipav.

Parameters:
img - the img

clone

public ImageData clone()
Specified by:
clone in class ImageData

get

public java.lang.Number get(int i,
                            int j,
                            int k,
                            int l)
Description copied from class: ImageData
Get vector component for volume.

Specified by:
get in class ImageData
Parameters:
i - row
j - column
k - slice
l - component
Returns:
the number

getBoolean

public boolean getBoolean(int i,
                          int j,
                          int k,
                          int l)
Description copied from class: ImageData
Gets the boolean.

Specified by:
getBoolean in class ImageData
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,
                               int k,
                               int l)
Description copied from class: ImageData
Gets the color.

Specified by:
getColor in class ImageData
Parameters:
i - the i
j - the j
k - the k
l - the l
Returns:
the color

getDouble

public double getDouble(int i,
                        int j,
                        int k,
                        int l)
Description copied from class: ImageData
Gets the double.

Specified by:
getDouble in class ImageData
Parameters:
i - the i
j - the j
k - the k
l - the l
Returns:
the double

getFloat

public float getFloat(int i,
                      int j,
                      int k,
                      int l)
Description copied from class: ImageData
Gets the float.

Specified by:
getFloat in class ImageData
Parameters:
i - the i
j - the j
k - the k
l - the l
Returns:
the float

getInt

public int getInt(int i,
                  int j,
                  int k,
                  int l)
Description copied from class: ImageData
Gets the int.

Specified by:
getInt in class ImageData
Parameters:
i - the i
j - the j
k - the k
l - the l
Returns:
the int

getModelImageCopy

public ModelImage getModelImageCopy()
Description copied from class: ImageData
Gets the model image.

Overrides:
getModelImageCopy in class ImageData
Returns:
the model image

getShort

public short getShort(int i,
                      int j,
                      int k,
                      int l)
Description copied from class: ImageData
Gets the short.

Specified by:
getShort in class ImageData
Parameters:
i - the i
j - the j
k - the k
l - the l
Returns:
the short

getUByte

public short getUByte(int i,
                      int j,
                      int k,
                      int l)
Description copied from class: ImageData
Gets the u byte.

Specified by:
getUByte in class ImageData
Parameters:
i - the i
j - the j
k - the k
l - the l
Returns:
the u byte

mimic

public ImageDataMipav mimic()
Description copied from class: ImageData
Create new cubic volume of the same subclass type with the same dimensions Does not copy the values in the volume.

Specified by:
mimic in class ImageData
Returns:
the image data

mimic

public ImageDataMipav mimic(int rows,
                            int cols,
                            int slices,
                            int components)
Description copied from class: ImageData
Mimic.

Specified by:
mimic in class ImageData
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,
                int k,
                int l,
                boolean a)
Description copied from class: ImageData
Sets the.

Specified by:
set in class ImageData
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,
                int l,
                byte 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,
                java.awt.Color c)
Description copied from class: ImageData
Sets the.

Overrides:
set in class ImageData
Parameters:
i - the i
j - the j
c - the a

set

public void set(int i,
                int j,
                int k,
                int l,
                double a)
Description copied from class: ImageData
Sets the.

Specified by:
set in class ImageData
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,
                int l,
                float a)
Description copied from class: ImageData
Sets the.

Specified by:
set in class ImageData
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,
                int l,
                int a)
Description copied from class: ImageData
Sets the.

Specified by:
set in class ImageData
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,
                int l,
                java.awt.Color c)
Description copied from class: ImageData
Sets the.

Specified by:
set in class ImageData
Parameters:
i - the i
j - the j
k - the k
l - the l
c - the a

set

public void set(int i,
                int j,
                int k,
                int l,
                short a)
Set vector Component.

Specified by:
set in class ImageData
Parameters:
i - the i
j - the j
k - the k
l - the l
a - the a

set

public void set(Voxel a)
Description copied from class: ImageData
Sets the.

Specified by:
set in class ImageData
Parameters:
a - the a

setName

public void setName(java.lang.String name)
Description copied from class: ImageData
Volume name used my MIPAV images when saving.

Overrides:
setName in class ImageData
Parameters:
name - the name

dispose

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

Specified by:
dispose in class ImageData

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable

getModelImageDirect

public ModelImage getModelImageDirect()

extractModelImage

public ModelImage extractModelImage()

isNotAvailable

public boolean isNotAvailable()
Overrides:
isNotAvailable in class ImageData

set

public void set(int i,
                int j,
                int k,
                int l,
                java.lang.Number a)
Description copied from class: ImageData
Sets the.

Specified by:
set in class ImageData
Parameters:
i - the i
j - the j
k - the k
l - the l
a - the a

getByte

public byte getByte(int i,
                    int j,
                    int k,
                    int l)
Description copied from class: ImageData
Gets the u byte.

Specified by:
getByte in class ImageData
Parameters:
i - the i
j - the j
k - the k
l - the l
Returns:
the u byte