<span style="font-size: 11pt; color: rgb(0, 0, 0); font-family: courier new,monospace;" lang="EN-US">Thank Steiner</span><span style="font-family: courier new,monospace;"> a lot for your kind help !  As you know, when I  use ReleaseDataFlag as Bill and you mentioned, the performance of my app is improved. However,the problem will occur again while the data set arguments. In my opinion, just as you mentioned last time,a efficient solution is manually get memory from the os for the app。I also read relevant</span> information of <span style="font-size: 10pt; font-family: courier new,monospace;" lang="EN-US">GlobalMemoryStatusEx function on msdn,but i still do not konw how to get memory for my code. And your code puzzled me, could you explain more clearly? Thank you very much!</span><br>
<br><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">      </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">MEMORYSTATUSEX  statex1;</span>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">      statex1.dwLength = <span style="color: blue;">sizeof</span> (statex1);</span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">      GlobalMemoryStatusEx(&amp;statex1);</span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">      <span style="color: blue;">int</span> numMBfree = (<span style="color: blue;">int</span>)
statex1.ullAvailPhys/1048576;</span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">      </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: blue;">int</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> x0e, x1e, y0e, y1e, z0e,
z1e;</span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">      pParentVolume-&gt;m_pImageData-&gt;GetWholeExtent(x0e,
x1e, y0e, y1e, z0e, z1e);//??? what&#39;s the data type of pParentVolume?<br></span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">      <span style="color: blue;">int</span> numMBVolume
= x1e*y1e*z1e*2/1048576;//how to use it?</span></p><p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">For example,how to get memory used for the follow code from the os?(My machine has 8GB physical memory,although the memory limit of process is 2GB,but the app did&#39;t get </span>practically <span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> 1GB memory !)</span></p>
<p class="MsoNormal" style="">for (size_t numIndex = 0; numIndex &lt; y; numIndex++)<br>
    {<br>
        vskinExtractor.push_back(</p><p class="MsoNormal">vtkMarchingCubes::New());<br>
       
vskinExtractor[numIndex]-&gt;SetInputConnection(m_read-&gt;GetOutputPort());<br>
       
vskinExtractor[numIndex]-&gt;SetValue(numIndex, vYuzhi[numIndex]);<br>
<br>
        vdeci.push_back(vtkDecimatePro::New());<br>
        vdeci[numIndex]-&gt;SetInputConnection(vskinExtractor[numIndex]-&gt;GetOutputPort());//<br>
       
vdeci[numIndex]-&gt;SetTargetReduction(0.5);//<br>
       
vdeci[numIndex]-&gt;PreserveTopologyOn();//<br>
<br>
       
vsmoother.push_back(vtkSmoothPolyDataFilter::New());<br>
        vsmoother[numIndex]-&gt;SetInputConnection(vdeci[numIndex]-&gt;GetOutputPort());//<br>
       
vsmoother[numIndex]-&gt;SetNumberOfIterations(800);//Specify the number of
iterations for Laplacian smoothing<br>
<br>
       
vskinNormal.push_back(vtkPolyDataNormals::New());<br>
        vskinNormal[numIndex]-&gt;SetInputConnection(vsmoother[numIndex]-&gt;GetOutputPort());//<br>
       
vskinNormal[numIndex]-&gt;SetFeatureAngle(60.0);//<br>
<br>
       
vskinMapper.push_back(vtkPolyDataMapper::New());<br>
       
vskinMapper[numIndex]-&gt;SetInputConnection(vskinNormal[numIndex]-&gt;GetOutputPort());<br>
       
vskinMapper[numIndex]-&gt;ScalarVisibilityOff();<br>
        <br>
        vskin.push_back(vtkActor::New());<br>
       
vskin[numIndex]-&gt;SetMapper(vskinMapper[numIndex]);   
    <br>
    }</p><p class="MsoNormal"><br></p><p class="MsoNormal"><br></p><p class="MsoNormal">Thanks !</p><p class="MsoNormal" style="">Wenwu</p><br><br><br><br><div class="gmail_quote">On Sat, Nov 14, 2009 at 6:51 PM, Dipl.-Ing. Helmut Steiner <span dir="ltr">&lt;<a href="mailto:office@shl.at">office@shl.at</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">









