Surface plots

Part of the javamensch site , with more Java image processing.
Researched and written by Tony Collins, edited  by Michael Abramoff.
Surface total (22.8kB)
Surface plots can be generated with VolumeJ by converting the 8-bit 2-D object to be surface-plotted to a stack where the “height” in the z-axis correlates to the intensity of a given pixel. This is done by generating a “ramp” stack from black to white and subtracting this from the image stack. This is then surface-rendered.
1. Adjust contrast of the image to ensure the feature of interest has a peak intensity of 255. To do this, select a ROI over the object and some background and use: “Image/Adjust/Brightness & Contrast/Auto/Apply”. The key to a good surface plot seems to be to get the original image just right. Rotate the image to the desired angle now, so that the image is “side-on” and just needs rotating in the x-axis – it seems quicker and easier to do this now rather than during the surface-plotting. Scaling up the image and smoothing can generate smoother surface plots. Use Erik Meijering’s excellent TransformJ : http://bigwww.epfl.ch/meijering/software/transformj/transformj.html.
Volume rotation (8.21kB)
2. Generate a new black image stack with the same dimensions as the image to be surface-plotted but with 50-200 slices. The number of slices seems to affect the colour gradient of the final image, with 200 giving a smoother gradient but taking longer to render.
3. Using “Process/Image Calculator” add the original image to all the slices in the new “Image Stack”.
Volume addition (6.83kB)
4. Using the VolumeJ’s “Depth Coded Stack” plugin, generate a “Ramp Stack” the same dimensions as the Image Stack.
5. Using “Process/Image calculator” subtract the Ramp Stack from the Image Stack.
Volume subtraction (6.83kB)
6. Reverse the Image Stack with the “Stack reverser” plugin (http://rsb.info.nih.gov/ij/plugins/reverser.html). Volume reversed (6.86kB)
7. The stack now needs to be surface rendered. Open VolumeJ “Volume Renderer” and render the Image Stack as the “Volume Stack” with the “Ramp + Index” classifier and the “Optional Index Stack” set to the “Ramp Stack”.
VolumeJ screenshot index (46.7kB)
8. Ensure the “Classifier central value” is set to a low value (1-5) otherwise the peak values will not be plotted. Start by setting the “Rotate” value to –30, 0, 0. Then it’s a matter of playing with the VolumeJ settings. See the VolumeJ web-site for instructions for the surface rendering setting, bearing in mind this manual is for a z-series ( http://bij.isi.uu.nl/vj_manual.htm)! Try those pictured below first. The “height” of the surface plot can be adjusted with the “Aspect/:” z-value (i.e. third box).
VolumeJ screenshot aspectz (46.7kB)
Please let me (or Michael Abramoff) know how this protocol can be clarified and refined. Please also pass on any helpful hints you discover that may aid others, and myself – I write this as a guide and I’m still trying to find the “right-settings” myself! Thanks. Tony.Collins@bbsrc.ac.uk