<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-9">
</head>
<body 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>"/SUBSYSTEM:windows
/ENTRY:mainCRTStartup")
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;">#include</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;"><iostream></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:#000080;">#include</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;"><vtkRenderer.h></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:#000080;">#include</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;"><vtkStructuredPoints.h></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:#000080;">#include</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;"><vtkActor.h></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:#000080;">#include</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;"><vtkRenderWindow.h></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:#000080;">#include</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;"><vtkRenderWindowInteractor.h></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:#000080;">#include</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;"><vtkInteractorStyleTrackballCamera.h></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:#000080;">#include</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;"><vtkFloatArray.h></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:#000080;">#include</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;"><vtkPointData.h></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:#000080;">#include</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;"><vtkDataSetMapper.h></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:#000080;">#include</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;"><vtkOutlineFilter.h></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:#000080;">#include</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;"><vtkPolyDataMapper.h></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:#000080;">#include</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;"><vtkElevationFilter.h></span></pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
</pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
</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:#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=" color:#000000;">;</span></pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
</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:#808000;">int</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">main</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:#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;">vtkRenderer</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">*</span><span style=" color:#000000;">ren1</span><span style=" color:#000000;">=</span><span style=" color:#800080;">vtkRenderer</span><span style=" color:#000000;">::</span><span style=" color:#000000;">New</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;">vtkRenderWindow</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">*</span><span style=" color:#000000;">renwin</span><span style=" color:#000000;">=</span><span style=" color:#800080;">vtkRenderWindow</span><span style=" color:#000000;">::</span><span style=" color:#000000;">New</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;">vtkRenderWindowInteractor</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">*</span><span style=" color:#000000;">rwi</span><span style=" color:#000000;">=</span><span style=" color:#800080;">vtkRenderWindowInteractor</span><span style=" color:#000000;">::</span><span style=" color:#000000;">New</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;">vtkInteractorStyleTrackballCamera</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">*</span><span style=" color:#000000;">style</span><span style=" color:#000000;">=</span><span style=" color:#800080;">vtkInteractorStyleTrackballCamera</span><span style=" color:#000000;">::</span><span style=" color:#000000;">New</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;">-></span><span style=" font-style:italic; color:#000000;">AddRenderer</span><span style=" color:#000000;">(</span><span style=" color:#000000;">ren1</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;">rwi</span><span style=" color:#000000;">-></span><span style=" color:#000000;">SetRenderWindow</span><span style=" color:#000000;">(</span><span style=" color:#000000;">renwin</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;">rwi</span><span style=" color:#000000;">-></span><span style=" font-style:italic; color:#000000;">SetInteractorStyle</span><span style=" color:#000000;">(</span><span style=" color:#000000;">style</span><span style=" color:#000000;">);</span></pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
</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;">vtkStructuredPoints</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">*</span><span style=" color:#000000;">sp</span><span style=" color:#000000;">=</span><span style=" color:#800080;">vtkStructuredPoints</span><span style=" color:#000000;">::</span><span style=" color:#000000;">New</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;">sp</span><span style=" color:#000000;">-></span><span style=" font-style:italic; color:#000000;">SetOrigin</span><span style=" color:#000000;">(</span><span style=" color:#000080;">0</span><span style=" color:#000000;">,</span><span style=" color:#000080;">0</span><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;">sp</span><span style=" color:#000000;">-></span><span style=" font-style:italic; color:#000000;">SetDimensions</span><span style=" color:#000000;">(</span><span style=" color:#000080;">4</span><span style=" color:#000000;">,</span><span style=" color:#000080;">4</span><span style=" color:#000000;">,</span><span style=" color:#000080;">4</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;">sp</span><span style=" color:#000000;">-></span><span style=" font-style:italic; color:#000000;">SetSpacing</span><span style=" color:#000000;">(</span><span style=" color:#000080;">1</span><span style=" color:#000000;">,</span><span style=" color:#000080;">1</span><span style=" color:#000000;">,</span><span style=" color:#000080;">1</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:#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:#008000;"> vtkFloatArray *fa=vtkFloatArray::New();</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:#008000;"> for(int i=0;i<64;i++)</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:#008000;"> fa->InsertValue(i,i);</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:#008000;"> sp->GetPointData()->SetScalars(fa);</span></pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
</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:#008000;"> vtkOutlineFilter *of=vtkOutlineFilter::New();</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:#008000;"> of->SetInput(sp);</span></pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
</pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
</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:#008000;"> vtkElevationFilter *filter=vtkElevationFilter::New();</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:#008000;"> //filter->SetInputConnection(sp->GetProducerPort());</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:#008000;"> filter->SetInput(sp);</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:#008000;"> filter->SetLowPoint(0,0,-1);</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:#008000;"> filter->SetHighPoint(0,0,1);</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:#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:#800080;">vtkDataSetMapper</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">*</span><span style=" color:#000000;">map</span><span style=" color:#000000;">=</span><span style=" color:#800080;">vtkDataSetMapper</span><span style=" color:#000000;">::</span><span style=" color:#000000;">New</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:#008000;">// map->SetInputConnection(sp->GetProducerPort());</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;">map</span><span style=" color:#000000;">-></span><span style=" color:#000000;">SetInput</span><span style=" color:#000000;">(</span><span style=" color:#000000;">sp</span><span style=" color:#000000;">);</span></pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
</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;">vtkActor</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">*</span><span style=" color:#000000;">actor</span><span style=" color:#000000;">=</span><span style=" color:#800080;">vtkActor</span><span style=" color:#000000;">::</span><span style=" color:#000000;">New</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;">actor</span><span style=" color:#000000;">-></span><span style=" font-style:italic; color:#000000;">SetMapper</span><span style=" color:#000000;">(</span><span style=" color:#000000;">map</span><span style=" color:#000000;">);</span></pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
</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;">ren1</span><span style=" color:#000000;">-></span><span style=" color:#000000;">AddActor</span><span style=" color:#000000;">(</span><span style=" color:#000000;">actor</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;">-></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;">rwi</span><span style=" color:#000000;">-></span><span style=" font-style:italic; color:#000000;">Start</span><span style=" color:#000000;">();</span></pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
</pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
</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:#000000;">}</span></pre>
<br>
</body>
</html>