<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7652.24">
<TITLE>RE: [vtkusers] artifacts with vtkMarchingCubes </TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Hi Nadine,<BR>
<BR>
I would suggest that you take a look at the original data and double check<BR>
that the heart data doesn't contain any errors, if its easy.<BR>
<BR>
Otherwise you could use the following filter to extract just the heart from<BR>
your polydata.<BR>
<BR>
(sorry python)<BR>
<BR>
cfSurf = vtkPolyDataConnectivityFilter()<BR>
cfSurf.SetExtractionModeToLargestRegion()<BR>
cfSurf.SetInput(iso.GetOutput())<BR>
<BR>
then send it to the mapper.<BR>
<BR>
regards,<BR>
<BR>
Henrik<BR>
<BR>
Hi at all!<BR>
<BR>
I have a problem with vtkMarchingCubes. I try to render a segmented heart in a vtkImageData. This&nbsp; means, the imageData only contains 0 for background and 1 for heart. My code looks like this:<BR>
<BR>
vtkMarchingCubes *iso = vtkMarchingCubes::New();<BR>
&nbsp;<BR>
iso-&gt;SetInput(imageData);<BR>
iso-&gt;SetNumberOfContours(1);<BR>
iso-&gt;SetValue(0, 1.0);&nbsp;<BR>
iso-&gt;Update();<BR>
<BR>
<BR>
Lookup = vtkLookupTable::New();<BR>
Lookup-&gt;Build();<BR>
Lookup-&gt;SetTableRange(0,1);<BR>
Lookup-&gt;SetHueRange(0.1, 0.1);<BR>
Lookup-&gt;SetSaturationRange(1.0, 1.0);<BR>
Lookup-&gt;SetValueRange(1.0, 1.0);<BR>
<BR>
<BR>
// Map to polys and create the actor.<BR>
vtkPolyDataMapper* isoMapper = vtkPolyDataMapper::New();<BR>
isoMapper-&gt;SetInput(iso-&gt;GetOutput());<BR>
isoMapper-&gt;SetLookupTable(Lookup);<BR>
&nbsp;<BR>
vtkActor *modelActor = vtkActor::New();<BR>
modelActor-&gt;VisibilityOn();<BR>
modelActor-&gt;SetMapper(isoMapper);<BR>
modelActor-&gt;GetProperty()-&gt;SetOpacity(1.0);<BR>
modelActor-&gt;GetProperty()-&gt;SetColor(0, 0, 0);<BR>
<BR>
// Add the actor to the scene<BR>
this-&gt;RenderWidgetSE-&gt;RenderWidget-&gt;GetRenderer()-&gt;AddViewProp(modelActor);<BR>
this-&gt;RenderWidgetSE-&gt;RenderWidget-&gt;GetRenderer()-&gt;ResetCamera();<BR>
this-&gt;RenderWidgetSE-&gt;RenderWidget-&gt;GetRenderer()-&gt;Render();<BR>
<BR>
<BR>
The problem is, that sometimes I see some kind of artifacts at the border of my rendered region, it is hard to explain, that's why I attached a screenshot.<BR>
<BR>
These artifacts sometimes get bigger, and sometimes there are not there at all.<BR>
<BR>
Has anybody an idea or can give me some adivse?<BR>
<BR>
Help is very appreciated! Thanks in advance for your time!<BR>
Greetings<BR>
Nadine<BR>
--<BR>
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!<BR>
Jetzt dabei sein: <A HREF="http://www.shortview.de/?mc=sv_ext_mf@gmx">http://www.shortview.de/?mc=sv_ext_mf@gmx</A><BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>