scripts had to be written to automate the process e.g.
% source ASCIItoASCIIsortLevelscript
start date Mon 24 Apr 00
- Version:
- 2.0
- Author:
- Robert S Laramee
- See Also:
ASCIItoASCIIsortCube.java
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
fileHandler
private FileHandler fileHandler
asciiCubeParser
private ASCIIcubeParser asciiCubeParser
debug
private boolean debug
filterLevel
private byte filterLevel
outputOctant
private byte outputOctant
ASCIItoASCIIcubeFilter
public ASCIItoASCIIcubeFilter(byte level,
byte outputOctant)
- Parameters:
level
- the level of the cubes we are savingoutputOctant
- this filter will output this octant of cubes
getFilterLevel
private byte getFilterLevel()
setFilterLevel
private boolean setFilterLevel(byte newLevel)
- Parameters:
newLevel
- the level of cubes being filtered
getOutputOctant
private byte getOutputOctant()
- Returns:
- outputOctant If we are outputting individual octants,
the octant of cubes being output
setOutputOctant
private boolean setOutputOctant(byte newOutputOctant)
- Parameters:
newOutputOctant
- If we are outputting individual octants,
the level of cubes being output
getFileHandler
private FileHandler getFileHandler()
- Returns:
- fileHandler this object's fileHandler
setFileHandler
private boolean setFileHandler(FileHandler newFileHandler)
- Parameters:
newFileHandler
- this object's fileHandler- Returns:
- TRUE if the FileHandler was set successfully
getASCIIcubeParser
private ASCIIcubeParser getASCIIcubeParser()
- Returns:
- asciiCubeParser this object's ASCIIcubeParser
setASCIIcubeParser
private boolean setASCIIcubeParser(ASCIIcubeParser acp)
- Parameters:
acp
- this object's ASCIIcubeParser object- Returns:
- TRUE if the FileHandler was set successfully
run
public boolean run(java.lang.String inputFileName,
int dimensionLength)
- This method will print out the cubes that make it through
the filter. The ASCII output may then be redirected
to a file.
- Parameters:
inputFileName
- the name of the input file to readdimensionLength
- the number of cubes along each x,y,z
dimension- Returns:
- TRUE on success
partitionCube
private boolean partitionCube(Cube cube,
java.text.DecimalFormat decimalFormat)
- Sometimes, java will output decimal numbers like this:
5.94E-4
instead of
0.000594
The ASCIIcubeParser does not handle this, so we
have to format the numbers for cube.ASCIIprint()
- Parameters:
cube
- the cube to do our processing ondecimalFormat
- the object which formats our numbers- Returns:
- TRUE if the cube was processed successfully
whichOctant
private int whichOctant(Cube cube)
- This method decides which octant the cube belongs to
The decision(s) are based on the VTK representation of the cube.
This method is used to split up headLevel0cubes.ascii into
8 binary cube files -1 for each octant.
- Parameters:
cube
- the current cube- Returns:
- octant the octant in which the cube belongs
main
public static void main(java.lang.String[] args)
- The main() method is what starts the ASCIItoASCIIcubeFilter
- Parameters:
inputFile
- an input file namelevel
- the level of the cubes in the input fileoctant
- cubes in this octant pass through the filter