Class FileSurfaceRefXML_J3D
java.lang.Object
gov.nih.mipav.model.file.FileBase
gov.nih.mipav.model.file.FileXML
gov.nih.mipav.model.file.FileSurfaceRefXML
gov.nih.mipav.view.renderer.J3D.model.file.FileSurfaceRefXML_J3D
Inherits from FileXML, reads SurfaceRef.XML files based on the "surfaceref.xsd" file. Defines specific variables for
reading and writing surfaceref.xml files:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classUsed by the XML Parser to parse the Surface.XML header.Nested classes/interfaces inherited from class gov.nih.mipav.model.file.FileXML
FileXML.XMLAttributes -
Field Summary
Fields inherited from class gov.nih.mipav.model.file.FileSurfaceRefXML
m_kMaterialStr, m_kSurfaceStrFields inherited from class gov.nih.mipav.model.file.FileXML
bw, fileDir, fileInfo, fileName, m_kHandler, MIPAV_HEADER, pInterface, TAB, tabLevel, W3C_XML_SCHEMA, XML_ENCODING, XML_HEADERFields inherited from class gov.nih.mipav.model.file.FileBase
BIG_ENDIAN, bitsPerPixel, fileNames, LITTLE_ENDIAN, pBarVisible, raFile, READ, READ_WRITE -
Constructor Summary
ConstructorsConstructorDescriptionFileSurfaceRefXML_J3D(String fName, String fDir) Constructs new file object. -
Method Summary
Modifier and TypeMethodDescriptionvoidfinalize()Prepares class for cleanup.Returns the FileInfoSurfaceRefXML read from the file.readSurfaceXML(String headerFileName, String headerDir) Reads and parses a SurfaceRef.XML header.booleanwriteHeader(String headerName, String headerDir, javax.media.j3d.Material kMaterial, float opacity, int levelDetail) Writes the XML header information, including the ModelTriangleMesh surface out to the given filename and path:booleanwriteXMLsurface(String fileName, javax.media.j3d.Material kMaterial, float opacity, int levelDetail) Writes the XML file information, including the ModelTriangleMesh surface out to the given filename and path:Methods inherited from class gov.nih.mipav.model.file.FileXML
closedTag, closedTag, closedTag, openTag, readHeader, setPBarMethods inherited from class gov.nih.mipav.model.file.FileBase
addProgressChangeListener, bytesToDouble, bytesToFloat, bytesToInt, bytesToShort, doubleToBytes, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, floatToBytes, getBufferDouble, getBufferFloat, getBufferInt, getBufferLong, getBufferShort, getBufferUShort, getDataType, getDouble, getFloat, getInt, getLong, getProgressChangeListeners, getRaFile, getSignedShort, getString, getUInt, getUnsignedByte, getUnsignedShort, intToBytes, isBigEndian, isProgressBarVisible, linkProgress, longToBytes, readDouble, readFloat, readInt, readLong, readShort, readString, readUnsignedShort, removeProgressChangeListener, setBigEndian, setBufferFloat, setBufferInt, setBufferLong, setBufferShort, setBufferString, setDataType, setEndianess, shortToBytes, writeBytes, writeDouble, writeFloat, writeInt, writeLong, writeShort
-
Constructor Details
-
FileSurfaceRefXML_J3D
Constructs new file object.- Parameters:
fName- File name.fDir- File directory.
-
-
Method Details
-
finalize
public void finalize()Prepares class for cleanup.- Overrides:
finalizein classFileSurfaceRefXML
-
getFileInfo
Returns the FileInfoSurfaceRefXML read from the file.- Returns:
- File info read from file, or null if it has not been read.
-
readSurfaceXML
public FileInfoSurfaceRefXML_J3D readSurfaceXML(String headerFileName, String headerDir) throws IOException Reads and parses a SurfaceRef.XML header.- Parameters:
headerFileName- file name of xml headerheaderDir- directory- Returns:
- FileInfoSurfaceRefXML
- Throws:
IOException- file exception
-
writeHeader
public boolean writeHeader(String headerName, String headerDir, javax.media.j3d.Material kMaterial, float opacity, int levelDetail) throws IOException Writes the XML header information, including the ModelTriangleMesh surface out to the given filename and path:- Parameters:
headerName- file name to write toheaderDir- name of directory to write tokMaterial- surface materialopacity- surface opacitylevelDetail- surface level of detail- Returns:
- if header write was successful
- Throws:
IOException- if a file I/O problem is encoutered while writing the header
-
writeXMLsurface
public boolean writeXMLsurface(String fileName, javax.media.j3d.Material kMaterial, float opacity, int levelDetail) throws IOException Writes the XML file information, including the ModelTriangleMesh surface out to the given filename and path:- Parameters:
fileName- file name to write tokMaterial- surface materialopacity- surface opacitylevelDetail- surface level of detail- Returns:
- if header write was successful
- Throws:
IOException- if a file I/O problem is encoutered while writing the header
-