<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
I am wondering if there is a bug in vtkDiscreteMarchingCubes. When I create a new instance of this class and a corresponding actor on each label, there seems to be some unwanted side-effects. If only a signle actor is created for one component and the resulting volume plotted, it works correctly. If I call this on two or more components, the resulting volumes appear disconnected and result in surfaces created arbitrarily in other voxels. Do marching cube classes modify the original voxel buffer passed to it? <div><br></div><div>When I use generateScalars to plot multiple contours simultaneously, that works correctly without generating surfaces all over the place. Using this method, how do I color each separate label differently.</div><div><br></div><div>Thanks,</div><div>Thommen<br><br><hr id="stopSpelling">Date: Thu, 24 Feb 2011 14:15:35 +0530<br>Subject: Re: [vtkusers] Visualizing multiple isosurfaces using vtkContourFilter<br>From: karthik.krishnan@kitware.com<br>To: thkorah@hotmail.com<br>CC: vtkusers@vtk.org<br><br><div> Since this is a labelled image with several label (ids), you could use vtkDiscreteMarchingCubes once on each label of interest instead of vtkContourFilter. This will extract just the interface between the cells containing the label of interest and its neighbors, whatever id they may have.</div>
<div> </div>
<div>--</div>
<div>karthik<br><br></div>
<div class="ecxgmail_quote">On Thu, Feb 24, 2011 at 4:39 AM, Thommen Korah <span dir="ltr"><<a href="mailto:thkorah@hotmail.com">thkorah@hotmail.com</a>></span> wrote:<br>
<blockquote class="ecxgmail_quote" style="padding-left:1ex;border-left:#ccc 1px solid">
<div>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.
<div><br></div>
<div>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?</div>
<div><br></div>
<div>Thanks.</div>
<div><br>> Date: Wed, 23 Feb 2011 08:23:29 -0500<br>> Subject: Re: [vtkusers] Visualizing multiple isosurfaces using vtkContourFilter<br>> From: <a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a><br>
> To: <a href="mailto:thkorah@hotmail.com">thkorah@hotmail.com</a><br>> CC: <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>
<div>
<div></div>
<div class="h5"><br>> <br>> There are two ways to do this:<br>> <br>> 1) Create two ContourFilters. Use cf1->SetValue(0,val1) and<br>> cf2->SetValue(0,val2).<br>> You will need 2 mappers and actors.<br>
> 2) Create one ContourFilter. Use cf->SetValue(0,val1) and cf->SetValue(1,val2).<br>> You will need 1 mapper and actor.<br>> <br>> Both use share the same memory.<br>> <br>> Coloring is easier in case 1).<br>
> mapper1->SetInput(cf1->GetOutput());<br>> mapper1->ScalarVisibilityOff();<br>> actor1->SetMapper(mapper1);<br>> actor1->GetProperty()->SetDiffuseColor(r,g,b);<br>> mapper2->SetInput(cf2->GetOutput());<br>
> mapper2->ScalarVisibilityOff();<br>> actor2->SetMapper(mapper2);<br>> actor2->GetProperty()->SetDiffuseColor(r,g,b);<br>> <br>> Case 2 is trickier and involves mucking with lookup tables.<br>> <br>
> <br>> <br>> On Wed, Feb 23, 2011 at 1:16 AM, Thommen Korah <<a href="mailto:thkorah@hotmail.com">thkorah@hotmail.com</a>> wrote:<br>> > Hi,<br>> > I have a pointcloud on which I perform segmentation to extract different<br>
> > structures projecting out of a flat surface (a table for example). The<br>> > pointcloud is stored in a voxel data structure. I would now like to<br>> > visualize these segmented regions by creating isosurfaces using<br>
> > vtkContourFilter for each object. How can I generate multiple surfaces (eg.<br>> > book and a cup lying on the table) using the same shared data in memory? I<br>> > would also like to visualize each segmented region in a different color.<br>
> > Thanks.<br>> > _______________________________________________<br>> > Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br>> ><br>> > Visit other Kitware open-source projects at<br>
> > <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>> ><br>> > Please keep messages on-topic and check the VTK FAQ at:<br>
> > <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>> ><br>> > Follow this link to subscribe/unsubscribe:<br>> > <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
> ><br>> ><br></div></div></div></div><br>_______________________________________________<br>Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br><br>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>                                            </body>
</html>