<div link="blue" vlink="purple" lang="DE-AT">

<div>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Hallo Wenwu!</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">In fact in my app i also use ReleaseDataFlag as Bill mentioned.
But at the end you need to do exception handling to avoid crashing your app. </span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">You can get available memory in the following way:</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">      </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">MEMORYSTATUSEX  statex1;</span></p>


<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">      statex1.dwLength = <span style="color: blue;">sizeof</span> (statex1);</span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">      GlobalMemoryStatusEx(&amp;statex1);</span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">      <span style="color: blue;">int</span> numMBfree = (<span style="color: blue;">int</span>)
statex1.ullAvailPhys/1048576;</span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">      </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: blue;">int</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> x0e, x1e, y0e, y1e, z0e,
z1e;</span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">      pParentVolume-&gt;m_pImageData-&gt;GetWholeExtent(x0e,
x1e, y0e, y1e, z0e, z1e);</span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">      <span style="color: blue;">int</span> numMBVolume
= x1e*y1e*z1e*2/1048576;</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">at this point you can decide, weather you go further on, or not</span></p><div class="im">

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">mfg</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">Helmut Steiner</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>

<div>

<div>

<div>

<div>

<div>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: black;"><img src="cid:image001.jpg@01CA6520.63AC5E40" alt="cid:image001.jpg@01C9D5CC.9F177890" height="45" width="207"></span><span style="font-size: 11pt; color: rgb(31, 73, 125);"></span></p>


<p class="MsoNormal"><span style="font-size: 8pt; font-family: &quot;Courier New&quot;; color: rgb(31, 73, 125);" lang="EN-GB">*********************************************************<br>
* SHL - Solutions for Healthcare and Life-Sciences GmbH *<br>
* Bahnstraße 58,  A-3481 Fels am Wagram,
 Österreich    *<br>
* Firmenbuch Nr.: 276073 s   
                         
*<br>
* Web:</span><span style="font-size: 8pt; font-family: &quot;Courier New&quot;; color: maroon;" lang="EN-GB">  </span><span style="font-size: 8pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB"> </span><span style="font-size: 8pt; font-family: &quot;Courier New&quot;; color: black;" lang="DE"><a href="http://www.shl.at/" title="blocked::http://www.shl.at/" target="_blank"><span lang="EN-GB">www.shl.at</span></a></span><span style="font-size: 8pt; font-family: &quot;Courier New&quot;; color: rgb(31, 73, 125);" lang="EN-GB">
                                    *<br>
* </span><span style="font-size: 8pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB">Email: </span><span style="font-size: 8pt; font-family: &quot;Courier New&quot;; color: black;" lang="DE"><a href="mailto:office@shl.at" title="blocked::mailto:office@shl.at" target="_blank"><span lang="EN-GB">office@shl.at</span></a></span><span style="font-size: 8pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB">           
                      *<br>
*********************************************************</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB"><br>
</span><span style="font-size: 8pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB">* DISCLAIMER                                           
*<br>
* This eMail may contain confidential and/or            *<br>
* privileged information. If you are not the            *<br>
* intended recipient (or have received this eMail       *<br>
* in error) please notify the sender immediately        *<br>
* and destroy this eMail. Any
unauthorised              *<br>
* copying, disclosure or distribution of the            *<br>
* material in this eMail is strictly forbidden.         </span><span style="font-size: 8pt; font-family: &quot;Courier New&quot;; color: black;" lang="DE">*<br>
*********************************************************</span><span style="color: black;" lang="DE"></span></p>

</div>

</div>

</div>

</div>

</div>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

</div><div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0cm 0cm;">

