[vtkusers] using vtkImageBlend to combine two gray image
    贾鹏飞 
    pengfeijia11 at sjtu.edu.cn
       
    Wed Nov 15 06:17:11 EST 2017
    
    
  
Hi All:
  I have two gray images (vtkimagedata version),  they have the same size. I want to combine them together using vtkimageblend.
1st: the following are some codes:
 vtkSmartPointer<vtkImageBlend> imgBlender = vtkSmartPointer<vtkImageBlend>::New();
 imgBlender->SetOpacity( 0, 0.5);
 imgBlender->SetOpacity( 1, 0.5);
 imgBlender->AddInput(AP);
 imgBlender->AddInput( APdrr );
It seems that the result is wrong! the second is in the window, while the first seems not in the proper position, only part of it.
2nd:Then I adjust the opacity 
vtkSmartPointer<vtkImageBlend> imgBlender = vtkSmartPointer<vtkImageBlend>::New();
 imgBlender->SetOpacity( 0, 1);
 imgBlender->SetOpacity( 1, 1);
 imgBlender->AddInput(AP);
 imgBlender->AddInput( APdrr );
then the result only shows the second image, there is not the first image!
can someone give me some suggestions, thanks in advance!
    
    
More information about the vtkusers
mailing list