[vtkusers] Visualizing multiple isosurfaces using vtkContourFilter

Thommen Korah thkorah at hotmail.com
Wed Feb 23 18:09:30 EST 2011


Thanks for your help. I decided to use the first method with separate filters. I have multiple segmented regions, and each voxel stores the id that it belongs to. So all cells belonging to object 3 will store the number 3.
But when I create cf3 filter and call cf3->setValue(0,3), it creates the isosurface using all cells. My intent is to create the surface only using cells storing 3. Any idea why this might be?
Thanks.
> Date: Wed, 23 Feb 2011 08:23:29 -0500
> Subject: Re: [vtkusers] Visualizing multiple isosurfaces using vtkContourFilter
> From: bill.lorensen at gmail.com
> To: thkorah at hotmail.com
> CC: vtkusers at vtk.org
> 
> There are two ways to do this:
> 
> 1) Create two ContourFilters. Use cf1->SetValue(0,val1) and
> cf2->SetValue(0,val2).
>     You will need 2 mappers and actors.
> 2) Create one ContourFilter. Use cf->SetValue(0,val1) and cf->SetValue(1,val2).
>     You will need 1 mapper and actor.
> 
> Both use share the same memory.
> 
> Coloring is easier in case 1).
>   mapper1->SetInput(cf1->GetOutput());
>   mapper1->ScalarVisibilityOff();
>   actor1->SetMapper(mapper1);
>   actor1->GetProperty()->SetDiffuseColor(r,g,b);
>   mapper2->SetInput(cf2->GetOutput());
>   mapper2->ScalarVisibilityOff();
>   actor2->SetMapper(mapper2);
>   actor2->GetProperty()->SetDiffuseColor(r,g,b);
> 
> Case 2 is trickier and involves mucking with lookup tables.
> 
> 
> 
> On Wed, Feb 23, 2011 at 1:16 AM, Thommen Korah <thkorah at hotmail.com> wrote:
> > Hi,
> > I have a pointcloud on which I perform segmentation to extract different
> > structures projecting out of a flat surface (a table for example). The
> > pointcloud is stored in a voxel data structure. I would now like to
> > visualize these segmented regions by creating  isosurfaces using
> > vtkContourFilter for each object. How can I generate multiple surfaces (eg.
> > book and a cup lying on the table) using the same shared data in memory? I
> > would also like to visualize each segmented region in a different color.
> > Thanks.
> > _______________________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://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/20110223/9e2e0791/attachment.htm>


More information about the vtkusers mailing list