Hi everybody,<br><br>In fact, I need to save a thresholded data in PNG files. For example, the threshold data is given below, and I need to store this data into PNG files and to be able to reconstruct the Vol data only thanks to these PNG files. I have noticed that vtkPNGWriter is able to write 3D images but I don&#39;t have a set of PNG files when I tried it. Moreover, the image I get is a black PNG file.<br>
&nbsp;Do you have an idea ?<br>The other goal is to use PNG files from another application and to be able to reconstruct the overall data and to render it. I suppose that the use of vtkPNGreader allows this ?<br><br>Thanks<br>
<br>Matthieu<br><br>(avec vtkImageVOLReader* Vol = vtkImageVOLReader::New();)<br><br>vtkImageThreshold *mon_tre = vtkImageThreshold::New();<br>&nbsp;&nbsp;&nbsp; mon_tre-&gt;SetInput(Vol-&gt;GetOutput());<br>&nbsp;&nbsp;&nbsp; mon_tre-&gt;ThresholdByUpper(1300);<br>
&nbsp;&nbsp;&nbsp; mon_tre-&gt;SetInValue(0);<br>&nbsp;&nbsp;&nbsp; mon_tre-&gt;SetOutValue(255);<br>&nbsp;&nbsp;&nbsp; //mon_tre-&gt;ReplaceOutOff();<br>&nbsp;&nbsp;&nbsp; //mon_tre-&gt;ReplaceInOn();<br>&nbsp;&nbsp;&nbsp; mon_tre-&gt;Update();<br><br>vtkPNGWriter *writer=vtkPNGWriter::New();<br>
&nbsp;&nbsp;&nbsp; //w2i-&gt;SetInput(renWin);<br>&nbsp;&nbsp;&nbsp; writer-&gt;SetInput(mon_tre-&gt;GetOutput());<br>&nbsp;&nbsp;&nbsp; char *wfname=(char *)malloc(sizeof(char)*25);<br>&nbsp;&nbsp;&nbsp; sprintf(wfname,&quot;koursky2.png&quot;);<br><br>&nbsp;&nbsp;&nbsp; writer-&gt;SetFileName(wfname);<br>
&nbsp;&nbsp;&nbsp; //renWin-&gt;Render();<br>&nbsp;&nbsp;&nbsp; //w2i-&gt;Update();<br>&nbsp;&nbsp;&nbsp; writer-&gt;Write();<br>