<p class="MsoNormal"><b><span style="font-size: 10pt;" lang="DE">Von:</span></b><span style="font-size: 10pt;" lang="DE"> </span><span style="font-size: 10pt;">朱文武</span><span style="font-size: 10pt;" lang="DE">
[mailto:<a href="mailto:cool.wenwu@gmail.com" target="_blank">cool.wenwu@gmail.com</a>] <br>
<b>Gesendet:</b> Samstag, 14. November 2009 09:25<br>
<b>An:</b> Dipl.-Ing. Helmut Steiner; <a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a><br>
<b>Betreff:</b> Re: [vtkusers] memory allocate problem of multi-iso
reconstruction(large data)</span></p>

</div><div><div></div><div class="h5">

<p class="MsoNormal"> </p>

<p class="MsoNormal" style="margin-bottom: 12pt;">Hello Steiner <span style="font-family: &quot;MS Gothic&quot;;">,</span>thank you  very much at first<span style="font-family: &quot;MS Gothic&quot;;">!</span> If my undestanding is right<span style="font-family: &quot;MS Gothic&quot;;">,</span>your code may be very suitable to catch
exception! I will learn it !<br>
However, the key problem of my app  may not the bug, but how to manage
memory more efficiently !<br>
<br>
<br>
</p>

</div></div><div><div><div></div><div class="h5">

<p class="MsoNormal">2009/11/14 Dipl.-Ing. Helmut Steiner &lt;<a href="mailto:office@shl.at" target="_blank">office@shl.at</a>&gt;</p>

</div></div><div>

