Hi. <div><br></div><div>I`m trying to save a 3-D vtkImageData to a .mhd and .raw file with a vtkMetaImageWriter </div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div>vtkSmartPointer&lt;vtkMetaImageWriter&gt; writer = vtkSmartPointer&lt;vtkMetaImageWriter&gt;::New();</div>
<div>writer-&gt;SetFileName(saveMhdFile);</div></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div>writer-&gt;SetRAWFileName(saveRawFile);</div></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div><div>writer-&gt;SetInputConnection(volumeData-&gt;GetProducerPort());</div></div><div>writer-&gt;Write()</div></blockquote><div><br></div><div>When I save a volume of size 603x548x394 I am able to save the file without problem.</div>
<div><br></div><div>But when I try to save a bigger volume of size 584x999x494 I get an exception. After using try/catch in the Write() method</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><br>
</div><div>try{</div></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div>writer-&gt;Write();</div></div></blockquote></blockquote>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><span class="Apple-tab-span" style="white-space:pre">        </span></div>}catch( exception&amp; e){</div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div><div><span class="Apple-tab-span" style="white-space:pre">                </span></div></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div>std::cout&lt;&lt;e.what()&lt;&lt;std::endl;</div></blockquote></blockquote><div><div><span class="Apple-tab-span" style="white-space:pre">        </span>}</div></div><div><div><br></div><div>I receive &quot;Bad allocation&quot; message.</div>
<div><br></div><div>What does this mean? How can I fix this problem?</div><div><br></div><div>Thanks</div>-- <br>Fabián Torres Robles<br>Maestria en Ciencias en Ingeniería Electrónica<br>Ingeniería en Sistemas Electrónicos<br>
tel. 58081280, 0445534661338<br>e-mail <a href="mailto:fabian.trobles@gmail.com" target="_blank">fabian.trobles@gmail.com</a>, <a href="mailto:dae.wong@gmail.com" target="_blank">dae.wong@gmail.com</a>  <div style="padding:0px;margin-left:0px;margin-top:0px;overflow:hidden;word-wrap:break-word;color:black;font-size:10px;text-align:left;line-height:130%">
</div><div style="padding:0px;margin-left:0px;margin-top:0px;overflow:hidden;word-wrap:break-word;color:black;font-size:10px;text-align:left;line-height:130%"></div><br>
</div>