|
IsoSurface Rendering of an AR Representation | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--rlaramee.ASCIIcubeParser
This class has the sole responsibility of parsing ASCII cubes
start date: Mon 24 Apr 00
| Field Summary | |
private boolean |
breakOut
|
private boolean |
debug
|
private byte |
parseLevel
|
| Constructor Summary | |
ASCIIcubeParser(byte level)
constructor |
|
| Method Summary | |
boolean |
getBreakOut()
|
byte |
getParseLevel()
|
static void |
main(java.lang.String[] args)
The main method can be used for testing |
private int |
parseCoordinates(java.io.StreamTokenizer stream,
Cube cube)
This method parses the block number in the X,Y,Z directions It also tells the cube to set its vertices coordinate values |
Cube |
parseCube(java.io.StreamTokenizer stream)
This method parses a whole file of ASCII cubes |
Cube |
parseData(java.io.StreamTokenizer stream)
A block in the ASCII file looks like this |
private int |
parseDataVTK(java.io.StreamTokenizer stream,
Cube cube)
This method parses the 8 interpolated data values. |
private double |
parseDouble(java.io.StreamTokenizer stream)
This method parses an ASCII text floating point number. |
private int |
parseError(java.io.StreamTokenizer stream,
Cube cube)
This method parses the error measure number |
private float |
parseFloat(java.io.StreamTokenizer stream)
This method parses an ASCII text floating point number |
private int |
parseIndex(java.io.StreamTokenizer stream,
Cube cube)
Deprecated. no longer used |
void |
parseInputFile(FileHandler fileHandler,
int dimension)
This method parses a whole file of ASCII cubes |
private int |
parseLevel(java.io.StreamTokenizer stream,
Cube cube)
Deprecated. no longer used, replaced with Cube.setLevel() |
private int |
parseMax(java.io.StreamTokenizer stream,
Cube cube)
Deprecated. -no longer used |
private int |
parseMin(java.io.StreamTokenizer stream,
Cube cube)
Deprecated. -no longer used |
private int |
parseNumber(java.io.StreamTokenizer stream,
Cube cube)
Deprecated. no longer used |
boolean |
setBreakOut(boolean trueOrFalse)
|
boolean |
setParseLevel(byte newLevel)
|
private boolean |
validRange(double value,
double min,
double max)
|
private boolean |
validRange(double value,
int min,
int max)
|
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private boolean debug
private byte parseLevel
private boolean breakOut
| Constructor Detail |
public ASCIIcubeParser(byte level)
level - the level of the cubes we are saving| Method Detail |
public byte getParseLevel()
public boolean setParseLevel(byte newLevel)
newLevel - the level of cubes we are parsingpublic boolean getBreakOut()
public boolean setBreakOut(boolean trueOrFalse)
trueOrFalse - set the breakOut variable to either true or
false.
public void parseInputFile(FileHandler fileHandler,
int dimension)
throws java.io.IOException
dimension - the length of each x,y,z dimensionjava.io.IOException - public Cube parseCube(java.io.StreamTokenizer stream)
stream - a StreamTokenizer objectpublic Cube parseData(java.io.StreamTokenizer stream)
# --------------------------- 0.725 0.725 0.725 0.725 0.725 0.725 0.725 0.725 # interpolated data 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 # error 1 3 4 # block number in x,y,z directions
stream - a handle to the input stream
private int parseNumber(java.io.StreamTokenizer stream,
Cube cube)
stream - a handle to the input streamcube - a pointer to the current cube being read
private int parseLevel(java.io.StreamTokenizer stream,
Cube cube)
stream - a handle to the input streamcube - a pointer to the current cube being read
private int parseError(java.io.StreamTokenizer stream,
Cube cube)
throws java.io.IOException
stream - a handle to the input streamcube - a pointer to the current cube being readjava.io.IOException -
private int parseDataVTK(java.io.StreamTokenizer stream,
Cube cube)
throws java.io.IOException
P3_____________P2 This is the cube representation
/| /| for Bob's cube's. It is the
/ | / | same as the VTK's.
y P7____________P6/ |
^ | | | |
| | | | |
| | | | |
|---> | P0|_________|___|P1
/ x | / | /
/ | / | /
z |_____________|/
P4 P5
stream - a handle to the input streamcube - a pointer to the current cube being readjava.io.IOException -
private int parseIndex(java.io.StreamTokenizer stream,
Cube cube)
stream - a handle to the input streamcube - a pointer to the current cube being read
private int parseCoordinates(java.io.StreamTokenizer stream,
Cube cube)
throws java.io.IOException
stream - a handle to the input streamcube - a pointer to the current cube being readjava.io.IOException -
private int parseMin(java.io.StreamTokenizer stream,
Cube cube)
throws java.io.IOException
stream - a handle to the input streamcube - a pointer to the current cube being readjava.io.IOException -
private int parseMax(java.io.StreamTokenizer stream,
Cube cube)
throws java.io.IOException
stream - a handle to the input streamcube - a pointer to the current cube being readjava.io.IOException -
private boolean validRange(double value,
int min,
int max)
value - the value to validatemin - the minimum allowable valuemax - the maximum allowable value
private boolean validRange(double value,
double min,
double max)
value - the value to validatemin - the minimum allowable valuemax - the maximum allowable value
private double parseDouble(java.io.StreamTokenizer stream)
throws java.io.IOException
stream - a handle to the input streamjava.io.IOException -
private float parseFloat(java.io.StreamTokenizer stream)
throws java.io.IOException
stream - a handle to the input streamjava.io.IOException - public static void main(java.lang.String[] args)
|
IsoSurface Rendering of an AR Representation | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||