<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<vtkImageBlend> blend = vtkSmartPointer<vtkImageBlend>::New();<br><br>vtkSmartPointer<vtkPoints> points = vtkSmartPointer<vtkPoints>::New();<br>points->InsertNextPoint(*cnr1X,960 - *cnr1Y,1);<br>points->InsertNextPoint(*cnr2X,960 - *cnr2Y,1);<br>points->InsertNextPoint(*cnr3X,960 - *cnr3Y,1);<br>points->InsertNextPoint(*cnr4X,960 - *cnr4Y,1);<br><br>vtkSmartPointer<vtkImplicitSelectionLoop> ImplicitLoop = vtkSmartPointer<vtkImplicitSelectionLoop>::New();<br>ImplicitLoop->SetLoop(points);<br><br>vtkSmartPointer<vtkImplicitFunctionToImageStencil> dataToStencil = vtkSmartPointer<vtkImplicitFunctionToImageStencil>::New();<br>dataToStencil->SetInput(ImplicitLoop);<br> <br>blend->SetStencil(dataToStencil->GetOutput());<br>blend->AddInput(MTImage);<br>blend->AddInput(USImage);<br>blend->SetOpacity(0,0.5);<br>blend->SetOpacity(1,0.8);<br><br>FinalImage = blend->GetOutput());<br>FinalImage->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>