[vtkusers] RagRugFilter

Martin Sälzle martin.saelzle at mytum.de
Thu Nov 12 10:51:37 EST 2009


Hi,

I have written a filter that colors a surface with scalars that have  
less values than the number of points of the surface. I have searched  
for a filter that can do that but didn't find anything in vtk. I have  
attached the code. I also did change vtkMaskPoints a little for my  
purpose.
If you comment out the big while loop it's the same like if you only  
add the scalars to the known ids.

The idea is to let each known pixle grow until it hits another pixel  
with a value.
Because I don't interpolate it looks like a rag rug but in favour it's  
quite fast.
Since this is the first filter that I wrote for vtk, I have some  
questions:
Is there any possibility to use the vtk lists and arrays with iterators?
Did I make some beginner mistakes?
Does the IdListCollection delete also it's children or do I have to do  
that myself? Are there any memory leaks in the code?
How can I add an observer so I can watch how the filter performs?

thanks,
Martin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: CMaskPoints.h
Type: application/octet-stream
Size: 4186 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091112/1f7e3be6/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.cpp
Type: application/octet-stream
Size: 2446 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091112/1f7e3be6/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CRagRugFilter.h
Type: application/octet-stream
Size: 971 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091112/1f7e3be6/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CRagRugFilter.cpp
Type: application/octet-stream
Size: 5450 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091112/1f7e3be6/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CMaskPoints.cpp
Type: application/octet-stream
Size: 6962 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091112/1f7e3be6/attachment-0004.obj>


More information about the vtkusers mailing list