#include <shearWarp.h>
Inheritance diagram for vu111211A:
Public Member Functions | |
vu111211A () | |
The constructor. Sets up a new ShearWarp instance. | |
virtual | ~vu111211A () |
The Destructor. Destroys the ShearWarp instance. | |
void | setCanvasSize (int width, int height) |
Sets the size for the canvas. | |
void | setOrthogonalWarpOpenGL (int useOpenGL) |
Turns on/off OpenGL-warping. | |
void | runlengthEncode () |
Computes the runlength encoding of the volume. | |
void | removeRunlengthEncoding () |
Removes the runlength encoding. | |
void | initFastClassification () |
Sets up the Arrays for saving the individual slice positions. | |
void | setSpecular (int spec) |
Turn on/off the specular light. | |
void | setViewing (int mode) |
Set the projection mode (orthogonal is default). | |
void | setFastClassification (int fastClass) |
Setting the classification mode. | |
int | getFastClassification () |
Fast classification currently used? | |
void | setViewVectors (const vuVector &view, const vuVector &up, const vuVector &right) |
Sets the camera viewing position for the render method. | |
void | getDimensions (int &x, int &y, int &z) |
Returns the Dimensions of the volume data. | |
int | getMaxSize (void) |
Returns the Maximum Size of the Volume. | |
void | zoom (float zoomValue) |
Zooms the volume. | |
void | classify () |
Calls the classify() method of the fast classification object. | |
void | initOpenGL (void) |
Initializes OpenGL. | |
void | render (void) |
Implements the abstract render() method of the vuVolume base class. | |
virtual bool | read (void) |
Reimplements the read() method to do some extra volume data processing. | |
virtual bool | readRaw (void) |
This method reads volume data stored using the .raw data type. | |
float | getMinEyeDistance (void) |
Returns the minimum allowed distance between eye and projection-plane. | |
void | setEyeDistance (float distance) |
Sets the current distance between eye and projection-plane. | |
Private Member Functions | |
void | computeMaxSize (void) |
Computes the maximum stretch out of the volume and saves the value in attribute maxSize. | |
void | computeNormals (void) |
Precomputes the normals of the voxels. | |
void | computeMainViewingDirection (void) |
Computes the main viewing direction. | |
void | computePermutationMatrix (void) |
Computes the correct permutation matrix. | |
void | computeViewMatrix (void) |
Computes the view matrix for coordinates in standard object space. | |
void | computeEyePoint (void) |
Computes the position of the eye point (needed for perspective projection). | |
void | computeRunlengthSizes (void) |
Determines width, height and depth of the Volume and saves these values in runlengthWidth... | |
void | computeShearAndWarpFactorsOrtho (void) |
Computes the Shear and Warp Factors for parallel projection. | |
void | shearOrtho (void) |
Shearing the runlength encoded data for parallel projection. | |
float | computeZNormalizedViewingVectorLength (void) |
Compute the length of the Z-normalized viewing vector. | |
void | resetIntermediateImage (int intermediateSize) |
reset the intermediate image | |
void | preClassification (RLEplane current, float viewVectorLength) |
Pre-classifies a given slice of data. | |
void | initRunPtr1 (RLEplane current, int &volumeIndex, int &voxelPtr1, int &runPtr1, byte &state1) |
Initialize pointer to run 1. | |
void | skipZeroLengthRuns (RLEplane slice, int &runPtr, byte &count, byte &state) |
skips empty runlengths (runlengths with size = 0) | |
int | skipTransparentVoxels (RLEplane slice, int runPtr1, byte &count1, int runPtr2, byte &count2, int &add, int intermediateWidth, int &pos) |
skips minimum run of transparent voxels | |
void | interpolatePixel (RLEplane slice, intermediatePixel &pixel, float w1, float w2, float w3, float w4, int volumeIndex, int &voxelPtr1, int runPtr1, int count1, int state1, int &voxelPtr2, int runPtr2, int count2, int state2) |
interpolates the pixel in the intermediate image | |
void | skipOpaquePixel (byte state1, int &voxelPtr1, byte state2, int &voxelPtr2) |
Skipps a single opaque pixel in the intermediate image. | |
void | volumeNext (RLEplane slice, int &volumeIndex, int &add, int intermediateWidth, int &pos, int &runPtr1, byte &count1, byte &state1, int &runPtr2, byte &count2, byte &state2) |
Goes one step ahead in the volume. | |
void | computeInvWarpOrtho (void) |
Computes the inverse of the orthogonal warp matrix. | |
void | warpOrthoInv (float x, float y, float &x_result, float &y_result) |
Inverse warping for orthogonal viewing for a single point with x- and y-coordinates. | |
void | warpOrtho () |
The total orthogonal warping from intermediate image to OpenGL-texture. | |
void | makeIntermediateImageOrtho (void) |
Creating the intermediate image for parallel projection. | |
void | changeFormatIntermediate (void) |
change the format of the intermediate image to OpenGL-format | |
void | drawWarpOpenGL (void) |
draw the final image using OpenGL for warping | |
byte | getSample (dword x, dword y, dword z) |
Returns the value of the sample at the given coordinates. | |
void | makeIntermediateImageOrthoFastClass (void) |
Create the intermediate image for parallel projection using fast classification. | |
void | computeShearPerspective (void) |
Computes the Shear Matrix for perspective projection. | |
void | computeWarpPerspective (void) |
Computes the Warp Matrix for perspective projection. | |
void | computePlanePositionScale (float &pos_i, float &pos_j, float &scale, int plane) |
Computes position and the scaling for a single slice. | |
void | shearPerspective (void) |
Shears the runlength encoded data for perspective projection. | |
void | warpPerspectiveInv (float x, float y, float &x_result, float &y_result) |
Performs an inverse perspective warp. | |
void | warpPerspective (void) |
The total perspective warping from intermediate image to OpenGL-texture. | |
void | makeIntermediateImagePerspective (void) |
Creating the intermediate image for perspective projection. | |
void | drawOpenGL (void) |
Draws final image with openGL. | |
void | createGLImage (void) |
Create image readable for OpenGL. | |
Private Attributes | |
float * | m_Normals |
Stores an array of normal vectors. | |
vuVector | m_View |
The viewing direction of the camera. | |
vuVector | m_Up |
The up direction of the camera. | |
vuVector | m_Right |
The right direction of the camera. | |
vuMatrix | viewMatrix |
The view matrix. | |
vuMatrix | permMatrix |
The permutation matrix. | |
vuMatrix | worldMatrix |
The world matrix. | |
vuMatrix | shearMatrix |
The shear matrix. | |
vuMatrix | warpMatrix |
The warp matrix. | |
vuMatrix | invWarpMatrix |
The inverse of the warp matrix. | |
vuMatrix | projMatrix |
The perspective projection matrix (needed only for perspective viewing. | |
vuMatrix | invWorldMatrix |
The inverse of the worldMatrix. | |
float | invWarpOrtho00 |
Element 00 of the inverse 2D-Warp-Matrix for orthogonal projection. | |
float | invWarpOrtho01 |
Element 01 of the inverse 2D-Warp-Matrix for orthogonal projection. | |
float | invWarpOrtho10 |
Element 10 of the inverse 2D-Warp-Matrix for orthogonal projection. | |
float | invWarpOrtho11 |
Element 11 of the inverse 2D-Warp-Matrix for orthogonal projection. | |
vuVector | eye_o |
The eye point (for perspective projection) in object-space. | |
vuVector | eye_s |
The eye point (for perspective projection) in sheared space. | |
int | mainViewingDir |
The current main viewing direction. | |
int | canvasWidth |
The width of the canvas. | |
int | canvasHeight |
The height of the canvas. | |
GLuint | m_GLShearWarp |
Needed for OpenGL-texturing. | |
int | viewingMode |
Orthogonal or perspective viewing? | |
int | specular |
Use specular light for shading? | |
int | fastClassification |
Use fast classification? | |
int | orthoWarpOpenGL |
Use OpenGL for orthogonal warping. | |
RLEplane * | dataX |
Runlength encoded data for main viewing direction X. | |
RLEplane * | dataY |
Runlength encoded data for main viewing direction Y. | |
RLEplane * | dataZ |
Runlength encoded data for main viewing direction Z. | |
RLEplane * | curr |
The currently used runlength encoded data. | |
byte | direction |
Holds the direction in which the volume shall be traversed. | |
dword | maxSize |
The maximum stretch-out of the volume. | |
dword | volumeDepth |
The depth of the volume. | |
dword | volumeWidth |
The width of the volume. | |
dword | volumeHeight |
The height of the volume. | |
double | si |
The shearing in dimension i (horizontal). | |
double | sj |
The shearing in dimension j (vertical). | |
float | ti |
The value about which the front slice of the data is shifted in the intermediate image horizontally. | |
float | tj |
The value about which the front slice of the data is shifted in the intermediate image vertically. | |
intermediatePixel * | intermediate |
The intermediate image. | |
float | eye_distance |
float | scale_total |
The perspective scaling factor. | |
float | zoomValue |
Current zoom-value. | |
GLubyte * | glImage |
The image that later is processed by OpenGL. | |
int | glImageWidth |
The width of the OpenGL image. | |
int | glImageHeight |
The height of the OpenGL image. | |
FastClassification * | fastClassificationObj |
This object deals with the fast classification. |
This class renders the volume using a shear-warp algorithm implemented within the scope of an "Informatikpraktikum 1" by Sebastian Zambal. The shear warp algorithm shears the slices of pixels of a given volume to achive different views of the volume. Unfortunately the projection of the sheared slices results in a skew image. This intermediate image then has to be warped to get the correct final image.
Definition at line 142 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h.
|
The constructor. Sets up a new ShearWarp instance. The constructor sets up a new ShearWarp instance and resets the zoom value, the normal vector table, the pointer to the runlength encoded data, the pointer to the currently used runlength encoded data, the intermediate image, the viewing mode (orthogonal, perspective) and the OpenGL-texture. Definition at line 22 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References curr, dataX, dataY, dataZ, fastClassification, intermediate, m_GLShearWarp, m_Normals, orthoWarpOpenGL, specular, viewingMode, and zoomValue. |
|
The Destructor. Destroys the ShearWarp instance. The destructor frees all occupied memory: the OpenGL-Image, the normal vector table and the runlength encoded data. Definition at line 55 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References dataX, dataY, dataZ, dword, glImage, RLEplane::runlength, RLEplane::size, and RLEplane::voxel. |
|
change the format of the intermediate image to OpenGL-format
Definition at line 1561 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References intermediatePixel::blue, dword, glImage, glImageHeight, glImageWidth, GLubyte, intermediatePixel::green, intermediate, maxSize, intermediatePixel::red, si, sj, and word. Referenced by render(). |
|
Calls the classify() method of the fast classification object. Classification is done with help of the fast classification object. This is done using an octreee-representation of the volume data. Definition at line 189 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References FastClassification::classify(), and fastClassificationObj. Referenced by vuShearWarp::glOnMouse(). |
Here is the call graph for this function:
|
Computes the position of the eye point (needed for perspective projection).
Definition at line 1966 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References eye_o, vuMatrix::inverse(), invWorldMatrix, and worldMatrix. Referenced by render(). |
Here is the call graph for this function:
|
Computes the inverse of the orthogonal warp matrix.
Definition at line 1329 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References invWarpOrtho00, invWarpOrtho01, invWarpOrtho10, invWarpOrtho11, and viewMatrix. Referenced by render(). |
|
Computes the main viewing direction.
Definition at line 827 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References m_View, and mainViewingDir. Referenced by render(). |
|
Computes the maximum stretch out of the volume and saves the value in attribute maxSize.
Definition at line 125 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References maxSize. Referenced by read(). |
|
Precomputes the normals of the voxels.
Definition at line 697 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. |
|
Computes the correct permutation matrix.
Definition at line 846 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References permMatrix, XDIR, YDIR, and ZDIR. Referenced by render(). |
|
Computes position and the scaling for a single slice.
Definition at line 1998 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References scale_total, volumeHeight, and volumeWidth. Referenced by shearPerspective(). |
|
Determines width, height and depth of the Volume and saves these values in runlengthWidth...
Definition at line 960 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References volumeDepth, volumeHeight, volumeWidth, XDIR, YDIR, and ZDIR. Referenced by render(). |
|
Computes the Shear and Warp Factors for parallel projection.
Definition at line 988 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References si, sj, ti, tj, and viewMatrix. Referenced by render(). |
|
Computes the Shear Matrix for perspective projection.
Definition at line 1983 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References eye_o, vuMatrix::makeIdentity(), and shearMatrix. Referenced by render(). |
Here is the call graph for this function:
|
Computes the view matrix for coordinates in standard object space.
Definition at line 879 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References vuVector::cross, cross(), vuMatrix::makeIdentity(), vuMatrix::makeRotate(), vuMatrix::makeRotateZ(), vuVector::makeUnit(), projMatrix, viewingMode, viewMatrix, worldMatrix, YDIR, and ZDIR. Referenced by render(). |
Here is the call graph for this function:
|
Computes the Warp Matrix for perspective projection.
Definition at line 2106 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References vuMatrix::inverse(), invWarpMatrix, vuMatrix::makeIdentity(), vuMatrix::makeScale(), permMatrix, scale_total, shearMatrix, and warpMatrix. Referenced by render(). |
Here is the call graph for this function:
|
Compute the length of the Z-normalized viewing vector.
Definition at line 1051 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References m_View, mainViewingDir, and vuVector::makeUnit(). Referenced by makeIntermediateImageOrtho(), makeIntermediateImageOrthoFastClass(), and makeIntermediateImagePerspective(). |
Here is the call graph for this function:
|
Create image readable for OpenGL.
Definition at line 109 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References glImage, glImageHeight, glImageWidth, GLubyte, maxSize, and word. Referenced by read(). |
|
Draws final image with openGL.
Definition at line 2516 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References GL_CLAMP, GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_LINEAR, GL_MODELVIEW, GL_PROJECTION, GL_QUADS, GL_REPLACE, GL_RGBA, GL_TEXTURE_2D, GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_TEXTURE_MAG_FILTER, GL_TEXTURE_MIN_FILTER, GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T, GL_UNSIGNED_BYTE, glBegin(), glClear(), glDisable(), glEnable(), glEnd(), glFlush(), glImage, glImageHeight, glImageWidth, glLoadIdentity(), glMatrixMode(), glOrtho(), glTexCoord2f(), glTexEnvf(), glTexImage2D(), glTexParameteri(), glVertex3f(), and zoomValue. Referenced by render(). |
Here is the call graph for this function:
|
draw the final image using OpenGL for warping
Definition at line 1598 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References GL_CLAMP, GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_LINEAR, GL_MODELVIEW, GL_PROJECTION, GL_QUADS, GL_REPLACE, GL_RGBA, GL_TEXTURE_2D, GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_TEXTURE_MAG_FILTER, GL_TEXTURE_MIN_FILTER, GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T, GL_UNSIGNED_BYTE, glBegin(), glClear(), glDisable(), glEnable(), glEnd(), glFlush(), glImage, glImageHeight, glImageWidth, glLoadIdentity(), glMatrixMode(), glOrtho(), glTexCoord2f(), glTexEnvf(), glTexImage2D(), glTexParameteri(), glVertex3f(), viewMatrix, XDIR, YDIR, and zoomValue. Referenced by render(). |
Here is the call graph for this function:
|
Returns the Dimensions of the volume data.
Definition at line 100 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. Referenced by vuShearWarp::init(). |
|
Fast classification currently used? Returns whether fast classification currently is used.
Definition at line 181 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. Referenced by vuShearWarp::glOnMouse(). |
|
Returns the Maximum Size of the Volume.
Definition at line 1951 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. Referenced by vuShearWarp::OnScrollPerspective(). |
|
Returns the minimum allowed distance between eye and projection-plane.
Definition at line 1955 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References maxSize. Referenced by vuShearWarp::OnScrollPerspective(), and read(). |
|
Returns the value of the sample at the given coordinates.
Definition at line 1675 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. Referenced by makeIntermediateImageOrthoFastClass(). |
|
Sets up the Arrays for saving the individual slice positions. When fast classification is activated this method is called instead of runlengthEncode(). Definition at line 808 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References dataX, dataY, dataZ, fastClassificationObj, removeRunlengthEncoding(), and RLEplane::size. Referenced by read(), and setFastClassification(). |
Here is the call graph for this function:
|
Initializes OpenGL. OpenGL is used for graphics output. Definition at line 2562 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References GL_LINEAR, GL_REPEAT, GL_RGBA, GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_TEXTURE_MIN_FILTER, GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T, GL_UNPACK_ALIGNMENT, GL_UNSIGNED_BYTE, glBindTexture(), glClearColor(), glGenTextures(), glImage, glImageHeight, glImageWidth, glPixelStorei(), glTexImage2D(), glTexParameteri(), and m_GLShearWarp. Referenced by vuShearWarp::glInit(). |
Here is the call graph for this function:
|
Initialize pointer to run 1.
Definition at line 1125 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References RLEplane::runlength. Referenced by makeIntermediateImageOrtho(). |
|
interpolates the pixel in the intermediate image
Definition at line 1186 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References intermediatePixel::blue, RLEvoxel::blue_shaded, intermediatePixel::green, RLEvoxel::green_shaded, intermediatePixel::offset, RLEvoxel::opacity_corr, intermediatePixel::red, RLEvoxel::red_shaded, RLEplane::runlength, RLEplane::size, intermediatePixel::trans, and RLEplane::voxel. Referenced by makeIntermediateImageOrtho(). |
|
Creating the intermediate image for parallel projection.
Definition at line 1432 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References byte, computeZNormalizedViewingVectorLength(), curr, RLEplane::dim1_pos, RLEplane::dim2_pos, direction, initRunPtr1(), intermediate, interpolatePixel(), maxSize, preClassification(), resetIntermediateImage(), RLEplane::runlength, RLEplane::size, skipOpaquePixel(), skipTransparentVoxels(), skipZeroLengthRuns(), intermediatePixel::trans, volumeDepth, and volumeNext(). Referenced by render(). |
Here is the call graph for this function:
|
Create the intermediate image for parallel projection using fast classification.
Definition at line 1689 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References intermediatePixel::blue, byte, computeZNormalizedViewingVectorLength(), curr, RLEplane::dim1_pos, RLEplane::dim2_pos, direction, vuVector::dot, dword, fastClassificationObj, getSample(), glImage, glImageHeight, glImageWidth, GLubyte, intermediatePixel::green, intermediate, m_Normals, m_View, mainViewingDir, vuVector::makeUnit(), maxSize, intermediatePixel::offset, pow(), intermediatePixel::red, si, sj, FastClassification::skip(), specular, intermediatePixel::trans, volumeDepth, word, XDIR, YDIR, and ZDIR. Referenced by render(). |
Here is the call graph for this function:
|
Creating the intermediate image for perspective projection.
Definition at line 2211 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References RLEvoxel::blue, intermediatePixel::blue, RLEvoxel::blue_shaded, byte, computeZNormalizedViewingVectorLength(), curr, RLEplane::dim1_pos, RLEplane::dim2_pos, direction, vuVector::dot, dword, RLEvoxel::green, intermediatePixel::green, RLEvoxel::green_shaded, intermediate, m_View, vuVector::makeUnit(), maxSize, RLEvoxel::normal, intermediatePixel::offset, RLEvoxel::opacity_corr, pow(), RLEvoxel::red, intermediatePixel::red, RLEvoxel::red_shaded, RLEplane::runlength, RLEplane::scale, RLEplane::size, specular, intermediatePixel::trans, volumeDepth, RLEplane::voxel, and word. Referenced by render(). |
Here is the call graph for this function:
|
Pre-classifies a given slice of data.
Definition at line 1078 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References RLEvoxel::blue, RLEvoxel::blue_shaded, vuVector::dot, dword, RLEvoxel::green, RLEvoxel::green_shaded, m_View, vuVector::makeUnit(), RLEvoxel::normal, RLEvoxel::opacity, RLEvoxel::opacity_corr, pow(), RLEvoxel::red, RLEvoxel::red_shaded, RLEplane::size, specular, and RLEplane::voxel. Referenced by makeIntermediateImageOrtho(). |
Here is the call graph for this function:
|
Reimplements the read() method to do some extra volume data processing.
Reimplemented from vu11121. Definition at line 221 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References computeMaxSize(), computeNormals(), createGLImage(), eye_distance, fastClassification, getMinEyeDistance(), initFastClassification(), intermediate, m_Normals, maxSize, vu11121::read(), and runlengthEncode(). Referenced by vuShearWarp::init(). |
Here is the call graph for this function:
|
This method reads volume data stored using the .raw data type.
Definition at line 254 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References byte, computeNormals(), dword, and m_Normals. |
Here is the call graph for this function:
|
Removes the runlength encoding. Frees all memory that was allocated by the runlength encoded Data. Definition at line 293 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References dataX, dataY, dataZ, dword, RLEplane::runlength, RLEplane::size, and RLEplane::voxel. Referenced by initFastClassification(), and runlengthEncode(). |
|
Here is the call graph for this function:
|
reset the intermediate image
Definition at line 1064 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References intermediatePixel::blue, intermediatePixel::green, intermediate, intermediatePixel::offset, intermediatePixel::red, and intermediatePixel::trans. Referenced by makeIntermediateImageOrtho(). |
|
Computes the runlength encoding of the volume. Does runlength encoding for each of the main viewing directions. After execution of this method the attributes dataX, dataY and dataZ hold the runlength encoded volume data according to the different main viewing directions. Definition at line 328 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References RLEvoxel::blue, byte, dataX, dataY, dataZ, RLEplane::dim1_pos, RLEplane::dim2_pos, dword, RLEvoxel::green, m_Normals, RLEvoxel::normal, RLEvoxel::opacity, RLEvoxel::red, removeRunlengthEncoding(), RLEplane::runlength, RLEplane::scale, RLEplane::size, RLEvoxel::value, RLEplane::voxel, and word. Referenced by vuShearWarp::glOnMouse(), vuShearWarp::OnButtonTransferFunction(), read(), and setFastClassification(). |
Here is the call graph for this function:
|
Sets the size for the canvas. This method must be called by vuShearWarp when then window is resized and the canvas gets a new size.
Definition at line 210 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References canvasHeight, and canvasWidth. Referenced by vuShearWarp::glResize(). |
|
Sets the current distance between eye and projection-plane.
Definition at line 1959 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References eye_distance. Referenced by vuShearWarp::OnScrollPerspective(). |
|
Setting the classification mode. With this fast classification can be turned on.
Definition at line 168 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References fastClassification, initFastClassification(), and runlengthEncode(). Referenced by vuShearWarp::OnCheckBoxFastClassification(). |
Here is the call graph for this function:
|
Turns on/off OpenGL-warping. With this method between warping with software and warping with OpenGL can be choosen.
Definition at line 202 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References orthoWarpOpenGL. Referenced by vuShearWarp::OnCheckBoxWarpOpenGL(). |
|
Turn on/off the specular light. This method must be called when the specular light is to be turned on/off
Definition at line 160 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References specular. Referenced by vuShearWarp::OnCheckBoxSpecular(). |
|
Set the projection mode (orthogonal is default). Sets the viewing mode (i.e. the type of projection to the final image) to either orthogonal or perspective projection.
Definition at line 152 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References viewingMode. Referenced by vuShearWarp::OnRadioBoxProjection(). |
|
Sets the camera viewing position for the render method. setViewVectors updates the viewing vector, the up vector and the right vector. In other words this method sets a new camera viewing position. Reimplemented from vu11121. Definition at line 136 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References m_Right, m_Up, and m_View. Referenced by vuShearWarp::glRender(), and vuShearWarp::OnButtonApplyViewing(). |
|
Shearing the runlength encoded data for parallel projection.
Definition at line 1004 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References curr, RLEplane::dim1_pos, RLEplane::dim2_pos, direction, dword, m_View, vuVector::makeUnit(), maxSize, orthoWarpOpenGL, si, sj, volumeHeight, volumeWidth, XDIR, YDIR, and ZDIR. Referenced by render(). |
Here is the call graph for this function:
|
Shears the runlength encoded data for perspective projection.
Definition at line 2037 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References computePlanePositionScale(), curr, direction, m_View, vuVector::makeUnit(), scale_total, volumeDepth, XDIR, YDIR, and ZDIR. Referenced by render(). |
Here is the call graph for this function:
|
Skipps a single opaque pixel in the intermediate image.
Definition at line 1279 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. Referenced by makeIntermediateImageOrtho(). |
|
skips minimum run of transparent voxels
Definition at line 1154 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References RLEplane::runlength. Referenced by makeIntermediateImageOrtho(). |
|
skips empty runlengths (runlengths with size = 0)
Definition at line 1142 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References RLEplane::runlength. Referenced by makeIntermediateImageOrtho(). |
|
Goes one step ahead in the volume.
Definition at line 1293 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References RLEplane::runlength. Referenced by makeIntermediateImageOrtho(). |
|
The total orthogonal warping from intermediate image to OpenGL-texture.
Definition at line 1359 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References intermediatePixel::blue, glImage, glImageWidth, GLubyte, intermediatePixel::green, intermediate, maxSize, intermediatePixel::red, and warpOrthoInv(). Referenced by render(). |
Here is the call graph for this function:
|
Inverse warping for orthogonal viewing for a single point with x- and y-coordinates.
Definition at line 1349 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References invWarpOrtho00, invWarpOrtho01, invWarpOrtho10, and invWarpOrtho11. Referenced by warpOrtho(). |
|
The total perspective warping from intermediate image to OpenGL-texture. !!! int intermediateSize = intermediateWidth * intermediateWidth; Definition at line 2142 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References intermediatePixel::blue, glImage, glImageWidth, GLubyte, intermediatePixel::green, intermediate, maxSize, intermediatePixel::red, and warpPerspectiveInv(). Referenced by render(). |
Here is the call graph for this function:
|
Performs an inverse perspective warp. Applies the inverse of perspective warping to a single point.
Definition at line 2120 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. Referenced by warpPerspective(). |
|
Zooms the volume. Sets the zoom-value. Definition at line 197 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.cpp. References zoomValue. Referenced by vuShearWarp::glOnMouse(). |
|
The height of the canvas. Holds the height of the used canvas. This value is needed for computing the vertical scaling factor of the final image. Definition at line 526 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by setCanvasSize(). |
|
The width of the canvas. Holds the width of the used canvas. This value is needed for computing the horizontal scaling factor of the final image. Definition at line 521 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by setCanvasSize(). |
|
The currently used runlength encoded data. Points to the currently used runlength encoded data. This depends on the main viewing direction Definition at line 551 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by makeIntermediateImageOrtho(), makeIntermediateImageOrthoFastClass(), makeIntermediateImagePerspective(), shearOrtho(), shearPerspective(), and vu111211A(). |
|
Runlength encoded data for main viewing direction X.
Definition at line 541 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by initFastClassification(), removeRunlengthEncoding(), runlengthEncode(), vu111211A(), and ~vu111211A(). |
|
Runlength encoded data for main viewing direction Y.
Definition at line 543 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by initFastClassification(), removeRunlengthEncoding(), runlengthEncode(), vu111211A(), and ~vu111211A(). |
|
Runlength encoded data for main viewing direction Z.
Definition at line 545 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by initFastClassification(), removeRunlengthEncoding(), runlengthEncode(), vu111211A(), and ~vu111211A(). |
|
Holds the direction in which the volume shall be traversed. Shall the volume be traversed foreward or backward? The value 0 means that the volume has to be traversed backward, 1 means it has to be traversed foreward. Definition at line 558 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by makeIntermediateImageOrtho(), makeIntermediateImageOrthoFastClass(), makeIntermediateImagePerspective(), shearOrtho(), and shearPerspective(). |
|
Definition at line 602 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by read(), and setEyeDistance(). |
|
The eye point (for perspective projection) in object-space.
Definition at line 510 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by computeEyePoint(), and computeShearPerspective(). |
|
The eye point (for perspective projection) in sheared space.
Definition at line 512 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. |
|
Use fast classification?
Definition at line 536 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by read(), render(), setFastClassification(), and vu111211A(). |
|
This object deals with the fast classification.
Definition at line 622 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by classify(), initFastClassification(), makeIntermediateImageOrthoFastClass(), and render(). |
|
The image that later is processed by OpenGL.
Definition at line 614 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by changeFormatIntermediate(), createGLImage(), drawOpenGL(), drawWarpOpenGL(), initOpenGL(), makeIntermediateImageOrthoFastClass(), warpOrtho(), warpPerspective(), and ~vu111211A(). |
|
The height of the OpenGL image.
Definition at line 619 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by changeFormatIntermediate(), createGLImage(), drawOpenGL(), drawWarpOpenGL(), initOpenGL(), and makeIntermediateImageOrthoFastClass(). |
|
The width of the OpenGL image.
Definition at line 617 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by changeFormatIntermediate(), createGLImage(), drawOpenGL(), drawWarpOpenGL(), initOpenGL(), makeIntermediateImageOrthoFastClass(), warpOrtho(), and warpPerspective(). |
|
The intermediate image. An array that stores the pixels of the intermediate image. Definition at line 599 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by changeFormatIntermediate(), makeIntermediateImageOrtho(), makeIntermediateImageOrthoFastClass(), makeIntermediateImagePerspective(), read(), resetIntermediateImage(), vu111211A(), warpOrtho(), and warpPerspective(). |
|
The inverse of the warp matrix. When warping with software, for each point in the final image the corresponding point (actually 4 points which are then interpolated) in the intermediate image must be found. So we need the inverse of the warp matrix. Definition at line 485 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by computeWarpPerspective(). |
|
Element 00 of the inverse 2D-Warp-Matrix for orthogonal projection.
Definition at line 501 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by computeInvWarpOrtho(), and warpOrthoInv(). |
|
Element 01 of the inverse 2D-Warp-Matrix for orthogonal projection.
Definition at line 503 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by computeInvWarpOrtho(), and warpOrthoInv(). |
|
Element 10 of the inverse 2D-Warp-Matrix for orthogonal projection.
Definition at line 505 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by computeInvWarpOrtho(), and warpOrthoInv(). |
|
Element 11 of the inverse 2D-Warp-Matrix for orthogonal projection.
Definition at line 507 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by computeInvWarpOrtho(), and warpOrthoInv(). |
|
The inverse of the worldMatrix. Transforms from world coordinates to object coordinates. Definition at line 498 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by computeEyePoint(). |
|
Needed for OpenGL-texturing.
Definition at line 529 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by initOpenGL(), and vu111211A(). |
|
Stores an array of normal vectors.
Definition at line 430 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by computeNormals(), makeIntermediateImageOrthoFastClass(), read(), readRaw(), runlengthEncode(), and vu111211A(). |
|
The right direction of the camera.
Definition at line 439 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by setViewVectors(). |
|
The up direction of the camera.
Definition at line 436 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by setViewVectors(). |
|
The viewing direction of the camera.
Definition at line 433 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by computeMainViewingDirection(), computeZNormalizedViewingVectorLength(), makeIntermediateImageOrthoFastClass(), makeIntermediateImagePerspective(), preClassification(), setViewVectors(), shearOrtho(), and shearPerspective(). |
|
The current main viewing direction.
Definition at line 515 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by computeMainViewingDirection(), computeZNormalizedViewingVectorLength(), and makeIntermediateImageOrthoFastClass(). |
|
The maximum stretch-out of the volume. Holds the maximum stretch-out of all three dimensions of the volume Definition at line 563 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by changeFormatIntermediate(), computeMaxSize(), createGLImage(), getMinEyeDistance(), makeIntermediateImageOrtho(), makeIntermediateImageOrthoFastClass(), makeIntermediateImagePerspective(), read(), shearOrtho(), warpOrtho(), and warpPerspective(). |
|
Use OpenGL for orthogonal warping.
Definition at line 538 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by render(), setOrthogonalWarpOpenGL(), shearOrtho(), and vu111211A(). |
|
The permutation matrix. Represents the matrix that permutates the coordinates in such a way that the Z-axis becomes the main viewing direction. Definition at line 455 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by computePermutationMatrix(), and computeWarpPerspective(). |
|
The perspective projection matrix (needed only for perspective viewing. This matrix represents a perspective projection. Definition at line 492 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by computeViewMatrix(). |
|
The perspective scaling factor. The factor, by which the intermediate image must be scaled to get the right final size (only perspective projection). Definition at line 608 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by computePlanePositionScale(), computeWarpPerspective(), and shearPerspective(). |
|
The shear matrix. This matrix performs the shearing step in the shear-warp algorithm. Definition at line 469 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by computeShearPerspective(), and computeWarpPerspective(). |
|
The shearing in dimension i (horizontal). si holds the value about which the positions of two adjacent slices of the volume differ in horizontal direction. Definition at line 582 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by changeFormatIntermediate(), computeShearAndWarpFactorsOrtho(), makeIntermediateImageOrthoFastClass(), and shearOrtho(). |
|
The shearing in dimension j (vertical). sj holds the value about which the positions of two adjacent slices of the volume differ in vertical direction Definition at line 587 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by changeFormatIntermediate(), computeShearAndWarpFactorsOrtho(), makeIntermediateImageOrthoFastClass(), and shearOrtho(). |
|
Use specular light for shading?
Definition at line 534 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by makeIntermediateImageOrthoFastClass(), makeIntermediateImagePerspective(), preClassification(), setSpecular(), and vu111211A(). |
|
The value about which the front slice of the data is shifted in the intermediate image horizontally.
Definition at line 591 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by computeShearAndWarpFactorsOrtho(). |
|
The value about which the front slice of the data is shifted in the intermediate image vertically.
Definition at line 594 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by computeShearAndWarpFactorsOrtho(). |
|
Orthogonal or perspective viewing?
Definition at line 532 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by computeViewMatrix(), setViewing(), and vu111211A(). |
|
The view matrix. Represents the matrix that transforms a point in object space to its corresponding position in the final image. So this matrix represents the total viewing transformation. Definition at line 447 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by computeInvWarpOrtho(), computeShearAndWarpFactorsOrtho(), computeViewMatrix(), and drawWarpOpenGL(). |
|
The depth of the volume. The depth of the volume (depends on the main viewing direction!) Definition at line 568 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by computeRunlengthSizes(), makeIntermediateImageOrtho(), makeIntermediateImageOrthoFastClass(), makeIntermediateImagePerspective(), and shearPerspective(). |
|
The height of the volume. The height of the volume (depends on the main viewing direction!) Definition at line 576 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by computePlanePositionScale(), computeRunlengthSizes(), and shearOrtho(). |
|
The width of the volume. The width of the volume (depends on the main viewing direction!) Definition at line 572 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by computePlanePositionScale(), computeRunlengthSizes(), and shearOrtho(). |
|
The warp matrix. This matrix performs the warping step in the shear-warp algorithm Definition at line 476 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by computeWarpPerspective(). |
|
The world matrix. Transforms a point from object coordinates to world coordinates. Definition at line 462 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by computeEyePoint(), and computeViewMatrix(). |
|
Current zoom-value.
Definition at line 611 of file Regular/Unimodal/3d/1B/Intensity/ShearWarp/shearWarp.h. Referenced by drawOpenGL(), drawWarpOpenGL(), vu111211A(), and zoom(). |