<div dir="ltr">Hi Mike,<div><br></div><div>There is no way to change this behavior for vtkImageBlend.  One solution is to use a dummy image as input 0 (same dimensions as your first image, but with RGBA set to 0,0,0,1 for all pixels), and then add your two images as inputs 1 and 2.</div><div><br></div><div> - David <br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 19, 2017 at 10:49 AM, Mike Withascarf via vtkusers <span dir="ltr"><<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="color:#000;background-color:#fff;font-family:Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:13px"><div id="m_8147260923843896409m_-2192334854636949855yui_3_16_0_ym19_1_1500482535878_3653" dir="ltr">Hi, I'm using vtkImageBlend to blend two vtkImageMapToColors. Right now if I change the opacity map of the first vtkImageMapToColors (via lookup table), it adjusts the entire alpha of the output (so for example hiding the first one hides both of them). Is there a way to prevent vtkImageBlend from assigning the opacity of the first element to the output? I've tried using the "compound" blending mode in case that would help, but the screen is blank then. Any help would be great!</div><div id="m_8147260923843896409m_-2192334854636949855yui_3_16_0_ym19_1_1500482535878_3653" dir="ltr"><br></div><div id="m_8147260923843896409m_-2192334854636949855yui_3_16_0_ym19_1_1500482535878_3653" dir="ltr">This is a simplified version of the code I'm using:</div><div id="m_8147260923843896409m_-2192334854636949855yui_3_16_0_ym19_1_1500482535878_3653" dir="ltr"><br></div><div dir="ltr" id="m_8147260923843896409m_-2192334854636949855yui_3_16_0_ym19_1_1500482535878_3856">vtkSmartPointer<vtkImageMapToC<wbr>olors> imapper1 = vtkSmartPointer<vtkImageMapToC<wbr>olors>::New();</div><div dir="ltr" id="m_8147260923843896409m_-2192334854636949855yui_3_16_0_ym19_1_1500482535878_3857">imapper1->SetLookupTable(lut1)<wbr>;</div><div dir="ltr" id="m_8147260923843896409m_-2192334854636949855yui_3_16_0_ym19_1_1500482535878_3858">imapper1->PassAlphaToOutputOn(<wbr>);</div><div dir="ltr" id="m_8147260923843896409m_-2192334854636949855yui_3_16_0_ym19_1_1500482535878_3859">imapper1->SetInputData(image1)<wbr>;</div><div dir="ltr" id="m_8147260923843896409m_-2192334854636949855yui_3_16_0_ym19_1_1500482535878_3860">imapper1->Update();</div><div dir="ltr" id="m_8147260923843896409m_-2192334854636949855yui_3_16_0_ym19_1_1500482535878_3861"><br id="m_8147260923843896409m_-2192334854636949855yui_3_16_0_ym19_1_1500482535878_3862"></div><div dir="ltr" id="m_8147260923843896409m_-2192334854636949855yui_3_16_0_ym19_1_1500482535878_3863">vtkSmartPointer<vtkImageMapToC<wbr>olors> imapper2 = vtkSmartPointer<vtkImageMapToC<wbr>olors>::New();</div><div dir="ltr" id="m_8147260923843896409m_-2192334854636949855yui_3_16_0_ym19_1_1500482535878_3864">imapper2->SetLookupTable(lut2)<wbr>;</div><div dir="ltr" id="m_8147260923843896409m_-2192334854636949855yui_3_16_0_ym19_1_1500482535878_3865">imapper2->PassAlphaToOutputOn(<wbr>);</div><div dir="ltr" id="m_8147260923843896409m_-2192334854636949855yui_3_16_0_ym19_1_1500482535878_3866">imapper2->SetInputData(image2)<wbr>;</div><div dir="ltr" id="m_8147260923843896409m_-2192334854636949855yui_3_16_0_ym19_1_1500482535878_3867">imapper2->Update();</div><div dir="ltr" id="m_8147260923843896409m_-2192334854636949855yui_3_16_0_ym19_1_1500482535878_3868"><br id="m_8147260923843896409m_-2192334854636949855yui_3_16_0_ym19_1_1500482535878_3869"></div><div dir="ltr" id="m_8147260923843896409m_-2192334854636949855yui_3_16_0_ym19_1_1500482535878_3870">vtkSmartPointer<vtkImageBlend> blend = vtkSmartPointer<vtkImageBlend><wbr>::New();</div><div dir="ltr" id="m_8147260923843896409m_-2192334854636949855yui_3_16_0_ym19_1_1500482535878_3871">blend->AddInputConnection(imap<wbr>per1->GetOutputPort());</div><div dir="ltr" id="m_8147260923843896409m_-2192334854636949855yui_3_16_0_ym19_1_1500482535878_3872">blend->SetOpacity(0, 1.0);</div><div dir="ltr" id="m_8147260923843896409m_-2192334854636949855yui_3_16_0_ym19_1_1500482535878_3873">blend->AddInputConnection(imap<wbr>per2->GetOutputPort());</div><div dir="ltr" id="m_8147260923843896409m_-2192334854636949855yui_3_16_0_ym19_1_1500482535878_3874">blend->SetOpacity(1, 1.0);</div><div dir="ltr" id="m_8147260923843896409m_-2192334854636949855yui_3_16_0_ym19_1_1500482535878_3874"><br></div><div dir="ltr" id="m_8147260923843896409m_-2192334854636949855yui_3_16_0_ym19_1_1500482535878_3874">// If I now render and adjust lut1, it affects the output of blend so the imapper2 image gets affected</div><span class="m_8147260923843896409HOEnZb"><font color="#888888"><div id="m_8147260923843896409m_-2192334854636949855yui_3_16_0_ym19_1_1500482535878_3653" dir="ltr"><br></div><div id="m_8147260923843896409m_-2192334854636949855yui_3_16_0_ym19_1_1500482535878_3653" dir="ltr">Mike</div></font></span></div></div></blockquote></div></div></div></div>