Class FileSurfaceRefXML_WM
- 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.WildMagic.Interface.FileSurfaceRefXML_WM
-
public class FileSurfaceRefXML_WM extends FileSurfaceRefXML
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 Classes Modifier and Type Class Description private class
FileSurfaceRefXML_WM.SurfaceRefXMLHandler
Used 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_kSurfaceStr
-
Fields 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_HEADER
-
Fields inherited from class gov.nih.mipav.model.file.FileBase
BIG_ENDIAN, bitsPerPixel, fileNames, LITTLE_ENDIAN, pBarVisible, raFile, READ, READ_WRITE
-
-
Constructor Summary
Constructors Constructor Description FileSurfaceRefXML_WM(java.lang.String fName, java.lang.String fDir)
Constructs new file object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
finalize()
Prepares class for cleanup.FileInfoSurfaceRefXML_WM
getFileInfo()
Returns the FileInfoSurfaceRefXML read from the file.FileInfoSurfaceRefXML_WM
readSurfaceXML(java.lang.String headerFileName, java.lang.String headerDir)
Reads and parses a SurfaceRef.XML header.boolean
writeXMLsurface_WM(java.lang.String fileName, WildMagic.LibGraphics.Rendering.MaterialState kMaterial, float opacity, int levelDetail)
Writes the XML file information, including the surface out to the given filename and path:-
Methods inherited from class gov.nih.mipav.model.file.FileXML
closedTag, closedTag, closedTag, openTag, readHeader, setPBar
-
Methods 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
-
-
-
-
Method Detail
-
finalize
public void finalize()
Prepares class for cleanup.- Overrides:
finalize
in classFileSurfaceRefXML
-
getFileInfo
public FileInfoSurfaceRefXML_WM 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_WM readSurfaceXML(java.lang.String headerFileName, java.lang.String headerDir)
Reads and parses a SurfaceRef.XML header.- Parameters:
headerFileName
- file name of xml headerheaderDir
- directory- Returns:
- FileInfoSurfaceRefXML
- Throws:
java.io.IOException
- file exception
-
writeXMLsurface_WM
public boolean writeXMLsurface_WM(java.lang.String fileName, WildMagic.LibGraphics.Rendering.MaterialState kMaterial, float opacity, int levelDetail) throws java.io.IOException
Writes the XML file information, including the 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:
java.io.IOException
- if a file I/O problem is encountered while writing the header
-
-