[vtkusers] Cut/Paste region of vtkImageData defined by a contour

Najzero adrian.gabriel at 4plus.de
Wed Sep 17 14:01:37 EDT 2014

Hi David,

since you answered on a lot ImageStancil questions and wrote the Lassoo one
yourself ( i believe ) I was hoping from a word from you.

David Gobbi wrote
> Why not?  It was never removed from VTK.  E.g. in VTK 6:
> VTK/Imaging/Stencil/vtkLassoStencilSource.h
> Or do you mean that you're planning to stick with VTK 5.6?

Well, yes I am stuck at VTK 5.6 most likely ( thats why I started to patch
some files by hand ) as the whole project used own classes for... everything
( rendermanager, windowmanger, widget... ).
If any api changed ( and they did... like the good old SetInput() in some
cases ) I will fall neck deep into [censored].

I already had the Origin/Spacing/Extend inside my code and took them from
the vktImageData ( hoping it was correct ).
As you said, vtkPolyDataToImageStencil will not work for me as I dont have a
closed surfce ( damn it, I thought so, as it got improved alot with later
versions where I used it once ).. so I am afraid I have to ask.

Can I form one closed surface by myself?
vtkDelauny(3d?) and vtkSurfaceReconstructionFilter comming to mind - the old
programmer was so nice to ensure some things about the "self genius
programmed contour".

It has to have at least 3 points and the points are drawn "in a kind of
( by mouse movement if mouse 1 is pressed down or by single clicks at the
current location ) and he even coded the logic to draw lines between the
points and the "closing line" between point 1 and point n.

As it is only 2d ( one coordinate always gets zero'ed ), the triangulation
could work?

View this message in context: http://vtk.1045678.n5.nabble.com/Cut-Paste-region-of-vtkImageData-defined-by-a-contour-tp5728767p5728779.html
Sent from the VTK - Users mailing list archive at Nabble.com.

More information about the vtkusers mailing list