[vtkusers] vtk image iterator

Bill Lorensen bill.lorensen at gmail.com
Thu Oct 16 12:48:26 EDT 2014


I have fixed the bad image iterator example on the wiki. You can find it here:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/ImageData/ImageIterator

Bill

On Thu, Oct 16, 2014 at 10:31 AM, Jorge Perez <josp.jorge at gmail.com> wrote:
> Hi Zein, attached is the example I have modified (there are some errors in
> the wiki example). In TestImageInterpolator.cxx you can see that there are 2
> loops one for spans and the inner along the span. If you execute the example
> you should obtain the following output. In this sample image there two
> slices with size 4x3.
>
> val: 0 0 0 0
> val: 0 0 0 0
> val: 0 0 0 0
> val: 1 1 1 1
> val: 1 1 1 1
> val: 1 1 1 1
>
> best regards,
>
>
> Jorge
>
>
> 2014-10-16 13:07 GMT+02:00 Zein Salah <zeinsalah at gmail.com>:
>>
>> well Jorge,
>>
>> this is actually what I am trying to understand.
>>
>> it seems the example works for 2d images. since I am using a similar code
>> and it does not iterate in the third dimension,
>>
>> are spans meat to be slices?
>>
>> On Thu, Oct 16, 2014 at 12:23 PM, Jorge Perez <josp.jorge at gmail.com>
>> wrote:
>>>
>>> Hi, you can see how it is used in this example
>>>
>>>
>>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Broken/ImageData/vtkImageIterator
>>>
>>> regards,
>>>
>>> Jorge
>>>
>>> 2014-10-16 12:18 GMT+02:00 Zein Salah <zeinsalah at gmail.com>:
>>>>
>>>> Hi,
>>>>
>>>> I have an understanding problem, I think I am missing something.
>>>> what is a span iterator within the vtk image iterator? what is it needed
>>>> for?
>>>> I need to only iterate over an extent in the image and access data
>>>> values
>>>> within it. How should I move the iterator to the next position? how to
>>>> access
>>>> the underlying data?
>>>>
>>>> thx
>>>>
>>>>
>>>> _______________________________________________
>>>> Powered by www.kitware.com
>>>>
>>>> Visit other Kitware open-source projects at
>>>> http://www.kitware.com/opensource/opensource.html
>>>>
>>>> Please keep messages on-topic and check the VTK FAQ at:
>>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>>
>>>> Follow this link to subscribe/unsubscribe:
>>>> http://public.kitware.com/mailman/listinfo/vtkusers
>>>>
>>>
>>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>



-- 
Unpaid intern in BillsBasement at noware dot com


More information about the vtkusers mailing list