public class VolumeRenderer extends Object implements AxisConstants
Modifier and Type | Field and Description |
---|---|
protected AppearanceCreator |
appCreator
The AppearanceCreator, which creates the textures.
|
protected int[][] |
axisIndex
The index in the switch, given the direction
|
protected Switch |
axisSwitch
A Switch, which holds 6 OrderedGroups, one for each direction
|
protected GeometryCreator |
geomCreator
The GeometryCreator, which creates the corresponding geomentries.
|
protected BranchGroup |
root
The root BranchGroup whose subtree contains the volume rendering
|
protected VoltexVolume |
volume
The image data which is rendered by this VolumeRenderer
|
Constructor and Description |
---|
VolumeRenderer(ij.ImagePlus img,
Color3f color,
float tr,
boolean[] channels)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Mask |
createMask()
Create a mask to this volume.
|
void |
disableTextures() |
void |
enableTextures() |
void |
eyePtChanged(View view) |
void |
fullReload()
Fully removes all the data and reloads all the textures.
|
Appearance |
getAppearance(int axis,
int index)
Get the Appearance object for the Shape3D of the specified axis; Note that
both front and back shapes share the same Appearance.
|
VoltexVolume |
getVolume()
Returns the image data of this rendering.
|
BranchGroup |
getVolumeNode()
Returns the root BranchGroup below which the whole volume rendering is
organized.
|
protected void |
loadAxis(int axis)
Load a specific axis (both front and back direction) This method is
protected, so that it can eventually be overridden by subclasses like
Orthoslice.
|
protected void |
loadAxis(int axis,
int index,
Group front,
Group back)
Load a specific slice of the specified axis (both front and back direction)
and adds it to the specified Groups.
|
void |
setChannels(boolean[] channels)
Set the displayed color channels for this volume rendering.
|
void |
setColor(Color3f color)
Set the color for this volume rendering
|
void |
setLUTs(int[] r,
int[] g,
int[] b,
int[] a)
Update the lookup tables for this volume rendering.
|
void |
setThreshold(int threshold)
Set the threshold.
|
void |
setTransparency(float transparency)
Set the transparency for this rendering
|
protected final VoltexVolume volume
protected final BranchGroup root
protected final AppearanceCreator appCreator
protected final GeometryCreator geomCreator
protected final Switch axisSwitch
protected final int[][] axisIndex
public VolumeRenderer(ij.ImagePlus img, Color3f color, float tr, boolean[] channels)
img
- the image stack to be rendered.color
- the color in which this rendering should be displayedtr
- the transparency value for this volume renderingchannels
- the rgb channels which should be used. This must be a
boolean[] array of length three, one for red, green and blue
respectively.public void disableTextures()
public void enableTextures()
public BranchGroup getVolumeNode()
public VoltexVolume getVolume()
public Appearance getAppearance(int axis, int index)
public Mask createMask()
public void eyePtChanged(View view)
public void fullReload()
public void setThreshold(int threshold)
threshold
- public void setTransparency(float transparency)
transparency
- public void setChannels(boolean[] channels)
channels
- public void setLUTs(int[] r, int[] g, int[] b, int[] a)
public void setColor(Color3f color)
color
- protected void loadAxis(int axis)
axis
- protected void loadAxis(int axis, int index, Group front, Group back)
axis
- index
- front
- back
- Copyright © 2015–2021 Fiji. All rights reserved.