<div dir="ltr">Hi David, <br><br>Thanks for the direction. The documentation does not make it very clear to me. Could you please point/cook me a little example for accessing pixel values of vtkImageStencilData using the method you suggested? If I am able to do it, I'll post it out.<br>
<br><br>Prathamesh<br><br><div class="gmail_quote">On Tue, Jul 20, 2010 at 6:34 PM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi Prathamesh,<br>
<br>
You can use the following method of vtkImageStencilData to do the iteration:<br>
<br>
int vtkImageStencilData::GetNextExtent(int &r1, int &r2, int xMin,<br>
int xMax, int yIdx, int zIdx, int &iter);<br>
<br>
The documentation describes what each of the parameters is for. I<br>
started work on a proper iterator for vtkImageStencilData many, many<br>
years ago but never found time to finish it.<br>
<font color="#888888"><br>
David<br>
</font><div><div></div><div class="h5"><br>
<br>
On Tue, Jul 20, 2010 at 5:00 PM, Prathamesh Kulkarni<br>
<<a href="mailto:prathameshmkulkarni@gmail.com">prathameshmkulkarni@gmail.com</a>> wrote:<br>
> Hello all,<br>
><br>
> I want to be able to write vtkImageStencilData to text files in a CSV format<br>
> in order to be analyzed in some other software.<br>
><br>
> I could not find a way to iterate through vtkImageStencilData similar to<br>
> vtkImageData.<br>
><br>
> One idea is to convert the vtkImageStencilData to vtkImageData and then use<br>
> vtkImageIterator. However, I do not know how to perform this conversion.<br>
><br>
> Has anyone tried this before? How?<br>
><br>
> Thanks,<br>
> Prathamesh<br>
><br>
</div></div><div><div></div><div class="h5">> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the VTK FAQ at:<br>
> <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
><br>
><br>
</div></div></blockquote></div><br></div>