<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1543" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>I´m trying to paste a Texture of 
vtkImagePlaneWidget to vtkActor. But the texture seems to be 
not&nbsp;interpolated&nbsp;like it is&nbsp;in vtkImagePlaneWidget. What´s 
happening?</FONT></DIV>
<DIV><FONT face=Arial size=2>I tryed paste to vtkImagePlaneWidget a imageData 
and a reslice.GetOutput(). How can i get successful interpolation ?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>extent of ImageData = 
(0,255,0,255,1,107)</FONT></DIV>
<DIV><FONT face=Arial size=2>spacing of ImageData = (0.95,0.95,1.5)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Part of my code:</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; </FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; sp = min(spacing)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; extentInrterpolate = 
list(extent)<BR>&nbsp;&nbsp;&nbsp; extentInrterpolate[1] = 
int(extent[1]*(spacing[0]/sp))<BR>&nbsp;&nbsp;&nbsp; extentInrterpolate[3] = 
int(extent[3]*(spacing[1]/sp))<BR>&nbsp;&nbsp;&nbsp; extentInrterpolate[5] = 
int(extent[5]*(spacing[2]/sp))<BR>&nbsp;&nbsp;&nbsp; extentInrterpolate = 
tuple(extentInrterpolate)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; reslice = 
vtkImageReslice()</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; 
reslice.SetInput(imageData)</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; 
reslice.InterpolateOn()</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; 
reslice.SetInterpolationModeToLinear()<BR>&nbsp;&nbsp;&nbsp; 
reslice.SetOutputSpacing(sp,sp,sp)<BR>&nbsp;&nbsp;&nbsp; 
reslice.SetOutputExtent(self.extent)</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; </FONT><FONT face=Arial 
size=2></FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; planeWidgetX = 
vtk.vtkImagePlaneWidget()<BR>&nbsp;&nbsp;&nbsp; 
planeWidgetX.DisplayTextOn()<BR>&nbsp;&nbsp;&nbsp; 
planeWidgetX.SetInput(self.reslice.GetOutput()) # or 
imageData<BR>&nbsp;&nbsp;&nbsp; 
planeWidgetX.SetPlaneOrientationToXAxes()<BR>&nbsp;&nbsp;&nbsp; 
planeWidgetX.SetSliceIndex(0)<BR>&nbsp;&nbsp;&nbsp; 
planeWidgetX.SetPicker(picker)<BR>&nbsp;&nbsp;&nbsp; 
planeWidgetX.SetKeyPressActivationValue("x")<BR>&nbsp;&nbsp;&nbsp; 
planeWidgetX.TextureInterpolateOn()<BR>&nbsp;&nbsp;&nbsp; 
planeWidgetX.RestrictPlaneToVolumeOff()<BR>&nbsp;&nbsp;&nbsp; 
planeWidgetX.TextureVisibilityOff()<BR>&nbsp;&nbsp;&nbsp;</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; prop1 = 
planeWidgetX.GetPlaneProperty()<BR>&nbsp;&nbsp;&nbsp; prop1.SetColor(1, 0, 
0)<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp; planeSourceX = 
vtk.vtkPlaneSource()<BR>&nbsp;&nbsp;&nbsp; 
planeSourceX.SetOrigin(planeWidgetX.GetOrigin())<BR>&nbsp;&nbsp;&nbsp; 
planeSourceX.SetPoint1(planeWidgetX.GetPoint1())<BR>&nbsp;&nbsp;&nbsp; 
planeSourceX.SetPoint2(planeWidgetX.GetPoint2())<BR>&nbsp;&nbsp;&nbsp; 
planeSourceX.SetNormal(planeWidgetX.GetNormal())<BR>&nbsp;&nbsp;&nbsp;&nbsp;</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp; &nbsp;planeMapperX = 
vtk.vtkPolyDataMapper()<BR>&nbsp;&nbsp;&nbsp; 
planeMapperX.SetInput(self.planeSourceX.GetOutput())<BR>&nbsp;&nbsp;&nbsp; 
</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; planeActorX = 
vtk.vtkActor()<BR>&nbsp;&nbsp;&nbsp; 
planeActorX.SetMapper(planeMapperX)<BR>&nbsp;&nbsp;&nbsp; 
planeActorX.VisibilityOff()<BR></FONT><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; 
planeActorX.SetTexture(planeWidgetX.GetTexture())<BR>&nbsp;&nbsp;&nbsp; 
planeActorX.SetProperty(planeWidgetX.GetTexturePlaneProperty())<BR>&nbsp;&nbsp;&nbsp;&nbsp;</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; renVolume = 
vtk.vtkRenderer()<BR>&nbsp;&nbsp;&nbsp; renVolume.SetBackground(0,0,0) 
#0.2,0.4,0.6)<BR>&nbsp;&nbsp;&nbsp; 
renVolume.InteractiveOn()<BR>&nbsp;&nbsp;&nbsp; 
renVolume.AddActor(outlineActor)</FONT></DIV>
<DIV><FONT face=Arial 
size=2>&nbsp;&nbsp;&nbsp;&nbsp;renVolume.AddActor(self.planeActorX)<BR></DIV></FONT></FONT></DIV></BODY></HTML>