[SciPy-User] Projecting volumes down to 2D

Christoph Gohlke cgohlke@uci....
Thu Sep 1 03:34:16 CDT 2011



On 8/31/2011 3:35 PM, Chris Weisiger wrote:
> Briefly, I'm working on a visualization tool for five-dimensional
> microscopy data (X/Y/Z/time/wavelength). Different wavelengths can be
> transformed with respect to each other: X/Y/Z translation, rotation
> about the Z axis, and uniform scaling in X and Y. We can then show
> various 2D slices of the data that pass through a specific XYZT point:
> an X-Y slice, an X-Z slice, a Y-Z slice, and slices through time.
> These slices are generated by transforming the view coordinates and
> using scipy.ndimage.map_coordinates.
>
> Now we want to be able to project an entire row/column/etc. of pixels
> into a single pixel. For example, in the X-Y slice, each pixel shown
> is actually the brightest pixel from the entire Z column. This example
> is easily done by taking the maximum along the Z axis and then
> proceeding as normal with generating the slice, albeit with a Z
> transformation of 0. That's because the other transformation
> parameters don't move data through the Z axis. Thus I still only have
> to transform X by Y pixels.
>
> I'm having trouble with an edge case for transformed data, though: if
> the projection axis is X or Y, and there is a rotation/scale factor,
> then I can't see a way to avoid having to transform every single pixel
> in a 3D volume to obtain the projection -- that is, transforming X by
> Y by Z pixels. This is expensive. Obviously each pixel in the volume
> must be considered to generate these projections, but does every pixel
> have to be transformed? I don't suppose anyone knows of a way to
> simplify the problem?
>
> -Chris

This looks like "maximum intensity projection" visualization 
<http://en.wikipedia.org/wiki/Maximum_intensity_projection>. MIP can be 
efficiently implemented using OpenGL by blending together multiple 
slices, oriented perpendicular to the projection direction, through a 3D 
texture (xyz data). Also consider VTK's vtkVolumeRayCastMIPFunction class.

Christoph


More information about the SciPy-User mailing list