|
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.BinaryCubeReader
Description: This program is supposed to read binary cube objects and add them to the Octree
start date Sat 6 May 2000
Field Summary | |
private ASCIIcubeParser |
asciiCubeParser
|
private boolean |
binaryFormat
are we reading binary data? |
private boolean |
breakOut
|
private byte |
dataSet
which data set -either HEAD or KNEE |
private boolean |
debug
|
private FileHandler |
fileHandler
|
private short |
finestCubeResolution
|
private boolean |
floatFormat
are we reading float or cube data? |
private FromFloatToCube |
fromFloatToCube
to read files of floats only (as opposed to cubes) |
private Octree |
octree
|
private short |
representation
are we reading an MR or AR representation? |
Constructor Summary | |
BinaryCubeReader(short cubeResolution,
boolean binaryFormat,
boolean floatFormat,
short rep,
byte dataSet,
byte numVariates)
|
Method Summary | |
boolean |
addNode(Cube cube,
short cubeResolution)
Called from this.readCubes() and FromFloatToCube.addRowOfCubes() |
private ASCIIcubeParser |
getASCIIcubeParser()
|
private boolean |
getBinaryFormat()
|
private boolean |
getBreakOut()
|
byte |
getDataSet()
Called from this class as well as from FromFloatToCube |
private FileHandler |
getFileHandler()
|
private short |
getFinestCubeResolution()
|
private boolean |
getFloatFormat()
|
FromFloatToCube |
getFromFloatToCube()
|
Octree |
getOctree()
|
private short |
getRepresentation()
|
static void |
main(java.lang.String[] args)
The main() method can be used for testing. |
private boolean |
parseCoordinates(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 |
private boolean |
parseDataVTK(Cube cube)
This method parses the 8 data values. |
private boolean |
parseError(Cube cube)
This method parses the error measure number |
private Cube |
readBinaryCube(byte level)
This |
private int |
readCubes(short cubeResolution)
|
private Cube |
readCubeUsingSerialization()
|
private int |
readResolution(short resolution)
At this point, we already know we are reading only one file's (each resolution is in it's own file) worth of data. |
Octree |
run()
The run() function starts the Binary Cube Reader. |
private boolean |
setASCIIcubeParser(ASCIIcubeParser acp)
|
private void |
setBinaryFormat(boolean trueOrFalse)
|
private void |
setBreakOut(boolean trueOrFalse)
|
private void |
setDataSet(byte set)
|
private boolean |
setFileHandler(FileHandler fh)
|
private void |
setFinestCubeResolution(short newResolution)
|
private void |
setFloatFormat(boolean trueOrFalse)
|
void |
setFromFloatToCube(FromFloatToCube fftc)
|
boolean |
setOctree(Octree newOctree)
|
private void |
setRepresentation(short rep)
|
private boolean |
throwAway(Cube cube)
This method filters out unnecessary cubes. |
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 FileHandler fileHandler
private FromFloatToCube fromFloatToCube
private ASCIIcubeParser asciiCubeParser
private Octree octree
private boolean breakOut
private boolean debug
private short finestCubeResolution
private boolean binaryFormat
private boolean floatFormat
private short representation
private byte dataSet
Constructor Detail |
public BinaryCubeReader(short cubeResolution, boolean binaryFormat, boolean floatFormat, short rep, byte dataSet, byte numVariates)
cubeResolution
- the finest resolution of cube data we
are are readingbinaryFormat
- TRUE if we are reading data in binary formatbinaryFormat
- TRUE if we are reading data as floats (as opposed
to cubes)rep
- an AR (or MR) representation of the volume datadataSet
- either Constant.HEAD ,
Constant.LOBSTER , or
Constant.KNEE numVariates
- the number of variates in the data setMethod Detail |
public FromFloatToCube getFromFloatToCube()
public void setFromFloatToCube(FromFloatToCube fftc)
the
- object that reads floats and outputs cubespublic Octree getOctree()
public boolean setOctree(Octree newOctree)
newOctree
- a new octreeprivate short getFinestCubeResolution()
private void setFinestCubeResolution(short newResolution)
the
- level of cubes we are readingprivate FileHandler getFileHandler()
private boolean setFileHandler(FileHandler fh)
fh
- a FileHandler objectprivate ASCIIcubeParser getASCIIcubeParser()
private boolean setASCIIcubeParser(ASCIIcubeParser acp)
acp
- an ASCIIcubeParser objectprivate boolean getBreakOut()
private void setBreakOut(boolean trueOrFalse)
TRUE
- if we are to break out of a loopprivate boolean getBinaryFormat()
private void setBinaryFormat(boolean trueOrFalse)
TRUE
- if we are reading the data in binary formatprivate boolean getFloatFormat()
private void setFloatFormat(boolean trueOrFalse)
TRUE
- if we are reading the data as a set of floats (as opposed
to cubes)public byte getDataSet()
private void setDataSet(byte set)
dataSet
- either Constant.HEAD ,
Constant.KNEE ,
Constant.LOBSTER , or
Constant.TEST .private short getRepresentation()
private void setRepresentation(short rep)
the
- representation we are readingpublic Octree run()
We have to decide which file to read:
private int readResolution(short resolution)
the
- resolution we are readingprivate int readCubes(short cubeResolution)
cubeResolution
- the resolution of data we are readingpublic boolean addNode(Cube cube, short cubeResolution)
cube
- the cube we are adding to the octreeprivate boolean throwAway(Cube cube)
This is an attempt to level a full MR representation of a 128^3 data set.
We put in a test for an MR representation only since these cubes could be present in a complete AR representation. In a complete AR representation cubes can only come in groups of 8.
However, this will not work as implemented since Octree.addNodeFromBottom() counts on cubes being read in, in sorted order.
the
- cube that we are checkingprivate Cube readBinaryCube(byte level)
private boolean parseDataVTK(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
cube
- a pointer to the current cube being readjava.io.IOException
- private boolean parseError(Cube cube) throws java.io.IOException
cube
- a pointer to the current cube being readjava.io.IOException
- private boolean parseCoordinates(Cube cube) throws java.io.IOException
cube
- 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 valueprivate boolean validRange(double value, double min, double max)
value
- the value to validatemin
- the minimum allowable valuemax
- the maximum allowable valueprivate Cube readCubeUsingSerialization()
public static void main(java.lang.String[] args)
inputFile
- an input file name to read binary cube data fromlevel
- the level of resolution the cubes are
|
IsoSurface Rendering of an AR Representation | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |