<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hi<br>
      I found part of the problem it was in the releasedataflag, I had
      to not set the last step to ON<br>
      The code now is tripped to the minimum, a threshold and a marching
      cubes <br>
      the behavior is as follow: the actors appear then disappear, I
      believe it is a memory update issue, but I can't get it to work
      properly<br>
      this example is similar to the one posted in <br>
<a class="moz-txt-link-freetext" href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Medical/GenerateModelsFromLabels">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Medical/GenerateModelsFromLabels</a><br>
      <br>
      except that I want to display the generated labels as separate
      actors while the example saves them into files which I
      successfully can do. <br>
      <br>
      <span style=" color:#c0c0c0;"> </span><span style="
        color:#800080;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; vtkSmartPointer</span><span style="
        color:#000000;">&lt;</span><span style=" color:#800080;">vtkImageThreshold</span><span
        style=" color:#000000;">&gt;</span><span style=" color:#c0c0c0;">
      </span><span style=" color:#000000;">threshold</span><span style="
        color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span
        style=" color:#c0c0c0;"> </span><span style=" color:#800080;">vtkSmartPointer</span><span
        style=" color:#000000;">&lt;</span><span style=" color:#800080;">vtkImageThreshold</span><span
        style=" color:#000000;">&gt;::</span>New<span style="
        color:#000000;">();;</span>
      <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#000000;">threshold</span><span style=" color:#000000;">-&gt;</span>SetOutValue<span style=" color:#000000;">(</span><span style=" color:#000080;">0</span><span style=" color:#000000;">);</span></pre>
      <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#000000;">threshold</span><span style=" color:#000000;">-&gt;</span>SetInput<span style=" color:#000000;">(</span><span style=" color:#000000;">brain</span><span style=" color:#000000;">);</span></pre>
      <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#000000;">threshold</span><span style=" color:#000000;">-&gt;</span>ReleaseDataFlagOn<span style=" color:#000000;">();</span></pre>
      <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#800080;">vtkSmartPointer</span><span style=" color:#000000;">&lt;</span><span style=" color:#800080;">vtkMarchingCubes</span><span style=" color:#000000;">&gt;</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">mcubes</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#800080;">vtkSmartPointer</span><span style=" color:#000000;">&lt;</span><span style=" color:#800080;">vtkMarchingCubes</span><span style=" color:#000000;">&gt;::</span>New<span style=" color:#000000;">();</span></pre>
      <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#000000;">mcubes</span><span style=" color:#000000;">-&gt;</span><span style=" font-style:italic; color:#000000;">SetInputConnection</span><span style=" color:#000000;">(</span><span style=" color:#000000;">threshold</span><span style=" color:#000000;">-&gt;</span>GetOutputPort<span style=" color:#000000;">());</span></pre>
      <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#808000;">for</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">(</span><span style=" color:#800080;">uint</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">i</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000080;">0</span><span style=" color:#000000;">;</span><span style=" color:#000000;">i</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">&lt;</span><span style=" color:#000080;">5</span><span style=" color:#000000;">;</span><span style=" color:#000000;">i</span><span style=" color:#000000;">++)</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">{</span><span style=" color:#c0c0c0;"> </span><span style="!
  color:#
008000;"></span></pre>
      <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">        </span><span style=" color:#000000;">threshold</span><span style=" color:#000000;">-&gt;</span>ThresholdBetween<span style=" color:#000000;">(</span><span style=" color:#000000;">lblValues</span><span style=" color:#000000;">(</span><span style=" color:#000000;">i</span><span style=" color:#000000;">),</span><span style=" color:#000000;">lblValues</span><span style=" color:#000000;">(</span><span style=" color:#000000;">i</span><span style=" color:#000000;">));</span></pre>
      <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">        </span><span style=" color:#000000;">mcubes</span><span style=" color:#000000;">-&gt;</span>SetValue<span style=" color:#000000;">(</span><span style=" color:#000080;">0</span><span style=" color:#000000;">,</span><span style=" color:#000000;">lblValues</span><span style=" color:#000000;">(</span><span style=" color:#000000;">i</span><span style=" color:#000000;">));</span></pre>
      <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">        </span><span style=" color:#800080;">vtkSmartPointer</span><span style=" color:#000000;">&lt;</span><span style=" color:#800080;">vtkPolyDataMapper</span><span style=" color:#000000;">&gt;</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">isoMapper</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#800080;">vtkSmartPointer</span><span style=" color:#000000;">&lt;</span><span style=" color:#800080;">vtkPolyDataMapper</span><span style=" color:#000000;">&gt;::</span>New<span style=" color:#000000;">();</span></pre>
      <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">        </span><span style=" color:#000000;">isoMapper</span><span style=" color:#000000;">-&gt;</span>SetInput<span style=" color:#000000;">(</span><span style=" color:#000000;">mcubes</span><span style=" color:#000000;">-&gt;</span>GetOutput<span style=" color:#000000;">());</span></pre>
      <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">        </span><span style=" color:#800080;">vtkSmartPointer</span><span style=" color:#000000;">&lt;</span><span style=" color:#800080;">vtkActor</span><span style=" color:#000000;">&gt;</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">isoActor</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#800080;">vtkSmartPointer</span><span style=" color:#000000;">&lt;</span><span style=" color:#800080;">vtkActor</span><span style=" color:#000000;">&gt;::</span>New<span style=" color:#000000;">();</span></pre>
      <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">        </span><span style=" color:#000000;">isoActor</span><span style=" color:#000000;">-&gt;</span><span style=" font-style:italic; color:#000000;">SetMapper</span><span style=" color:#000000;">(</span><span style=" color:#000000;">isoMapper</span><span style=" color:#000000;">);</span></pre>
      <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">        </span><span style=" color:#000000;">renderer</span><span style=" color:#000000;">-&gt;</span>AddActor<span style=" color:#000000;">(</span><span style=" color:#000000;">isoActor</span><span style=" color:#000000;">);</span></pre>
      <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">        </span><span style=" color:#000000;">renWin</span><span style=" color:#000000;">-&gt;</span><span style=" font-style:italic; color:#000000;">Render</span><span style=" color:#000000;">();</span></pre>
      <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#000000;">}</span></pre>
      <br>
      Thanks<br>
      Johnson<br>
      <br>
      On 6/28/2013 8:21 AM, David Doria wrote:<br>
    </div>
    <blockquote
cite="mid:CABDpjTnJScsBKL0yDmfpPwd-92wHTU5GwRBJ1UrnDJX_oQL-ng@mail.gmail.com"
      type="cite">
      <pre wrap="">On Thu, Jun 27, 2013 at 10:31 PM, johnsonjonaris <a class="moz-txt-link-rfc2396E" href="mailto:jgadel2@uic.edu">&lt;jgadel2@uic.edu&gt;</a> wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">Dear All
I made a pipeline which visualize a set of shapes from a vtkImageData volume
with integral data (integer values). The pipeline executes but the output is
not rendered in the rendering window, although I can save the output and
load it in PARAVIEW.
Moreover, I know that the actors I create are there since I can probe their
color property later.
Please help
</pre>
      </blockquote>
      <pre wrap="">
I would suggest taking that example that you posted and stripping it
down a piece at a time until it breaks. That is, make the actor use
the data from the very beginning of the pipeline and see if it is
displayed properly at that point. Then add one filter at a time until
it breaks. Once you get it to as small of a case as possible that
demonstrates the problem, we can take a look if you still can't figure
it out. Be sure to generate data programmatically rather than read an
input file as it is much easier to reproduce.

David

</pre>
    </blockquote>
    <br>
  </body>
</html>