Package gov.nih.mipav.model.file
Class FileMincAttElem
java.lang.Object
gov.nih.mipav.model.structures.ModelSerialCloneable
gov.nih.mipav.model.file.FileMincAttElem
- All Implemented Interfaces:
Serializable,Cloneable
This class represents a MINC atrribute element. Atrribute elements consist of a name, a type (as in byte, char, etc),
a number of elements, and an array of values. Often, the type is char and thus the array is an array of chars - or a
string. Another example is name="valid_range", type=double, nelems=2, and array[0] = 0.0, array[1] = 4095.0.
- Author:
- Neva Cherniavsky
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFileMincAttElem(String name, int nc_type, int length) Constructor that creates the attribute element and initializes the array to the type of the parameter and the length of the parameter. -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates a new MincAttElem with the same parameters and values as this one.Returns the value stored in this minc attribute as a String.voidSets the attribute's value array to the value at the indicated index.toString()Method that converts this attribute to a readable string.Methods inherited from class gov.nih.mipav.model.structures.ModelSerialCloneable
nativeClone
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDUse serialVersionUID for interoperability.- See Also:
-
name
DOCUMENT ME! -
nc_type
public int nc_typeDOCUMENT ME! -
nelems
public int nelemsDOCUMENT ME! -
values
DOCUMENT ME!
-
-
Constructor Details
-
FileMincAttElem
Constructor that creates the attribute element and initializes the array to the type of the parameter and the length of the parameter.- Parameters:
name- The name of this attributenc_type- The type of this attribute, as in byte, char, etc.length- The length of the array holding the value of this attribute
-
-
Method Details
-
clone
Creates a new MincAttElem with the same parameters and values as this one.- Overrides:
clonein classModelSerialCloneable- Returns:
- The new MincAttElem.
-
setValue
Sets the attribute's value array to the value at the indicated index.- Parameters:
value- Value to set.index- Place in the array to put the value.
-
toString
Method that converts this attribute to a readable string. Used in displayAboutInfo for the image. -
getValueString
Returns the value stored in this minc attribute as a String.- Returns:
- The values in the attribute, nc_char values are joined together, all other types are separated by spaces.
-