VolumeJ - Indexing Manual

This manual describes the use of using index volumes and the rendering of multimodal or multicolor volume. It was written by a VolumeJ user, Tony Collins. It was written specifically aimed at generating a red-green surface rendered image of mitochondria and endoplasmic reticulum, of approximately equal intensities. The raw data consisted of two 8-bit grey stacks obtained from a confocal microscope. The mitochondria were imaged in the red channel and the ER in the green.

Hopefully the reader will be able to extrapolate Tony's method to his/her particular situation.

I realize indexing is a bit complicated. One of the reasons is that no other volume packages I am aware of have this option. I can spend time on it to make it conceptually simpler. I use it myself a lot, and for me this was obviously not necessary. Please let me know if you would like to use it but the explanation below is still too complex. In that case I will consider simplifying it.


Quick Start

For explanation, see below. This guide assumes you have two stacks, A and B, of the same x,y,z size, that are the volumes you want to render in one rendering. A contains the foreground objects, and B contains background objects (this is only important in case objects in A and B overlap).

1. Combine the A and B stacks using Process/Image Calculator, selecting boths stacks, and doing an logical OR operation. You will end up with a volume that is the logical OR of the volumes, in other words, if a specific voxel in either volume contains a value > 0, this value will be in the new volume.

2. Save this stack under a filename such as "volume". This contains the volume to be rendered.

3. Now open A stack and save it under a new name, such as "index". Do not close it.

4. Now comes a part that looks complicated. The values of each voxel in this "index" stack determine the color that each voxel in the "volume" stack will have in the rendering. 4. You can of course set them manually, a course I do not recommend in most cases. The rest of this guide shows you tricks how to get to the right values. Once you get the hang of it, it is really simple.

5. Threshold this stack "index", so that all voxels (pixels in the stack) that are "object" are 255, and all voxels that are "not object" are 0.

You can also set all regions that you want to remain invisible (i.e. transparent) to 0 manually.

6. Find the color you want the objects in A to have from the Image/Lookup Tables/Spectrum color table. (values close to 51 will get you red objects). Remember the number.

7. Get all voxels you want to be this color to have this value in the "index" stack. A quick way to do this is to divide all interesting voxels (remember that you just set them to value 255 in step 4) by a suitable value using any of the Process/Math commands. For example, to get from 255 to 51, divide all voxels by 5 (so that voxels that are 0 remain 0 - subtraction is therefore less useful) using the Process/Math/Divide command. For example, all voxels that will be red are now be 51, and all voxels that will be not are still 0.

8. Find the color you want the objects in volume B to have from the Image/Lookup Tables/Spectrum color table. (values close to 3 will get you green objects). Remember the number.

9. Get all voxels in the "index" stack that you want to be this color to have this value. A quick way to do this is to add the value to all voxels using Process/Math/Add. For example, adding 3 to all voxels will make all 0 voxels have value 3 (green), and all 51 voxels have value 54 (still red).

10. Now save this stack again as "index".

11. Now open Plugins/VolumeJ/Volume Renderer. Set the volume stack name to the name in step 2, such as "volume" and the index name to the name in step 3, such as "index".

. Use "Gradient + Index" as the classifier.

13. Do the rendering.


Explanation

The VolumeJ “Index” classifier function can be used to color certain regions of the surface rendered volume. Two (8-bit) stacks are needed: one with the volume to be rendered (the Volume stack) and color reference stack (the Index stack). The Index stack (which has the same x, y and z dimensions as the Volume stack) contains the information that determines which color goes where. When a voxel is rendered from the Volume stack, the location of that voxel in the Index stack is determined and the color at that point in the Index stack is applied to the voxel.

The Volume stack

This is the stack to be surface rendered and must contain both the ER (green) stack and the mitochondria (red) stack. This is done with the Process/Image-Calculator command and combining the two stacks with the OR function. The original two stacks must be of similar intensities. You are creating a combined surface to be rendered, if one is brighter than the other it will require a different Classifier central value which is not possible.

The Index stack

The Index stack determines which color is applied to which structure in the final image. Since the Volume stack may have voxels containing both ER and mitochondria signal (since we combined the two stacks with OR), a decision needs to be made as to whether the mitochondria are background to the ER or vice-versa. If a voxel contains ER and mitochondria it will be colored as the “foreground”. In our case, the ER is a “background” to the mitochondria. The index stack is therefore generated from the original mitochondria (i.e. red channel) stack.

Proceed as follows:

First save the original mitochondria stack with a new name (e.g. "Index stack"). Secondly, the regions to be colored must be identified (in this case, the mitochondria). This is done by using the Brightness&Contrast function to Threshold and make the image binary (“Apply” the threshold) so that the mitochondria are converted to white (grayscale value 255) and the rest of the image (i.e. ER and background) are black (grayscale value 0).

TIP! Flattening the stack with Image/Stacks/Zprojection – Maximum intensity, can aid thresholding. Once a threshold has been determined with the Zprojection, select the Index stack, click on “Update”, then “Apply”. Also, make a note of the threshold value used; it may come in handy later when troubleshooting!

NB: If the thresholding is too rigorous, the mitochondria in the final image will have a red core and green coating or green speckles!

Next, the final color for the structure must be chosen. It is based on the “Spectrum” LUT (it is worthwhile opening the “Spectrum” LUT at this point). The white (255) value of the structure has to be converted to an appropriate grey value (see Table). This is achieved by use of the Image/Math commands.

TIP! Adding and subtracting values will also impinge on the background. This may or may not be desirable. If you require a green highlight/object in a predominately red structure, then the binary index stack can be divided by 5 and then adding 3. If you require a predominately gray structure with a colored region, ensure the background of the image stack is zero.

For the purpose of the mitochondria/ER example, we want the mitochondria to be red and the ER to be green. After thresholding, the mitochondria are white (255) and the rest of the image (i.e. ER and background) is black (0). We need the mitochondria to be red (i.e. ~5) and the rest of the image to be green (i.e. ~70). To do this we need to invert the binary image, divide by 3 and add 5. Although the background image will also be “green” coded, since it is rendered as black, only the ER appears green.

If you want the ER to be blue and the mitochondria to be yellow, then ensure that the mitochondria are set to graylevel ~40 instead of 3 and the rest of the image to be ~180 instead of ~70 (See figure 2).

Text Box:  	Final colour
0	40	70	120	180	215	255	Gray level
Figure 2. Gray levels and corresponding final colors.

TIP! Note that these values may not be simply achieved, but they are only approximates (e.g. green is equally well coded by 85 i.e. 255 divided by 3). To get a better idea of what gray level equate to which colors, generate a gray-ramp (File/New, Background – ramp), apply the “Spectrum LUT” and hover the pointer over the colors you're interested in, noting the reported gray level in the ImageJ window.

NOTE: Value 0 = black, Value 255 = white, despite what the Spectrum LUT says!

Rendering

Once the Index stack has been created (and saved), the Volume stack can be rendered. Open VolumeJ, select the Volume stack and Index stack appropriately in the drop-down menus. Select the “Gradient+Index(spectrum)” as a classifier, select the Classifier central value (a critical step) and start rendering.

TIP! Selecting “scale 0.5” for preliminary renderings speeds things along.