<DIV>Hi all,</DIV>
<DIV> </DIV>
<DIV>I've a volume data that I tried to volume render with ray casting(which I constructed from 5, 2D images). I've a couple of questions at this time:</DIV>
<DIV> </DIV>
<DIV>1. When I rotate the volume around, assuming that image slice 1 is visible, I expect the see the structures in other slices; say if I rotate it 180 degrees around I'm expecting to see structures from image slice 5; but I still see only the structures from slice 1. Am I missing something while rendering? (I've verified the dimensions of the volume dataset and it is correct).</DIV>
<DIV> </DIV>
<DIV>2. Are there segmentation algorithms that are available with vtk that can used on 2D images before being volume rendered?</DIV>
<DIV> </DIV>
<DIV>3. With the volume built from 5 image slices, when I rotate the volume around, the thickness of the volume (along z-axis) appears to be got just from a single image. May be I'm doing something wrong in rendering.</DIV>
<DIV> </DIV>
<DIV>Here are few fragments of my code that I used to volume render:</DIV>
<DIV> </DIV>
<DIV>CVolRendererView::CVolRendererView()<BR>{<BR> this->color = vtkPiecewiseFunction::New();<BR> this->color->AddPoint(0, 0.0);<BR> this->color->AddPoint(255, 1.0);</DIV>
<DIV> </DIV>
<DIV> this->opacity = vtkPiecewiseFunction::New();<BR> this->opacity->AddPoint(0, 0.0);<BR> this->opacity->AddPoint(130, 0.0);<BR> this->opacity->AddPoint(140, 1.0);<BR> this->opacity->AddPoint(255, 1.0);</DIV>
<DIV> </DIV>
<DIV> this->gradOpacity = vtkPiecewiseFunction::New();<BR> this->gradOpacity->AddPoint(0, 0.0);<BR> this->gradOpacity->AddPoint(3, 0.0);<BR> this->gradOpacity->AddPoint(6, 1.0);<BR> this->gradOpacity->AddPoint(255, 1.0);</DIV>
<DIV> </DIV>
<DIV> this->property = vtkVolumeProperty::New();<BR> this->property->SetColor(this->color);<BR> this->property->SetScalarOpacity(this->opacity);<BR> this->property->SetGradientOpacity(this->gradOpacity);</DIV>
<DIV> this->property->ShadeOn();<BR> this->property->SetInterpolationTypeToLinear();</DIV>
<DIV> </DIV>
<DIV> this->composite = vtkVolumeRayCastCompositeFunction::New();<BR> this->composite->SetCompositeMethodToInterpolateFirst();</DIV>
<DIV> </DIV>
<DIV> this->mapper = vtkVolumeRayCastMapper::New();<BR> this->mapper->SetVolumeRayCastFunction(composite);</DIV>
<DIV> </DIV>
<DIV> this->volume = vtkVolume::New();<BR> this->volume->SetMapper(this->mapper);<BR> this->volume->SetProperty(this->property);</DIV>
<DIV> </DIV>
<DIV> this->ren = vtkRenderer::New();<BR> this->ren->AddVolume(volume);</DIV>
<DIV> this->renWin = vtkWin32OpenGLRenderWindow::New();</DIV>
<DIV> </DIV>
<DIV> this->iren = vtkRenderWindowInteractor::New();</DIV>
<DIV><BR> this->imageAppend = vtkImageAppend::New();<BR> this->imageAppend->SetAppendAxis(2);</DIV>
<DIV> </DIV>
<DIV> this->renWin->AddRenderer(this->ren);<BR> this->iren->SetRenderWindow(this->renWin);<BR> this->iren->Start();<BR>}</DIV>
<DIV> </DIV>
<DIV>//Updating the volume with new image slices</DIV>
<DIV>this->imageAppend->AddInput(this->GetDocument()->reader->GetOutput());<BR>this->imageAppend->UpdateWholeExtent();<BR></DIV>
<DIV>//Rendering</DIV>
<DIV>this->mapper->SetInput((vtkImageData*)this->imageAppend->GetOutput());<BR>this->ren->ResetCamera();<BR>this->renWin->Render();<BR></DIV>
<DIV>I would appreciate your inputs on this.</DIV>
<DIV> </DIV>
<DIV>Thanks,</DIV>
<DIV>Madhu.</DIV><p>__________________________________________________<br>Do You Yahoo!?<br>Tired of spam? Yahoo! Mail has the best spam protection around <br>http://mail.yahoo.com