[vtkusers] writing image region to a file

Kevin H. Hobbs hobbsk at ohiou.edu
Fri Oct 20 11:14:45 EDT 2006


On Fri, 2006-10-20 at 08:42 +0100, Anja Ende wrote:
> Hi everyone,
> 
> I asked this question a while back and did not get any input. I want
> to write extract part of the image and write it back out. 
> 
> So, what I have are a number of points and I am running a simple
> bezier cubic curve through the them. The curve loops back to itself,
> so it is always a closed curve. What I would like to do is export the
> surface under the curve and I guess the rest of the pixels can just be
> exported with values 0. So, I guess the problem essentially gets
> reduced to taking all the points on the curve and all the points in
> the image and seeing if the image point lies on or inside the curve
> and then export the pixel into the resulting exported image. 

The attached does something similar. The polydata need to be 3D though.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: RemoveObject.cxx
Type: text/x-c++src
Size: 2513 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20061020/0e34db01/attachment.cxx>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20061020/0e34db01/attachment.pgp>


More information about the vtkusers mailing list