com.xinapse.multisliceimage
Enum MostLikePlane

java.lang.Object
  extended by java.lang.Enum<MostLikePlane>
      extended by com.xinapse.multisliceimage.MostLikePlane
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<MostLikePlane>

public enum MostLikePlane
extends java.lang.Enum<MostLikePlane>

The radiological planes that can be used to describe the approximate orientation of a scan plane.


Enum Constant Summary
AXIAL
          The MostLikePlane corresponding to an axial orientation.
CORONAL
          The MostLikePlane corresponding to a coronal orientation.
SAGITTAL
          The MostLikePlane corresponding to a sagittal orientation.
UNKNOWN
          The MostLikePlane corresponding to an unknown orientation.
 
Method Summary
 javax.vecmath.Vector3f[] getImageOrientationPatient()
          Returns the image orientation in patient coordinates for an image plane which is exactly in this MostLikePlane.
static MostLikePlane getInstance(float[][] imageOrientationPatient)
          Returns the MostLikePlane corresponding to the image orientation in patient coordinates.
static MostLikePlane getInstance(java.lang.String s)
          Returns a MostLikePlane corresponding to a string.
static MostLikePlane getInstance(javax.vecmath.Vector3f[] imageOrientationPatient)
          Returns the MostLikePlane corresponding to the image orientation in patient coordinates.
static MostLikePlane selectPlane(java.awt.Component parentComponent)
          Shows a dialog prompting the user to select a scan plane.
 java.lang.String toString()
          Returns a java.lang.String describing this MostLikePlane.
static MostLikePlane valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static MostLikePlane[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

UNKNOWN

public static final MostLikePlane UNKNOWN
The MostLikePlane corresponding to an unknown orientation.


AXIAL

public static final MostLikePlane AXIAL
The MostLikePlane corresponding to an axial orientation.


SAGITTAL

public static final MostLikePlane SAGITTAL
The MostLikePlane corresponding to a sagittal orientation.


CORONAL

public static final MostLikePlane CORONAL
The MostLikePlane corresponding to a coronal orientation.

Method Detail

values

public static MostLikePlane[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (MostLikePlane c : MostLikePlane.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static MostLikePlane valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getInstance

public static MostLikePlane getInstance(java.lang.String s)
                                 throws com.xinapse.util.InvalidArgumentException
Returns a MostLikePlane corresponding to a string.

Parameters:
s - a java.lang.String from which the most-like plane will be interpreted. Can be:
  • "unknown",
  • "axial",
  • "sagittal", or
  • "coronal".
Interpretation of the String is case-insensitive.
Returns:
a MostLikePlane corresponding to a String, or UNKNOWN if the String is invalid.
Throws:
InvalidArgumentException - if the string is invalid.

getInstance

public static MostLikePlane getInstance(float[][] imageOrientationPatient)
Returns the MostLikePlane corresponding to the image orientation in patient coordinates.

Parameters:
imageOrientationPatient - a 2x3 or 3x3 float[][] containing the direction cosines of the image row, column and (possibly) slice directions of the image matrix.
Returns:
the MostLikePlane corresponding to the image orientation direction cosines.

getInstance

public static MostLikePlane getInstance(javax.vecmath.Vector3f[] imageOrientationPatient)
Returns the MostLikePlane corresponding to the image orientation in patient coordinates.

Parameters:
imageOrientationPatient - a Vector3f[] of length at least 3 containing the direction cosines of the image row, column and (possibly) slice directions of the image matrix.
Returns:
the MostLikePlane corresponding to the image orientation direction cosines.

getImageOrientationPatient

public javax.vecmath.Vector3f[] getImageOrientationPatient()
Returns the image orientation in patient coordinates for an image plane which is exactly in this MostLikePlane.

Returns:
the image orientation in patient coordinates, or null if this is MostLikePlane.UNKNOWN.

selectPlane

public static MostLikePlane selectPlane(java.awt.Component parentComponent)
                                 throws CancelledException
Shows a dialog prompting the user to select a scan plane.

Parameters:
parentComponent - the parent java.awt.Component of the dialog.
Returns:
the MostLikePlane selected by the user.
Throws:
CancelledException - if selection is cancelled by the user.

toString

public java.lang.String toString()
Returns a java.lang.String describing this MostLikePlane.

Overrides:
toString in class java.lang.Enum<MostLikePlane>
Returns:
a java.lang.String describing this MostLikePlane.


Copyright 2006-2011 Xinapse Systems Limited. All Rights Reserved.