Package gov.nih.mipav.model.file
Class FileImageXML.MyXMLHandler
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- gov.nih.mipav.model.file.FileImageXML.MyXMLHandler
-
- All Implemented Interfaces:
org.xml.sax.ContentHandler
,org.xml.sax.DTDHandler
,org.xml.sax.EntityResolver
,org.xml.sax.ErrorHandler
- Enclosing class:
- FileImageXML
private class FileImageXML.MyXMLHandler extends org.xml.sax.helpers.DefaultHandler
Used by the XML Parser to parse the xml header.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) float[]
acpcMax
DOCUMENT ME!(package private) int
acpcMaxCount
DOCUMENT ME!(package private) float[]
acpcMin
DOCUMENT ME!(package private) int
acpcMinCount
DOCUMENT ME!(package private) float[]
acpcPC
DOCUMENT ME!(package private) int
acpcPCCount
DOCUMENT ME!(package private) java.util.Vector<VOI>
annotationVector
DOCUMENT ME!(package private) VOI
annotationVOI
DOCUMENT ME!(package private) int
axisCount
DOCUMENT ME!(package private) java.lang.String
currentKey
DOCUMENT ME!(package private) java.lang.String
elementBuffer
DOCUMENT ME!(package private) int
extentsCount
DOCUMENT ME!(package private) FileInfoImageXML
fileInfo
DOCUMENT ME!(package private) float[]
firstResolutions
DOCUMENT ME!(package private) int
gradCount
(package private) boolean
isColor
DOCUMENT ME!(package private) TransMatrix
matrix
DOCUMENT ME!(package private) int
matrixCol
DOCUMENT ME!(package private) int
matrixRow
DOCUMENT ME!(package private) java.util.Vector<TransMatrix>
matrixVector
(package private) int
nDimensions
DOCUMENT ME!(package private) int
numInvestigators
DOCUMENT ME!(package private) int
numParameters
DOCUMENT ME!(package private) float[]
origAC
DOCUMENT ME!(package private) int
origACCount
DOCUMENT ME!(package private) int[]
origDim
DOCUMENT ME!(package private) int
origDimCount
DOCUMENT ME!(package private) float[]
origOrientation
DOCUMENT ME!(package private) int
origOrientationCount
DOCUMENT ME!(package private) float[]
origOrigin
(package private) int
origOriginCount
(package private) float[]
origPC
DOCUMENT ME!(package private) int
origPCCount
DOCUMENT ME!(package private) float[]
origRes
DOCUMENT ME!(package private) int
origResCount
DOCUMENT ME!(package private) int
resInfoCount
DOCUMENT ME!(package private) float[][]
resolutions
DOCUMENT ME!(package private) int
resolutionsCount
DOCUMENT ME!(package private) int
startCount
DOCUMENT ME!(package private) TalairachTransformInfo
talairach
DOCUMENT ME!(package private) int[]
thumbnailBuffer
DOCUMENT ME!(package private) int
thumbnailBufferIndex
DOCUMENT ME!(package private) int
thumbnailXDim
DOCUMENT ME!(package private) int
thumbnailYDim
DOCUMENT ME!(package private) float[]
tlrcRes
DOCUMENT ME!(package private) int
tlrcResCount
DOCUMENT ME!(package private) int
unitsCount
DOCUMENT ME!
-
Constructor Summary
Constructors Constructor Description MyXMLHandler(FileInfoImageXML fInfo, java.util.Vector<VOI> anVector, java.util.Vector<TransMatrix> mVector, TalairachTransformInfo tal)
Creates a new MyXMLHandler object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
characters(char[] ch, int start, int length)
Text data callback from parser.void
endDocument()
Do nothing.void
endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName)
Called by parser when the end of an element is reached in the document.float[][]
getResolutions()
Accessor to return the resolutions per slice as parsed from the XML header.void
skippedEntity(java.lang.String name)
Do nothing but show the entity we skipped.void
startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)
Parser calls this for the beginning of each element in the document.
-
-
-
Field Detail
-
acpcMax
float[] acpcMax
DOCUMENT ME!
-
acpcMaxCount
int acpcMaxCount
DOCUMENT ME!
-
gradCount
int gradCount
-
acpcMin
float[] acpcMin
DOCUMENT ME!
-
acpcMinCount
int acpcMinCount
DOCUMENT ME!
-
acpcPC
float[] acpcPC
DOCUMENT ME!
-
acpcPCCount
int acpcPCCount
DOCUMENT ME!
-
annotationVector
java.util.Vector<VOI> annotationVector
DOCUMENT ME!
-
annotationVOI
VOI annotationVOI
DOCUMENT ME!
-
axisCount
int axisCount
DOCUMENT ME!
-
currentKey
java.lang.String currentKey
DOCUMENT ME!
-
elementBuffer
java.lang.String elementBuffer
DOCUMENT ME!
-
extentsCount
int extentsCount
DOCUMENT ME!
-
fileInfo
FileInfoImageXML fileInfo
DOCUMENT ME!
-
firstResolutions
float[] firstResolutions
DOCUMENT ME!
-
isColor
boolean isColor
DOCUMENT ME!
-
matrixVector
java.util.Vector<TransMatrix> matrixVector
-
matrix
TransMatrix matrix
DOCUMENT ME!
-
matrixCol
int matrixCol
DOCUMENT ME!
-
matrixRow
int matrixRow
DOCUMENT ME!
-
nDimensions
int nDimensions
DOCUMENT ME!
-
numInvestigators
int numInvestigators
DOCUMENT ME!
-
numParameters
int numParameters
DOCUMENT ME!
-
origAC
float[] origAC
DOCUMENT ME!
-
origACCount
int origACCount
DOCUMENT ME!
-
origDim
int[] origDim
DOCUMENT ME!
-
origDimCount
int origDimCount
DOCUMENT ME!
-
origOrigin
float[] origOrigin
-
origOriginCount
int origOriginCount
-
origOrientation
float[] origOrientation
DOCUMENT ME!
-
origOrientationCount
int origOrientationCount
DOCUMENT ME!
-
origPC
float[] origPC
DOCUMENT ME!
-
origPCCount
int origPCCount
DOCUMENT ME!
-
origRes
float[] origRes
DOCUMENT ME!
-
origResCount
int origResCount
DOCUMENT ME!
-
resInfoCount
int resInfoCount
DOCUMENT ME!
-
resolutions
float[][] resolutions
DOCUMENT ME!
-
resolutionsCount
int resolutionsCount
DOCUMENT ME!
-
startCount
int startCount
DOCUMENT ME!
-
talairach
TalairachTransformInfo talairach
DOCUMENT ME!
-
thumbnailBuffer
int[] thumbnailBuffer
DOCUMENT ME!
-
thumbnailBufferIndex
int thumbnailBufferIndex
DOCUMENT ME!
-
thumbnailXDim
int thumbnailXDim
DOCUMENT ME!
-
thumbnailYDim
int thumbnailYDim
DOCUMENT ME!
-
tlrcRes
float[] tlrcRes
DOCUMENT ME!
-
tlrcResCount
int tlrcResCount
DOCUMENT ME!
-
unitsCount
int unitsCount
DOCUMENT ME!
-
-
Constructor Detail
-
MyXMLHandler
public MyXMLHandler(FileInfoImageXML fInfo, java.util.Vector<VOI> anVector, java.util.Vector<TransMatrix> mVector, TalairachTransformInfo tal)
Creates a new MyXMLHandler object.- Parameters:
fInfo
- DOCUMENT ME!hisVector
- DOCUMENT ME!anVector
- DOCUMENT ME!tal
- DOCUMENT ME!
-
-
Method Detail
-
characters
public void characters(char[] ch, int start, int length)
Text data callback from parser. If the parser is not validating, this method can report whitespace. We ignore strings that are entirely whitespace.- Specified by:
characters
in interfaceorg.xml.sax.ContentHandler
- Overrides:
characters
in classorg.xml.sax.helpers.DefaultHandler
- Parameters:
ch
- Character arraystart
- Start of data in array.length
- Length of data in array.
-
endDocument
public void endDocument() throws org.xml.sax.SAXException
Do nothing.- Specified by:
endDocument
in interfaceorg.xml.sax.ContentHandler
- Overrides:
endDocument
in classorg.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
- never happens
-
endElement
public void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
Called by parser when the end of an element is reached in the document.- Specified by:
endElement
in interfaceorg.xml.sax.ContentHandler
- Overrides:
endElement
in classorg.xml.sax.helpers.DefaultHandler
- Parameters:
namespaceURI
- the namespace urilocalName
- the element nameqName
- the qualified name- Throws:
org.xml.sax.SAXException
- if a problem is encountered during parsing
-
getResolutions
public float[][] getResolutions()
Accessor to return the resolutions per slice as parsed from the XML header.- Returns:
- double array containing resolutions of each slice
-
skippedEntity
public void skippedEntity(java.lang.String name)
Do nothing but show the entity we skipped.- Specified by:
skippedEntity
in interfaceorg.xml.sax.ContentHandler
- Overrides:
skippedEntity
in classorg.xml.sax.helpers.DefaultHandler
- Parameters:
name
- the skipped entity name
-
startElement
public void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
Parser calls this for the beginning of each element in the document.- Specified by:
startElement
in interfaceorg.xml.sax.ContentHandler
- Overrides:
startElement
in classorg.xml.sax.helpers.DefaultHandler
- Parameters:
namespaceURI
- the namespace urilocalName
- the element nameqName
- the qualified nameatts
- the attached attributes- Throws:
org.xml.sax.SAXException
- if a problem is encountered during parsing
-
-