<div dir="ltr">Thank you.<div><br></div><div>I investigated a lot these days and played with different things. I read the Software guide for ITK 4.7 and found interesting things and I will leave them here and also give the solution to my problem but in 2D.</div><div><br></div><div>Firstly I thought of making the sphere discretization myself and use a simple ImageIterator as in section 4.1 in the software guide.</div><div><br></div><div>Then I got to the spatial objects and I had fun tweaking around with EllipseSpatialObject and GaussianSpatialObjects and learned how to save them to an image. SpatialObjects have a pretty neat feature that lets you calculate simple statistics inside it using SpatialObjectToImageStatisticsCalculator.</div><div><br></div><div>The code that helped me the most is here <a href="http://www.itk.org/Wiki/ITK/Examples/Iterators/ShapedNeighborhoodIterator">http://www.itk.org/Wiki/ITK/Examples/Iterators/ShapedNeighborhoodIterator</a></div><div><br></div><div>I uploaded code I've been playing with here: <a href="https://github.com/zloysmiertniy/itk-arena/blob/master/GaussianToImage.cxx">https://github.com/zloysmiertniy/itk-arena/blob/master/GaussianToImage.cxx</a>  <a href="https://github.com/zloysmiertniy/itk-arena/blob/master/ShapedNeighborhoodIterator.cxx">https://github.com/zloysmiertniy/itk-arena/blob/master/ShapedNeighborhoodIterator.cxx</a></div><div><br></div><div>Finally I guess I will be using ShapedNeighborhoodIterator and change its location everytime, calculate, and set the value in the output image. Thankyou very much Matt and Bill for the links.</div><div><br></div><div>Leslie</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-03-30 19:59 GMT+02:00 Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">These examples may help:<br>
<a href="http://itk.org/Wiki/ITK/Examples/Iterators/ShapedNeighborhoodIterator" target="_blank">http://itk.org/Wiki/ITK/Examples/Iterators/ShapedNeighborhoodIterator</a><br>
<a href="http://itk.org/Wiki/ITK/Examples/Iterators/ShapedNeighborhoodIteratorManual" target="_blank">http://itk.org/Wiki/ITK/Examples/Iterators/ShapedNeighborhoodIteratorManual</a><br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On Mon, Mar 30, 2015 at 6:58 AM, Matt McCormick<br>
<<a href="mailto:matt.mccormick@kitware.com">matt.mccormick@kitware.com</a>> wrote:<br>
> Hi Leslie,<br>
><br>
> The ShapedNeighborhoodIterator allows activations of a box of voxels<br>
> within a given radii.<br>
><br>
> For your operation, you may want to investigate the<br>
> NeighborhoodOperator and related classes [1].<br>
><br>
> More information on how to use neighborhood classes can be found in<br>
> the ITK Software Guide (see <a href="http://itk.org" target="_blank">itk.org</a> for links to both the electronic<br>
> and hard copy versions).<br>
><br>
> Hope this helps,<br>
> Matt<br>
><br>
><br>
> [1] <a href="http://www.itk.org/Doxygen/html/classitk_1_1NeighborhoodOperator.html" target="_blank">http://www.itk.org/Doxygen/html/classitk_1_1NeighborhoodOperator.html</a><br>
><br>
> On Mon, Mar 30, 2015 at 9:15 AM, Leslie Solorzano<br>
> <<a href="mailto:lesolorzanov@gmail.com">lesolorzanov@gmail.com</a>> wrote:<br>
>> I am aware of the existance of ShapedNeighborhoodIterator. But I don't<br>
>> understand how to use it.<br>
>> I have a 3D image and I would like to iterate trought it and calculate a<br>
>> value according to a guassian sphere centered at each voxel.<br>
>><br>
>> I don't understand if the shaped iterator makes a box with given radii (or<br>
>> offsets), or it makes an ellipse with given offsets.<br>
>><br>
>> My sphere is very small, a 4 voxel raidus (7 maximum), and I'd like the<br>
>> values farthest from the center weight less in my sum, thus the gaussian.<br>
>><br>
>> So it is pretty simple, make a shapedneighborhooditerator to be a sphere,<br>
>> iterate and keep each value as the weighted sum of the values in its<br>
>> neighbors in a 3D image, can some point me in the right direction?<br>
>><br>
>> Thankyou<br>
>><br>
>> _______________________________________________<br>
>> Community mailing list<br>
>> <a href="mailto:Community@itk.org">Community@itk.org</a><br>
>> <a href="http://public.kitware.com/mailman/listinfo/community" target="_blank">http://public.kitware.com/mailman/listinfo/community</a><br>
>><br>
> _______________________________________________<br>
> Community mailing list<br>
> <a href="mailto:Community@itk.org">Community@itk.org</a><br>
> <a href="http://public.kitware.com/mailman/listinfo/community" target="_blank">http://public.kitware.com/mailman/listinfo/community</a><br>
<br>
<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Unpaid intern in BillsBasement at noware dot com<br>
</font></span></blockquote></div><br></div>