<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Hi,<br><br>I'm using the blend and stencil classes to to map 1 image into a specified polygon within another image. An excerpt of my code is as follows.<br><br>/////////////////////////////////////////////////////////////////////////////////////////////////<br>vtkSmartPointer&lt;vtkImageBlend&gt; blend = vtkSmartPointer&lt;vtkImageBlend&gt;::New();<br><br>vtkSmartPointer&lt;vtkPoints&gt; points = vtkSmartPointer&lt;vtkPoints&gt;::New();<br>points-&gt;InsertNextPoint(*cnr1X,960 - *cnr1Y,1);<br>points-&gt;InsertNextPoint(*cnr2X,960 - *cnr2Y,1);<br>points-&gt;InsertNextPoint(*cnr3X,960 - *cnr3Y,1);<br>points-&gt;InsertNextPoint(*cnr4X,960 - *cnr4Y,1);<br><br>vtkSmartPointer&lt;vtkImplicitSelectionLoop&gt; ImplicitLoop = vtkSmartPointer&lt;vtkImplicitSelectionLoop&gt;::New();<br>ImplicitLoop-&gt;SetLoop(points);<br><br>vtkSmartPointer&lt;vtkImplicitFunctionToImageStencil&gt; dataToStencil = vtkSmartPointer&lt;vtkImplicitFunctionToImageStencil&gt;::New();<br>dataToStencil-&gt;SetInput(ImplicitLoop);<br>&nbsp;&nbsp;&nbsp; &nbsp;<br>blend-&gt;SetStencil(dataToStencil-&gt;GetOutput());<br>blend-&gt;AddInput(MTImage);<br>blend-&gt;AddInput(USImage);<br>blend-&gt;SetOpacity(0,0.5);<br>blend-&gt;SetOpacity(1,0.8);<br><br>FinalImage = blend-&gt;GetOutput());<br>FinalImage-&gt;Update();<br>//////////////////////////////////////////////////////////////////////////////////////////////////<br><br>The final result is an image of the first image, MTImage, with a stencil window where the 2nd image, USImage, is displayed. My problem is that the stencil window is showing that specific portion of USImage, whereas I want that stencil window to be a map of USImage (similar to what vtkTexture would do). Is it possible to integrate vtkTexture into this setup? Thanks in advance.<br><br>Thanks,<br>Alexis Cheng<br>Electrical Engineering<br>University of British Columbia<br>                                               </body>
</html>