<div dir="ltr">Change from surface to wireframe rendering mode, or apply a filter such as vtkExtractEdges and display the output of that.</div><div class="gmail_extra"><br clear="all"><div>David E DeMarle<br>Kitware, Inc.<br>

R&amp;D Engineer<br>21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-881-4909</div>
<br><br><div class="gmail_quote">On Thu, Mar 14, 2013 at 9:59 AM, Ahmet Alacadoğan <span dir="ltr">&lt;<a href="mailto:dfm@uyduarge.com" target="_blank">dfm@uyduarge.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


  

    
  
  <div text="#000000" bgcolor="#FFFFFF">
    hi everyone,<br>
    I have tried to used vtkstructuredpoints and set dimension 4,4,4 but
    it shows just one cube I cant see other cubes<br>
    how can I see other cubes of main cube<br>
    Thank you<br>
    <span style="color:#000080">#pragma</span><span style="color:#c0c0c0"> </span>comment(linker,<span style="color:#c0c0c0"> </span>&quot;/SUBSYSTEM:windows
    /ENTRY:mainCRTStartup&quot;)
    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#000080">#include</span><span style="color:#c0c0c0"> </span><span style="color:#008000">&lt;iostream&gt;</span></pre>


    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#000080">#include</span><span style="color:#c0c0c0"> </span><span style="color:#008000">&lt;vtkRenderer.h&gt;</span></pre>


    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#000080">#include</span><span style="color:#c0c0c0"> </span><span style="color:#008000">&lt;vtkStructuredPoints.h&gt;</span></pre>


    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#000080">#include</span><span style="color:#c0c0c0"> </span><span style="color:#008000">&lt;vtkActor.h&gt;</span></pre>


    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#000080">#include</span><span style="color:#c0c0c0"> </span><span style="color:#008000">&lt;vtkRenderWindow.h&gt;</span></pre>


    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#000080">#include</span><span style="color:#c0c0c0"> </span><span style="color:#008000">&lt;vtkRenderWindowInteractor.h&gt;</span></pre>


    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#000080">#include</span><span style="color:#c0c0c0"> </span><span style="color:#008000">&lt;vtkInteractorStyleTrackballCamera.h&gt;</span></pre>


    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#000080">#include</span><span style="color:#c0c0c0"> </span><span style="color:#008000">&lt;vtkFloatArray.h&gt;</span></pre>


    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#000080">#include</span><span style="color:#c0c0c0"> </span><span style="color:#008000">&lt;vtkPointData.h&gt;</span></pre>


    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#000080">#include</span><span style="color:#c0c0c0"> </span><span style="color:#008000">&lt;vtkDataSetMapper.h&gt;</span></pre>


    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#000080">#include</span><span style="color:#c0c0c0"> </span><span style="color:#008000">&lt;vtkOutlineFilter.h&gt;</span></pre>


    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#000080">#include</span><span style="color:#c0c0c0"> </span><span style="color:#008000">&lt;vtkPolyDataMapper.h&gt;</span></pre>


    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#000080">#include</span><span style="color:#c0c0c0"> </span><span style="color:#008000">&lt;vtkElevationFilter.h&gt;</span></pre>


    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></pre>
    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></pre>
    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#808000">using</span><span style="color:#c0c0c0"> </span><span style="color:#808000">namespace</span><span style="color:#c0c0c0"> </span><span style="color:#800080">std</span><span style>;</span></pre>


    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></pre>
    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#808000">int</span><span style="color:#c0c0c0"> </span><span style>main</span><span style>()</span></pre>


    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style>{</span></pre>
    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0">    </span><span style="color:#800080">vtkRenderer</span><span style="color:#c0c0c0"> </span><span style>*</span><span style>ren1</span><span style>=</span><span style="color:#800080">vtkRenderer</span><span style>::</span><span style>New</span><span style>();</span></pre>


    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0">    </span><span style="color:#800080">vtkRenderWindow</span><span style="color:#c0c0c0"> </span><span style>*</span><span style>renwin</span><span style>=</span><span style="color:#800080">vtkRenderWindow</span><span style>::</span><span style>New</span><span style>();</span></pre>


    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0">    </span><span style="color:#800080">vtkRenderWindowInteractor</span><span style="color:#c0c0c0"> </span><span style>*</span><span style>rwi</span><span style>=</span><span style="color:#800080">vtkRenderWindowInteractor</span><span style>::</span><span style>New</span><span style>();</span></pre>


    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0">    </span><span style="color:#800080">vtkInteractorStyleTrackballCamera</span><span style="color:#c0c0c0"> </span><span style>*</span><span style>style</span><span style>=</span><span style="color:#800080">vtkInteractorStyleTrackballCamera</span><span style>::</span><span style>New</span><span style>();</span></pre>


    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0">    </span><span style>renwin</span><span style>-&gt;</span><span style="font-style:italic">AddRenderer</span><span style>(</span><span style>ren1</span><span style>);</span></pre>


    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0">    </span><span style>rwi</span><span style>-&gt;</span><span style>SetRenderWindow</span><span style>(</span><span style>renwin</span><span style>);</span></pre>


    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0">    </span><span style>rwi</span><span style>-&gt;</span><span style="font-style:italic">SetInteractorStyle</span><span style>(</span><span style>style</span><span style>);</span></pre>


    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></pre>
    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0">    </span><span style="color:#800080">vtkStructuredPoints</span><span style="color:#c0c0c0"> </span><span style>*</span><span style>sp</span><span style>=</span><span style="color:#800080">vtkStructuredPoints</span><span style>::</span><span style>New</span><span style>();</span></pre>


    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0">    </span><span style>sp</span><span style>-&gt;</span><span style="font-style:italic">SetOrigin</span><span style>(</span><span style="color:#000080">0</span><span style>,</span><span style="color:#000080">0</span><span style>,</span><span style="color:#000080">0</span><span style>);</span></pre>


    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0">    </span><span style>sp</span><span style>-&gt;</span><span style="font-style:italic">SetDimensions</span><span style>(</span><span style="color:#000080">4</span><span style>,</span><span style="color:#000080">4</span><span style>,</span><span style="color:#000080">4</span><span style>);</span></pre>


    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0">    </span><span style>sp</span><span style>-&gt;</span><span style="font-style:italic">SetSpacing</span><span style>(</span><span style="color:#000080">1</span><span style>,</span><span style="color:#000080">1</span><span style>,</span><span style="color:#000080">1</span><span style>);</span></pre>


    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#008000">/*</span></pre>
    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#008000">    vtkFloatArray *fa=vtkFloatArray::New();</span></pre>
    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#008000">    for(int i=0;i&lt;64;i++)</span></pre>
    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#008000">        fa-&gt;InsertValue(i,i);</span></pre>
    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#008000">    sp-&gt;GetPointData()-&gt;SetScalars(fa);</span></pre>
    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></pre>
    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#008000">    vtkOutlineFilter *of=vtkOutlineFilter::New();</span></pre>
    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#008000">    of-&gt;SetInput(sp);</span></pre>
    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></pre>
    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></pre>
    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#008000">    vtkElevationFilter *filter=vtkElevationFilter::New();</span></pre>
    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#008000">    //filter-&gt;SetInputConnection(sp-&gt;GetProducerPort());</span></pre>
    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#008000">    filter-&gt;SetInput(sp);</span></pre>
    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#008000">    filter-&gt;SetLowPoint(0,0,-1);</span></pre>
    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#008000">    filter-&gt;SetHighPoint(0,0,1);</span></pre>
    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#008000">*/</span></pre>
    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0">    </span><span style="color:#800080">vtkDataSetMapper</span><span style="color:#c0c0c0"> </span><span style>*</span><span style>map</span><span style>=</span><span style="color:#800080">vtkDataSetMapper</span><span style>::</span><span style>New</span><span style>();</span></pre>


    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0">   </span><span style="color:#008000">// map-&gt;SetInputConnection(sp-&gt;GetProducerPort());</span></pre>


    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0">    </span><span style>map</span><span style>-&gt;</span><span style>SetInput</span><span style>(</span><span style>sp</span><span style>);</span></pre>


    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></pre>
    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0">    </span><span style="color:#800080">vtkActor</span><span style="color:#c0c0c0"> </span><span style>*</span><span style>actor</span><span style>=</span><span style="color:#800080">vtkActor</span><span style>::</span><span style>New</span><span style>();</span></pre>


    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0">    </span><span style>actor</span><span style>-&gt;</span><span style="font-style:italic">SetMapper</span><span style>(</span><span style>map</span><span style>);</span></pre>


    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></pre>
    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0">    </span><span style>ren1</span><span style>-&gt;</span><span style>AddActor</span><span style>(</span><span style>actor</span><span style>);</span></pre>


    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0">    </span><span style>renwin</span><span style>-&gt;</span><span style="font-style:italic">Render</span><span style>();</span></pre>


    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#c0c0c0">    </span><span style>rwi</span><span style>-&gt;</span><span style="font-style:italic">Start</span><span style>();</span></pre>


    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></pre>
    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></pre>
    <pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style>}</span></pre>
    <br>
  </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>