Author | Changes | Lines of Code | Lines per Change |
---|---|---|---|
Totals | 23 (100.0%) | 45 (100.0%) | 1.9 |
callahan | 13 (56.5%) | 24 (53.3%) | 1.8 |
mdavis | 8 (34.8%) | 20 (44.4%) | 2.5 |
mjc | 1 (4.3%) | 1 (2.2%) | 1.0 |
sparker | 1 (4.3%) | 0 (0.0%) | 0.0 |
New Feature - Multiple 2D transfer functions per volume via user selected clipping planes.
At the network level, this makes the SCIRun->Visualization->VolumeVisualizer 2D colormap input port a dynamic input port. The first 2d colormap input behaves as before and thus backwards funcitonality is the same.
Any subsequent 2D colormaps input to the VolumeVisualizer will create an arrow widget in the viewer. This widget specifies where the new transfer funciton will be applied to the volume. The arrow points in the direction where the transfer function is not applied, allowing the user to more easily pick the direction of the clipping plane while not being occluded by the volume. But if the widget is occluded by the volume, it still shows as a lightly stippled widget that the user can still manipulate.
Files changed and a brief description:
A Core/Geom/GeomStippleOccluded.cc
A Core/Geom/GeomStippleOccluded.h
M Core/Geom/sub.mk
M Core/Geom/GeomSwitch.h
M Core/Geom/GeomOpenGL.cc
---> Added GeomStippleOccluded container that inherits from GeomSwitch. All children look normal, until they are occluded by another object, then they are drawn with a stipple pattern to allow them to be seen behind other objects. Gives a nice transparency look without the computation expense. Very useful for widgets.
M Core/Volume/VolumeRenderer.cc
M Core/Volume/VolumeRenderer.h
---> Added parameter to VolumeRenderer constructor to take in an array of clipping planes that determine where the 2D colormaps are applied. Added support for computing multple transfer functions regions with call to TextureBrick::mask_polygons. Other minor Code Cleanup.
M Core/Volume/TextureBrick.cc
M Core/Volume/TextureBrick.h
---> Rewrite for code clarity. Major addition of mask_polygons method, which takes in a vector of clipping Planes, slices the polygons into clipped and non-clipped regions, and returns their resultant bitmasks. Remove min/max of t parameter calculation that was causing re-slicing of volume at different planes for each different zoom level.
M Core/Volume/SliceRenderer.h
M Core/Volume/SliceRenderer.cc
---> Minor code to support the vector of colormap2's being passed down
M Core/Volume/TextureRenderer.h
M Core/Volume/TextureRenderer.cc
---> Code factoring to seperate long blocks of code in build_colormap2. Added code for rendering multiple colormap2s into one texture to support the multiple transfer functions that can be applied to a volume. Set bitmask for which colormaps to apply to a polygon via shader parameter to draw_polygons. Got rid of extraneous use_pbuffer_ boolean. Other minor code cleanup.
M Core/Volume/VolShader.h
M Core/Volume/VolShader.cc
---> Added shader to render using multiple transfer functions via a bitmask. Trickery by using a floating point parameter as a boolean bit mask.
M Core/Geometry/Plane.cc
M Core/Geometry/Plane.h
---> Added Plane::ChangePlane(Point,Vector) for linking w/ ArrowWidget. Added Plane::Intersect(Point, Vector, t) to get the parametric parameter where a ray hits the plane, used in TextureBrick::mask_polygons.
M Dataflow/XML/VolumeVisualizer.xml
---> Made last ColorMap2D port dynamic to support multiple transfer functions.
M Dataflow/GUI/VolumeVisualizer.tcl
---> Added checkbutton to turn off transfer function clipping plane arrow widgets.
M Dataflow/Widgets/ArrowWidget.cc
M Dataflow/Widgets/ArrowWidget.h
M Dataflow/Widgets/BaseWidget.cc
M Dataflow/Widgets/BaseWidget.h
---> Added boolean parameter to constructor to specify if ArrowWidget is rendered with a stipple pattern when occluded. Useful when arrow widget is inside the volume.
M Dataflow/Modules/Visualization/VolumeSlicer.cc
---> Send Colormap2 as vector to SliceRenderer.
M Dataflow/Modules/Visualization/VolumeVisualizer.cc
---> Create an arrow widget for each extra ColorMap2, so user can specify half-plaen where transfer function is applied to volume. Code for multiple transfer funcitons.
-McKay Davis
20 lines of code changed in 8 files:
Always use safe_normalize in widgets
17 lines of code changed in 11 files:
Retire .cvsignore files
0 lines of code changed in 1 file:
Merge v1_24_0_release
7 lines of code changed in 2 files:
add name accessor
1 lines of code changed in 1 file: