Package gov.nih.mipav.model.file
Class FileMincVarElem
java.lang.Object
gov.nih.mipav.model.structures.ModelSerialCloneable
gov.nih.mipav.model.file.FileMincVarElem
- All Implemented Interfaces:
Serializable,Cloneable
This class represents a MINC variable element. MINC variables consist of a name, a dimid array (often empty), an
attribute array, a type, a begin, and a size. The attribute array contains important image information. The "type"
indicates the actual type of the variable (not the attributes). The begin is the location in the file where the
variable is first written; the size is how many bytes the variable takes up. So for example the variable image has a
bunch of attributes such as signtype, vmin, and vmax that are necessary for proper read. Then the type is the type of
the image (often short) and the begin is where the image data actually begins. The size is
extents[0]*extents[1]*extents[2]*byte size.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionintDOCUMENT ME!DOCUMENT ME!double[]DOCUMENT ME!int[]DOCUMENT ME!DOCUMENT ME!intDOCUMENT ME!intDOCUMENT ME!private static final longUse serialVersionUID for interoperability.DOCUMENT ME!doubleDOCUMENT ME!doublein zspace, step == slice gap, not necessarily slice thicknessdoubleDOCUMENT ME!DOCUMENT ME!DOCUMENT ME!DOCUMENT ME!doubleDOCUMENT ME!doubleDOCUMENT ME!intDOCUMENT ME! -
Constructor Summary
ConstructorsConstructorDescriptionFileMincVarElem(String name, int nelems, int[] dimid) Constructor for the MINC variable element. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddVattElem(String name, int type, int length, int index) Adds an attribute element to the variable attribute array.voidaddVattValue(FileMincAttElem elem, Object value, int index) Sets the value of a variable attribute element.clone()Creates a new version of this variable, copying all the important information.voidcreateVattArray(int length) Creates a new variable attribute array.getVattElem(int index) Returns the variable attribute located atindexin the array.voidsetOther(int nc_type, int vsize, int begin) Sets the information in the variable that comes after the attribute array.voidAdds value to values vector.toString()Converts information contained in variable to a readable form.Methods inherited from class gov.nih.mipav.model.structures.ModelSerialCloneable
nativeClone
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDUse serialVersionUID for interoperability.- See Also:
-
begin
public int beginDOCUMENT ME! -
comments
DOCUMENT ME! -
cosines
public double[] cosinesDOCUMENT ME! -
dimid
public int[] dimidDOCUMENT ME! -
name
DOCUMENT ME! -
nc_type
public int nc_typeDOCUMENT ME! -
nelems
public int nelemsDOCUMENT ME! -
step
public double stepin zspace, step == slice gap, not necessarily slice thickness -
signtype
DOCUMENT ME! -
start
public double startDOCUMENT ME! -
trueStart
public double trueStartDOCUMENT ME! -
units
DOCUMENT ME! -
values
DOCUMENT ME! -
vattArray
DOCUMENT ME! -
vmax
public double vmaxDOCUMENT ME! -
vmin
public double vminDOCUMENT ME! -
vsize
public int vsizeDOCUMENT ME!
-
-
Constructor Details
-
FileMincVarElem
Constructor for the MINC variable element.- Parameters:
name- The name of the variable (e.g., image, image-min, image-max).nelems- The number of elements in this variable.dimid- Array of dimension ids; often empty.
-
-
Method Details
-
addVattElem
Adds an attribute element to the variable attribute array.- Parameters:
name- Name of the attribute.type- DOCUMENT ME!length- Length of the attribute.index- Where to put the element in the variable attribute array.
-
addVattValue
Sets the value of a variable attribute element. If the element is image, xspace, yspace, or zspace, sets important image information.- Parameters:
elem- Element to set value of.value- Value to set element to.index- Index in attribute element to set value to.
-
clone
Creates a new version of this variable, copying all the important information.- Overrides:
clonein classModelSerialCloneable- Returns:
- An exact copy of this variable.
-
createVattArray
public void createVattArray(int length) Creates a new variable attribute array. For example, the "image" variable has important information about the image recorded in the variables attribute array.- Parameters:
length- The size of this variable attribute array.
-
getVattElem
Returns the variable attribute located atindexin the array.- Parameters:
index- Where in the variable attribute array the attribute is located.- Returns:
- The attribute.
-
setOther
public void setOther(int nc_type, int vsize, int begin) Sets the information in the variable that comes after the attribute array.- Parameters:
nc_type- Type of data (byte, short, float, etc.)vsize- Size of the variable.begin- Where this variable's data starts.
-
setValue
Adds value to values vector.- Parameters:
value- Value to add.
-
toString
Converts information contained in variable to a readable form. This is displayed in displayAboutInfo.
-