<div dir="ltr">Great!</div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Dec 6, 2015 at 10:44 AM, Imre Goretzki <span dir="ltr"><<a href="mailto:goretzki.imre@gmail.com" target="_blank">goretzki.imre@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
Thank you Cory,<br>
<br>
I implemented the vtkThreshold today, now it is working fine.<span class="HOEnZb"><font color="#888888"><br>
<br>
Imre</font></span><div><div class="h5"><br>
<br>
<div>Am 06.12.2015 um 16:22 schrieb Cory
Quammen:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Sat, Dec 5, 2015 at 1:15 PM, Imre
Goretzki <span dir="ltr"><<a href="mailto:goretzki.imre@gmail.com" target="_blank">goretzki.imre@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hey
guys,<br>
<br>
I have a question about the "GenerateValues" method of
MarchingCubes. My image has several points that have
intensity values that lie between 928 and 1600.<br>
<br>
My understand of<br>
<br>
int idxContour = 1;<br>
double from = 920;<br>
double to = 930;<br>
<br>
ImageToVTKImageFilter con = ...<br>
<br>
marchingCube->setInputData(con->GetOutput());<br>
marchingCube->GenerateValues(idxContour, from, to);<br>
marchingCube->Update();<br>
<br>
is that the algorithm will take all points that have an
intensity value that lies between 920 and 930. These
points are combined to one contour. Via MATLAB and ITK's
histogram I can validate the amout of points that have a
specific intensity value. </blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> </blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">If
I plot the points that were generated by marching cubes, I
do not get all of them (I cannot see all of them), e.g.<br>
the histogram says that there are about 200000 points that
have an intensity value 928. If I use 928 as the lower
bound for the GenerateValues method, there are just some
of them plotted - approximately.<br>
<br>
Is my understanding of GenerateValues correct?<br>
</blockquote>
<div> </div>
<div>
<div>Not exactly. vtkMarchingCubes will extract individual
isocontours - surfaces that represent the locations in a
dataset with a particular value. vtkMarchingCubes and
other isocontour filters in VTK can generate surfaces
from more than one isovalue. GenerateValues() is a
convenience function to specify a range of isovalues.</div>
<div><br>
</div>
<div>A vtkThreshold filter will extract all points in the
dataset in a value range and may be what you want.</div>
</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Next
question: (more than 1 contour)<br>
<br>
If I want to generate more than 1 contour. How do I
initialize the marchingCube and, more interesting, how do
I get the output of a specific contour. I'm thinking about
the following:<br>
<br>
<br>
marchingCube->SetNumberOfContours(2);<br>
marchingCube->GenerateValues(1, from_1, to_1);<br>
marchingCube->GenerateValues(2, from_2, to_2);<br>
<br>
vtkSmartPointer<vtkOutlineFilter> outline =
vtkSmartPointer<vtkOutlineFilter>::New();<br>
outline->SetInputConnection(marchingCube->GetOutput(1));<br>
<br>
vtkSmartPointer<vtkPolyDataMapper> outlineMapper =
vtkSmartPointer<vtkPolyDataMapper>::New();<br>
outlineMapper->SetInputConnection(outline->GetOutputPort());<br>
<br>
vtkSmartPointer<vtkPolyDataMapper> data1 =
vtkSmartPointer<vtkPolyDataMapper>::New();<br>
data1->SetInputConnection(marchingCube->GetOutput(1));<br>
<br>
vtkSmartPointer<vtkPolyDataMapper> data2 =
vtkSmartPointer<vtkPolyDataMapper>::New();<br>
data2->SetInputConnection(marchingCube->GetOutput(2));<br>
<br>
I know that the above lines are not working like this, but
I actually do not know how to do that. Right now I have 2
marchingCube instances that do the work for data1/data2
but that should not do the trick.<br>
</blockquote>
<div><br>
</div>
<div>You can't set up two different isocontour surfaces and
get two different outputs this way. Using two separate
vtkMarchingCubes instances is the right way to go.</div>
<div><br>
</div>
<div>HTH,</div>
<div>Cory</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
I hope you can help me<br>
<br>
Greetings<br>
Imre<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank"></a><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" rel="noreferrer" target="_blank"></a><a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div>Cory Quammen<br>
R&D Engineer<br>
Kitware, Inc.</div>
</div>
</div>
</blockquote>
<br>
</div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Cory Quammen<br>R&D Engineer<br>Kitware, Inc.</div>
</div>