Hi,<br>
I'm doing a MIP renderer but it is really slow. Here is my code :<br>
<br>
vtkStructuredPointsReader* vtkreader = readVolume(vtkfile);<br>
vtkreader->GetOutput()->ReleaseDataFlagOn();<br>
<br>
vtkImageCast* vtkImageCast = vtkImageCast::New();<br>
vtkImageCast->SetInput(vtkreader->GetOutput());<br>
vtkImageCast->SetOutputScalarTypeToUnsignedChar();<br>
<br>
vtkImageData *nouvelle_image =vtkImageData::New();<br>
nouvelle_image = vtkImageCast->GetOutput();<br>
<br>
vtkPiecewiseFunction* opacityTransferFunction = vtkPiecewiseFunction::New();<br>
opacityTransferFunction->AddPoint(20.0, 0.0);<br>
opacityTransferFunction->AddPoint(255.0, 0.2);<br>
<br>
vtkVolumeProperty* volumeProperty = vtkVolumeProperty::New();<br>
volumeProperty->SetScalarOpacity(opacityTransferFunction);<br>
volumeProperty->SetInterpolationTypeToNearest();<br>
volumeProperty->SetScalarOpacityUnitDistance(1.0);<br>
volumeProperty->SetShade(0);<br>
<br>
volumeMapper->SetInput(nouvelle_image);<br>
<br>
vtkVolume* volume = vtkVolume::New();<br>
volume->SetMapper(volumeMapper);<br>
volume->SetProperty(volumeProperty);<br>
<br>
aRenderer->AddActor(volume);<br>
<br>
<br>
Is there a way to make it faster without loosing details ?<br>
<br>
Thanks,<br>
<br>
jo<br>