Hi everyone,<br>I have some problem. I would like to save *.mhd file from <span><span class="highlight"><span style="font-family: courier new,monospace;">QVTKWidget</span> component. I tried to seach on google, but any solution. <br>
<br><span style="font-family: courier new,monospace;"> qVTK3->setAutomaticImageCacheEnabled(true);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> vtkSmartPointer<vtkMetaImageWriter> writer = vtkSmartPointer<vtkMetaImageWriter>::New();</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> qVTK3->saveImageToCache();</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> writer->SetInput(qVTK3->cachedImage());</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> writer->SetFileName(fileName);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> std::string str = fileName + ".raw";</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> writer->SetRAWFileName(str.c_str());</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> writer->Write();<br>
<font face="arial,helvetica,sans-serif"><br><span style="font-family: courier new,monospace;">qVTK3</span> is </font></span></span></span><span><span class="highlight"><span style="font-family: courier new,monospace;">QVTKWidget</span></span></span><span><span class="highlight"><span style="font-family: courier new,monospace;"><font face="arial,helvetica,sans-serif">.<br>
<br>This code save empty files... <br>I have to recomend, that I loaded *.mha or *.mhd files.<br>I will be very happy for each help...<br>Thanks a lot<br></font></span></span></span>