[vtkusers] Fwd: Re: vtkDICOMImageReader 3D render

sercani sercanimailgroups at gmail.com
Fri Mar 26 12:19:34 EDT 2010


  What kind of a 3D rendering do you want? MPR, MIP, MINIP, SSD, VRT?
For example for SSD rendering you can try this:

     vtkMarchingContourFilter *contour=vtkMarchingContourFilter::New();
     contour->SetInput(reader->GetOutput());
     contour->SetValue(0,-500);
     contour->Update();

     vtkStripper *stripper=vtkStripper::New();
     stripper->SetInput(contour->GetOutput());

     vtkPolyDataMapper *polyDataMapper=vtkPolyDataMapper::New();
     polyDataMapper->SetInput(stripper->GetOutput());
     polyDataMapper->ScalarVisibilityOff();

     vtkProperty *prop=vtkProperty::New();
     prop->SetColor(1,1,0.940);
     prop->ShadingOn();
     prop->BackfaceCullingOff();

     vtkActor *actor=vtkActor::New();
     actor->SetMapper(polyDataMapper);
     actor->SetProperty(prop);
     actor->RotateX(90.0);
     actor->VisibilityOn();

     qvtk->GetRenderer()->AddActor(actor);
     qvtk->GetRenderer()->ResetCameraClippingRange();

     contour->Delete();
     stripper->Delete();
     polyDataMapper->Delete();
     prop->Delete();

26.03.2010 15:38, Drysdale, Jeremy yazm?s,:
>
> Hello VTK World,
>
> I'm attempting to use vtkDICOMImageReader to read a directory of DICOM 
> images and display them to a qt QVTKWidget in 3D.  I'm able to display 
> a 2D image (that's not scrollable), but not render in 3D.  Does anyone 
> have any example code out there for rendering this sort of thing in 3D?
>
> Thanks,
>
> Jeremy Drysdale
>
> Distinguished Research Engineer
>
> eScience Support
>
> Philips Research North America
>
> 345 Scarborough Road
>
> Briarcliff Manor, NY, 10510, USA
>
> Tel: (914) 945-6612
>
> E-mail: jeremy.drysdale at philips.com <mailto:jeremy.drysdale at philips.com>
>
> Please consider the environment before printing this email.
>
>
> ------------------------------------------------------------------------
> The information contained in this message may be confidential and 
> legally protected under applicable law. The message is intended solely 
> for the addressee(s). If you are not the intended recipient, you are 
> hereby notified that any use, forwarding, dissemination, or 
> reproduction of this message is strictly prohibited and may be 
> unlawful. If you are not the intended recipient, please contact the 
> sender by return e-mail and destroy all copies of the original message.
>
>
> _______________________________________________
> Powered bywww.kitware.com
>
> Visit other Kitware open-source projects athttp://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>    

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100326/123dc7a4/attachment.htm>


More information about the vtkusers mailing list