<div><div><div></div><div class="h5">

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Hello user cool.wenwu!</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">You are low on memory, try to
encapsulate vtk calls with try catch blocks.</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">Something like this:</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">     
CDlgBAPMessageWarn dlgwarn;</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">     
<span style="color: blue;">try</span> </span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">     
</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">{</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">           
m_p3DRSurfExtractor-&gt;SetInput(pexVoi-&gt;GetOutput());</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">           
<span style="color: green;">//m_p3DRSurfExtractor-&gt;GenerateValues(2,
contourRange);</span></span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">           
m_p3DRSurfExtractor-&gt;SetValue(0,(<span style="color: blue;">double</span>)
surfpegel);</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">           
<span style="color: green;">//m_p3DRSurfExtractor-&gt;SetValue(0, dval-0.5);</span></span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">           
m_p3DRSurfExtractor-&gt;ComputeScalarsOff();</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">           
m_p3DRSurfExtractor-&gt;ComputeNormalsOn();</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">           
VtkObserverProgressContour *contourProgress =
VtkObserverProgressContour::New(pParentVolume-&gt;m_p3DRStatusText-&gt;GetTextMapper(),
pParentVolume-&gt;m_p3DRIren, <span style="color: rgb(163, 21, 21);">&quot;Contour
Progress&quot;</span>);</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">           
m_p3DRSurfExtractor-&gt;AddObserver(vtkCommand::ProgressEvent,
contourProgress);</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">           
contourProgress-&gt;Delete();</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">           
m_p3DRSurfExtractor-&gt;Update();</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">     
}</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">     
<span style="color: blue;">catch</span> (std::exception <span style="color: blue;">const</span>
&amp;err)</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">     
{</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">           
dlgwarn.mstrHeader = CConstTxt::BAP_MSG_HEAD_054 [theApp.iLanguage];</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">           
dlgwarn.mstrLine1  = CConstTxt::BAP_MSG_LIN1_054 [theApp.iLanguage];</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">           
dlgwarn.mstrLine2  = CConstTxt::BAP_MSG_LIN2_054 [theApp.iLanguage];</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">           
dlgwarn.DoModal();</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">           
pexVoi-&gt;Delete();</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">           
<span style="color: blue;">return</span> <span style="color: blue;">false</span>;</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">     
}</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">     
<span style="color: blue;">catch</span> (...)</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">     
{</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">           
dlgwarn.mstrHeader = CConstTxt::BAP_MSG_HEAD_054 [theApp.iLanguage];</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">           
dlgwarn.mstrLine1  = CConstTxt::BAP_MSG_LIN1_054 [theApp.iLanguage];</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">           
dlgwarn.mstrLine2  = CConstTxt::BAP_MSG_LIN2_054 [theApp.iLanguage];</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">           
dlgwarn.DoModal();</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">           
pexVoi-&gt;Delete();</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">           
<span style="color: blue;">return</span> <span style="color: blue;">false</span>;</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-US">     
</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">}</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">     
pexVoi-&gt;Delete();</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">Mfg</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">Helmut Steiner</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>

</div></div><div>

<div>

<div>

<div>

<div>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>

<p class="MsoNormal"><b><span style="font-size: 11pt; color: black;" lang="DE">Fehler! Es wurde kein Dateiname
angegeben.</span></b></p><div><div></div><div class="h5">

<p class="MsoNormal"><span style="font-size: 8pt; font-family: &quot;Courier New&quot;; color: rgb(31, 73, 125);" lang="EN-GB">*********************************************************<br>
* SHL - Solutions for Healthcare and Life-Sciences GmbH *<br>
* Bahnstraße 58,  A-3481 Fels am Wagram,
 Österreich    *<br>
* Firmenbuch Nr.: 276073 s   
                         
*<br>
* Web:</span><span style="font-size: 8pt; font-family: &quot;Courier New&quot;; color: maroon;" lang="EN-GB">  </span><span style="font-size: 8pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB"> </span><span style="font-size: 8pt; font-family: &quot;Courier New&quot;; color: black;" lang="DE"><a href="http://www.shl.at/" title="blocked::http://www.shl.at/" target="_blank"><span lang="EN-GB">www.shl.at</span></a></span><span style="font-size: 8pt; font-family: &quot;Courier New&quot;; color: rgb(31, 73, 125);" lang="EN-GB">
                                    *<br>
* </span><span style="font-size: 8pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB">Email: </span><span style="font-size: 8pt; font-family: &quot;Courier New&quot;; color: black;" lang="DE"><a href="mailto:office@shl.at" title="blocked::mailto:office@shl.at" target="_blank"><span lang="EN-GB">office@shl.at</span></a></span><span style="font-size: 8pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB">           
                      *<br>
*********************************************************</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB"><br>
</span><span style="font-size: 8pt; font-family: &quot;Courier New&quot;; color: black;" lang="EN-GB">* DISCLAIMER                                           
*<br>
* This eMail may contain confidential
and/or            *<br>
* privileged information. If you are not
the            *<br>
* intended recipient (or have received this
eMail       *<br>
* in error) please notify the sender
immediately        *<br>
* and destroy this eMail. Any
unauthorised             
*<br>
* copying, disclosure or distribution of
the            *<br>
* material in this eMail is strictly
forbidden.         </span><span style="font-size: 8pt; font-family: &quot;Courier New&quot;; color: black;" lang="DE">*<br>
*********************************************************</span></p>

</div></div></div>

</div>

</div>

</div>

</div><div><div></div><div class="h5">

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<div style="border-style: solid none none; border-color: -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0cm 0cm;">

<p class="MsoNormal"><b><span style="font-size: 10pt;" lang="DE">Von:</span></b><span style="font-size: 10pt;" lang="DE"> <a href="mailto:vtkusers-bounces@vtk.org" target="_blank">vtkusers-bounces@vtk.org</a>
[mailto:<a href="mailto:vtkusers-bounces@vtk.org" target="_blank">vtkusers-bounces@vtk.org</a>]
<b>Im Auftrag von </b>???<br>
<b>Gesendet:</b> Freitag, 13. November 2009 16:00<br>
<b>An:</b> <a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a><br>
<b>Betreff:</b> [vtkusers] memory allocate problem of multi-iso
reconstruction(large data)</span></p>

</div>

<div>

<div>

<p class="MsoNormal"> </p>

<p class="MsoNormal">Hello
all  in mailing list,<br>
<br>
The develop tool of  my application are VC6.0 + vtk5.1. And I&#39;d 
appreciate any advice to help me to soleve the problem.<br>
<br>
The state of mine is that when i use MC to reconstruct , and select one single
contour value,  the number of image is 200(bmp: 329*354). of coucse , the
app is sucessfully executing!<br>
However, i&#39;d like to reconstuct multi-isosurface. In addition, i hope the app
can control property of each isosurface(vtkactor*). So I use multi-pipeline to
reconstruct,each actor has private pipeline, but the result is error when there
are many contour values ,for example the number of contour values is 4 , the
main code and relevant information as follows:<br>
<br>
// the data set is bmp: 329*354*350<br>
<br>
    std::vector&lt;vtkMarchingCubes*&gt; vskinExtractor;<br>
    std::vector&lt;vtkDecimatePro*&gt; vdeci;//<br>
    std::vector&lt;vtkSmoothPolyDataFilter*&gt; vsmoother;//<br>
    std::vector&lt;vtkPolyDataNormals*&gt; vskinNormal;//<br>
    std::vector&lt;vtkPolyDataMapper*&gt; vskinMapper;//<br>
    std::vector&lt;vtkActor*&gt; vskin;<br>
    <br>
//y is the number of the scalar value, here is 4<br>
    for (size_t numIndex = 0; numIndex &lt; y; numIndex++)<br>
    {<br>
        vskinExtractor.push_back(vtkMarchingCubes::New());<br>
       
vskinExtractor[numIndex]-&gt;SetInputConnection(m_read-&gt;GetOutputPort());<br>
       
vskinExtractor[numIndex]-&gt;SetValue(numIndex, vYuzhi[numIndex]);<br>
<br>
        vdeci.push_back(vtkDecimatePro::New());<br>
        vdeci[numIndex]-&gt;SetInputConnection(vskinExtractor[numIndex]-&gt;GetOutputPort());//<br>
       
vdeci[numIndex]-&gt;SetTargetReduction(0.5);//<br>
       
vdeci[numIndex]-&gt;PreserveTopologyOn();//<br>
<br>
       
vsmoother.push_back(vtkSmoothPolyDataFilter::New());<br>
        vsmoother[numIndex]-&gt;SetInputConnection(vdeci[numIndex]-&gt;GetOutputPort());//<br>
       
vsmoother[numIndex]-&gt;SetNumberOfIterations(800);//Specify the number of
iterations for Laplacian smoothing<br>
<br>
       
vskinNormal.push_back(vtkPolyDataNormals::New());<br>
        vskinNormal[numIndex]-&gt;SetInputConnection(vsmoother[numIndex]-&gt;GetOutputPort());//<br>
       
vskinNormal[numIndex]-&gt;SetFeatureAngle(60.0);//<br>
<br>
       
vskinMapper.push_back(vtkPolyDataMapper::New());<br>
       
vskinMapper[numIndex]-&gt;SetInputConnection(vskinNormal[numIndex]-&gt;GetOutputPort());<br>
       
vskinMapper[numIndex]-&gt;ScalarVisibilityOff();<br>
        <br>
        vskin.push_back(vtkActor::New());<br>
       
vskin[numIndex]-&gt;SetMapper(vskinMapper[numIndex]);   
    <br>
    }<br>
<br>
<br>
After the app  executing  dozens of minutes, the vtkOutputWindow
output error messages:<br>
Error:in c:\vtk5.0\vtk\common\vtkDataArrayTemplate.cxx line 255<br>
vtkIdTypeArray(0x...):unable to allocate 62300005 elements of size 2<br>
<br>
In my opinion,may be the reason  is that  data is too large or there
are generating too many meshes while MC   extracting isosurface, but
i do not know how to solve it!<br>
I alse lookup information in &quot;VTK FAQ&quot; in KitWare web, and the
solution can&#39;t fit my problem. Thanks for any help!!<br clear="all">
</p>

</div>

</div>

</div></div></div>

</div>

</div>

<p class="MsoNormal"><br>
<br clear="all">
<br>
-- <br>
<span style="font-family: &quot;MS Gothic&quot;;">祝</span><br>
<span style="font-family: &quot;MS Gothic&quot;;">工作愉快,身体健康!</span></p>

</div>

</div>


</blockquote></div><br><br clear="all"><br>-- <br>祝<br>工作愉快,身体健康!<br>