[vtkusers] simple Maximum Intensity Projection (MIP)

Thomas Deschamps tdeschamps at lbl.gov
Wed Apr 10 17:58:49 EDT 2002


Hi I'm trying to do a simple MIP but it do not work. Here is the code:

-----------------------------------------------------------------------------------------

vtkImageReader reader
reader SetFileName "$VTK_DATA/aortaFile3D.vtk"

vtkPiecewiseFunction greyTransferFunction
greyTransferFunction AddSegment  0 1. 255 1.

vtkVolumeProperty volumeProperty
volumeProperty SetColor greyTransferFunction
volumeProperty SetInterpolationTypeToLinear

vtkVolumeRayCastMIPFunction  MIPFunction
MIPFunction SetMaximizeMethodToScalarValue

vtkVolumeRayCastMapper volumeMapper
volumeMapper SetInput [reader GetOutput]
volumeMapper SetVolumeRayCastFunction MIPFunction

vtkVolume volume
volume SetMapper volumeMapper
volume SetProperty volumeProperty
ren1 AddVolume volume
-------------------------------------------------------------------------

My image is a 3D MR dataset of 8bits grey values that has already been
used for other things.
What did I forget?

Thanks.

Thomas




More information about the vtkusers mailing list