[vtkusers] Traversing through Image with x,y,z coordinates

Christian Werner christian.werner at rwth-aachen.de
Fri Mar 19 19:33:02 EDT 2010


Hi David!

Here is a complete working copy with everything you need. Unpack it in a 
seperate directory. Run cmake && make then start the program with the 
labelMe.bmp as argument which is also included. The result will be 
called result.bmp.

The result looks different from my first posting though, that was the 
ParaView output. Still something goes wrong, the image seems to be split 
in to halfes, an upper and a lower which both contain the input image 
squeezed.


Best regards,
Christian



David Doria wrote:
> On Fri, Mar 19, 2010 at 3:58 PM, Christian Werner
> <christian.werner at rwth-aachen.de> wrote:
>   
>> Hello!
>>
>> I am about to build a nice BinaryRemoveRegions filter that will scrap away
>> groups of pixels that are below/above a certain size. I took the vtkMedian
>> Filter as a template and cropped it down to the most basic code which
>> traverses through the image in X-Y-Z order. There I wanted to check if
>> everything goes fine by simple copying the input image to the output image.
>> Unfortunately, the pointers to the InData are corrupt. You can see the
>> result of the copying attached.
>>
>> It is pretty sure that the inData pointers are corrupt, and not the outData
>> pointers since I managed to draw pixels every Xth row/column with correct
>> results. I have attached the code.
>>
>> Could somebody give me a hint of what is causing this malfunction? Note that
>> the actual x/y/z coordinates are crucial for my algorithm, because I have to
>> check for neighboring pixels in all directions.
>>
>>
>> Best regards,
>> Christian
>>     
>
> Can you attach the header file and the test/example code?
>
> Thanks,
>
> David
>   

-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtkFilterTest.tar.gz
Type: application/gzip
Size: 19979 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100320/46a6a213/attachment.bin>


More information about the vtkusers mailing list