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

java.lang.Object
  extended by edu.jhu.ece.iacl.jist.structures.image.ImageHeader
All Implemented Interfaces:
java.lang.Cloneable

public class ImageHeader
extends java.lang.Object
implements java.lang.Cloneable

The Class ImageHeader.

Author:
Blake Lucas (bclucas@jhu.edu) Sagittal da

Nested Class Summary
static class ImageHeader.AxisOrientation
          The Enum AxisOrientation.
static class ImageHeader.Compression
          The Enum Compression.
static class ImageHeader.Endianess
          The Enum Endianess.
static class ImageHeader.ImageModality
          The Enum ImageModality.
static class ImageHeader.ImageOrientation
          The Enum ImageOrientation.
static class ImageHeader.MeasurementUnit
          The Enum MeasurementUnit.
 
Field Summary
protected  ImageHeader.AxisOrientation[] axisOrientation
          The axis orientation.
static java.lang.String[] axisOrientationNames
          The Constant axisOrientationNames.
protected  ImageHeader.Compression compressionType
          The compression type.
protected  boolean defaultHeader
          The default header.
protected  float[] dimResolutions
          The dim resolutions.
protected  ImageHeader.Endianess endianess
          The endianess.
protected  ImageHeader.ImageOrientation imageOrientation
          The image orientation.
static java.lang.String[] imageOrientationNames
          The Constant imageOrientationNames.
static java.lang.String[] measurementUnitNames
          The Constant measurementUnitNames.
protected  ImageHeader.ImageModality modality
          The modality.
protected  float[] origin
          The origin.
protected  float sliceThickness
          The slice thickness.
protected  ImageHeader.MeasurementUnit[] unitsOfMeasure
          The units of measure.
 
Constructor Summary
ImageHeader()
          Instantiates a new image header.
ImageHeader(FileInfoBase fileInfo)
          Instantiates a new image header.
 
Method Summary
 ImageHeader clone()
           
 void copyAllInfoTo(FileInfoBase fileInfo)
          Copy all info to.
 void copyBasicInfoTo(FileInfoBase fileInfo)
          Copy basic info to.
 void copyGeometry(ImageHeader copyme)
          Copy geometry from one image header into this one.
 ImageHeader.AxisOrientation[] getAxisOrientation()
          Gets the axis orientation.
 ImageHeader.Compression getCompressionType()
          Gets the compression type.
 float[] getDimResolutions()
          Gets the dim resolutions.
 ImageHeader.Endianess getEndianess()
          Gets the endianess.
 ImageHeader.ImageOrientation getImageOrientation()
          Gets the image orientation.
 ImageHeader.ImageModality getModality()
          Gets the modality.
 float[] getOrigin()
          Gets the origin.
 float getSliceThickness()
          Gets the slice thickness.
 ImageHeader.MeasurementUnit[] getUnitsOfMeasure()
          Gets the units of measure.
 boolean hasComparableGeometry(ImageHeader hdr)
          NOTE: This method is a stub.
 boolean isDefaultHeader()
          Checks if is default header.
 boolean isSameOrientation(ImageHeader hdr)
          Compares the orientation of this header with another header.
 boolean isSameResolution(ImageHeader hdr)
          Compares the resolution of this header with another header.
 void setAxisOrientation(ImageHeader.AxisOrientation[] axisOrientation)
          Sets the axis orientation.
 void setCompressionType(ImageHeader.Compression compressionType)
          Sets the compression type.
 void setDimResolutions(float[] dimResolutions)
          Sets the dim resolutions.
 void setEndianess(ImageHeader.Endianess endianess)
          Sets the endianess.
 void setImageOrientation(ImageHeader.ImageOrientation imageOrientation)
          Sets the image orientation.
 void setModality(ImageHeader.ImageModality modality)
          Sets the modality.
 void setOrigin(float[] origin)
          Sets the origin.
 void setSliceThickness(float sliceThickness)
          Sets the slice thickness.
 void setUnitsOfMeasure(ImageHeader.MeasurementUnit[] unitsOfMeasure)
          Sets the units of measure.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

measurementUnitNames

public static final java.lang.String[] measurementUnitNames
The Constant measurementUnitNames.


axisOrientationNames

public static final java.lang.String[] axisOrientationNames
The Constant axisOrientationNames.


imageOrientationNames

public static final java.lang.String[] imageOrientationNames
The Constant imageOrientationNames.


axisOrientation

protected ImageHeader.AxisOrientation[] axisOrientation
The axis orientation.


imageOrientation

protected ImageHeader.ImageOrientation imageOrientation
The image orientation.


