[vtkusers] vtkImageData - Boolean Operations
    Lassi Paavolainen 
    lopaavol at jyu.fi
       
    Sun Jan 18 07:43:01 EST 2009
    
    
  
Hi Paul,
On Sat, 17 Jan 2009, Paul Jhin wrote:
> I have more 2 questions,
> 
> It is possible vtkImageLogic provide the level of output in gray ?  the code
> below appears only in binary.
> 
>         boolean = vtk.vtkImageLogic()
>         boolean.SetInput1(img1.GetOutput())
>         boolean.SetInput2(img2.GetOutput())
>         boolean.SetOperationToAnd()
If I understood your question correctly, you want to get only those pixels 
of original data that pass that logic operation? You can use vtkImageMask 
for that:
mask = vtk.vtkImageMask()
mask.SetImageInput(origData)
mask.SetMaskInput(boolean.GetOutput())
image = mask.GetOutput()
image.Update()
> My second question, you can perform boolean between vtkPolyData?
Unfortunately I don't know an answer for that question. Hopefully someone 
else can help you.
> Regards and excuse for excessive questions,
> Paul Jhin
Don't mind about it. I'm happy if my answers gave you any help.
Regards,
Lassi
> 2009/1/17 Lassi Paavolainen <lopaavol at jyu.fi>
> 
> > Hi,
> >
> > On Sat, 17 Jan 2009, Paul Jhin wrote:
> >
> > > Hi,
> > >
> > > There is a class that you can perform Boolean operations between
> > > vtkImageData ?
> >
> > You can use vtkImageLogic to do that.
> >
> > Lassi
> >
> 
    
    
More information about the vtkusers
mailing list