com.xinapse.multisliceimage.Analyze
Class InfoExtendedData
java.lang.Object
com.xinapse.multisliceimage.Analyze.InfoExtendedData
- All Implemented Interfaces:
- java.lang.Cloneable
public class InfoExtendedData
- extends java.lang.Object
NIFTI 1.1 extended data that allows artibrary text to be associated with an image.
The extension is XML, and is to allow assignment of arbitary text to document the image.
In addition, each dimension of the image, and element of that dimension, can have
textual information assigned. For example, if there is a time dimension, each time sample
could have a time stamp or a "state" assigned. If there is a "slice" dimension,
each slice could have a record of the DICOM file from which the pixel data was extracted.
The XML is always standalone and has an internal DTD as in the example below.
The GeneralInfoList is a list of InfoItems, and contains information about the image as a whole.
A DimInfoList contains information about a specific dimension, and the attributes
Dimension and Element show which dimension is involved.
For example for a 3-D dataset, Dimension="Slice" refers to the slice dimension, Dimension="Row"
to the row dimension and Dimension="Col" to the column dimension.
For Dimension="Slice", Element="0" refers to the first slice, Element="1" to the second slice
etc.
The information is stored in an InfoItem, which has a name,value structure and the name can
be used to lookup any of the values.
This is the DTD for InfoExtendedData documents:
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<!DOCTYPE InfoExtendedData [
<!ELEMENT InfoExtendedData (GeneraInfoList?, DimInfoList*)>
<!ELEMENT GeneraInfoList (InfoItem*)>
<!ELEMENT DimInfoList (InfoItem*)>
<!ATTLIST DimInfoList Dimension (Col | Row | Slice | Time | 5 | 6 | 7 | 8 | 9 | 10) #REQUIRED Element CDATA #REQU
IRED>
<!ELEMENT InfoItem (Name,Value)>
<!ELEMENT Name (#PCDATA)>
<!ELEMENT Value (#PCDATA)>
<!--Xinapse Multi-Dimensional Image Extended Data-->
Here's an example of InfoExtendedData with information having been stored in the
"general" image information, and also in the Slice, and Row dimensions of the image.
There is a piece of information for slice 0, and another for slice 1.
<!--Xinapse Multi-Dimensional Image Extended Data-->
<InfoExtendedData>
<GeneraInfoList>
<InfoItem>
<Name>PatientName</Name>
<Value>Smith, AB</Value>
</InfoItem>
<InfoItem>
<Name><0x00100, 0x200A></Name>
<Value>Tag <0x001B, 0x134z> A DICOM Element (3)</Value>
</InfoItem>
<InfoItem>
<Name><0x00101, 0x200A></Name>
<Value>Tag <0x001B, 0x134z> A DICOM Element</Value>
</InfoItem>
</GeneraInfoList>
<DimInfoList Dimension="Slice" Element="0">
<InfoItem>
<Name><0x00101, 0x200A></Name>
<Value>Tag <0x001B, 0x134z> A DICOM Element A</Value>
</InfoItem>
</DimInfoList>
<DimInfoList Dimension="Slice" Element="1">
<InfoItem>
<Name><0x00101, 0x200A></Name>
<Value>Tag <0x001B, 0x134z> A DICOM Element A</Value>
</InfoItem>
</DimInfoList>
<DimInfoList Dimension="Row" Element="1">
<InfoItem>
<Name><0x00101, 0x200A></Name>
<Value>Tag <0x001B, 0x134z> A DICOM Element "C"</Value>
</InfoItem>
</DimInfoList>
</InfoExtendedData>
Here's how general information information looks after it has been read in
and converted to a java.lang.String using the toString()
method:
PatientName=Smith, AB
<0x00100, 0x200A>=Tag <0x001B, 0x134z> A DICOM Element (3)
<0x00101, 0x200A>=Tag <0x001B, 0x134z> A DICOM Element
You should not manipulate the InfoExtendedData directly, but should use methods
of the InfoStorer interface (such as getInfo(), putInfo())
of the NIFTIImage class.
|
Field Summary |
static int |
CODE
The ecode for an InfoExtendedData extension. |
|
Method Summary |
InfoExtendedData |
clone()
|
static com.xinapse.multisliceimage.Analyze.ExtendedData |
getInstance(byte[] bArray,
int eCode)
Creates a new block of NIFTI extended data. |
static void |
main(java.lang.String[] args)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CODE
public static final int CODE
- The ecode for an InfoExtendedData extension.
- See Also:
- Constant Field Values
clone
public InfoExtendedData clone()
toString
public java.lang.String toString()
main
public static void main(java.lang.String[] args)
getInstance
public static com.xinapse.multisliceimage.Analyze.ExtendedData getInstance(byte[] bArray,
int eCode)
throws java.io.IOException
- Creates a new block of NIFTI extended data.
- Parameters:
bArray - the data encapsulates the extended data.eCode - the ecode for the extended data.
- Throws:
java.io.IOException - if the length of the byte[] is not a multiple of 16.
Copyright 2006-2011 Xinapse Systems Limited. All Rights Reserved.