modality

protected ImageHeader.ImageModality modality
The modality.


origin

protected float[] origin
The origin.


dimResolutions

protected float[] dimResolutions
The dim resolutions.


unitsOfMeasure

protected ImageHeader.MeasurementUnit[] unitsOfMeasure
The units of measure.


compressionType

protected ImageHeader.Compression compressionType
The compression type.


endianess

protected ImageHeader.Endianess endianess
The endianess.


sliceThickness

protected float sliceThickness
The slice thickness.


defaultHeader

protected boolean defaultHeader
The default header.

Constructor Detail

ImageHeader

public ImageHeader()
Instantiates a new image header.


ImageHeader

public ImageHeader(FileInfoBase fileInfo)
Instantiates a new image header.

Parameters:
fileInfo - the file info
Method Detail

copyAllInfoTo

public void copyAllInfoTo(FileInfoBase fileInfo)
Copy all info to.

Parameters:
fileInfo - the file info

copyBasicInfoTo

public void copyBasicInfoTo(FileInfoBase fileInfo)
Copy basic info to.

Parameters:
fileInfo - the file info

clone

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

getAxisOrientation

public ImageHeader.AxisOrientation[] getAxisOrientation()
Gets the axis orientation.

Returns:
the axisOrientation

setAxisOrientation

public void setAxisOrientation(ImageHeader.AxisOrientation[] axisOrientation)
Sets the axis orientation.

Parameters:
axisOrientation - the axisOrientation to set

getImageOrientation

public ImageHeader.ImageOrientation getImageOrientation()
Gets the image orientation.

Returns:
the imageOrientation

setImageOrientation

public void setImageOrientation(ImageHeader.ImageOrientation imageOrientation)
Sets the image orientation.

Parameters:
imageOrientation - the imageOrientation to set

getModality

public ImageHeader.ImageModality getModality()
Gets the modality.

Returns:
the modality

setModality

public void setModality(ImageHeader.ImageModality modality)
Sets the modality.

Parameters:
modality - the modality to set

getOrigin

public float[] getOrigin()
Gets the origin.

Returns:
the origin

setOrigin

public void setOrigin(float[] origin)
Sets the origin.

Parameters:
origin - the origin to set

getDimResolutions

public float[] getDimResolutions()
Gets the dim resolutions.

Returns:
the dimResolutions

setDimResolutions

public void setDimResolutions(float[] dimResolutions)
Sets the dim resolutions.

Parameters:
dimResolutions - the dimResolutions to set

getUnitsOfMeasure

public ImageHeader.MeasurementUnit[] getUnitsOfMeasure()
Gets the units of measure.

Returns:
the unitsOfMeasure

setUnitsOfMeasure

public void setUnitsOfMeasure(ImageHeader.MeasurementUnit[] unitsOfMeasure)
Sets the units of measure.

Parameters:
unitsOfMeasure - the unitsOfMeasure to set

getCompressionType

public ImageHeader.Compression getCompressionType()
Gets the compression type.

Returns:
the compressionType

setCompressionType

public void setCompressionType(ImageHeader.Compression compressionType)
Sets the compression type.

Parameters:
compressionType - the compressionType to set

getEndianess

public ImageHeader.Endianess getEndianess()
Gets the endianess.

Returns:
the endianess

setEndianess

public void setEndianess(ImageHeader.Endianess endianess)
Sets the endianess.

Parameters:
endianess - the endianess to set

getSliceThickness

public float getSliceThickness()
Gets the slice thickness.

Returns:
the sliceThickness

setSliceThickness

public void setSliceThickness(float sliceThickness)
Sets the slice thickness.

Parameters:
sliceThickness - the sliceThickness to set

isDefaultHeader

public boolean isDefaultHeader()
Checks if is default header.

Returns:
true, if is default header

copyGeometry

public void copyGeometry(ImageHeader copyme)
Copy geometry from one image header into this one. Does not alter image dimensions.

Parameters:
copyme - the header from which to copy data

hasComparableGeometry

public boolean hasComparableGeometry(ImageHeader hdr)
NOTE: This method is a stub.

Parameters:
hdr - - Image header to compare current header with
Returns:
true - geometries are equivalent. false - they are not equal

isSameOrientation

public boolean isSameOrientation(ImageHeader hdr)
Compares the orientation of this header with another header.

Parameters:
hdr -
Returns:
true - orientations are the same. false otherwise.

isSameResolution

public boolean isSameResolution(ImageHeader hdr)
Compares the resolution of this header with another header.

Parameters:
hdr -
Returns:
true - resolutions are the same. false otherwise.