<!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 interpolated like it is 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> </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> </DIV>
<DIV><FONT face=Arial size=2>Part of my code:</FONT></DIV>
<DIV><FONT face=Arial size=2> </FONT></DIV>
<DIV><FONT face=Arial size=2> sp = min(spacing)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> extentInrterpolate =
list(extent)<BR> extentInrterpolate[1] =
int(extent[1]*(spacing[0]/sp))<BR> extentInrterpolate[3] =
int(extent[3]*(spacing[1]/sp))<BR> extentInrterpolate[5] =
int(extent[5]*(spacing[2]/sp))<BR> extentInrterpolate =
tuple(extentInrterpolate)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> reslice =
vtkImageReslice()</FONT></DIV>
<DIV><FONT face=Arial size=2>
reslice.SetInput(imageData)</FONT></DIV>
<DIV><FONT face=Arial size=2>
reslice.InterpolateOn()</FONT></DIV>
<DIV><FONT face=Arial size=2>
reslice.SetInterpolationModeToLinear()<BR>
reslice.SetOutputSpacing(sp,sp,sp)<BR>
reslice.SetOutputExtent(self.extent)</FONT></DIV>
<DIV><FONT face=Arial size=2> </FONT><FONT face=Arial
size=2></FONT></DIV>
<DIV><FONT face=Arial size=2> planeWidgetX =
vtk.vtkImagePlaneWidget()<BR>
planeWidgetX.DisplayTextOn()<BR>
planeWidgetX.SetInput(self.reslice.GetOutput()) # or
imageData<BR>
planeWidgetX.SetPlaneOrientationToXAxes()<BR>
planeWidgetX.SetSliceIndex(0)<BR>
planeWidgetX.SetPicker(picker)<BR>
planeWidgetX.SetKeyPressActivationValue("x")<BR>
planeWidgetX.TextureInterpolateOn()<BR>
planeWidgetX.RestrictPlaneToVolumeOff()<BR>
planeWidgetX.TextureVisibilityOff()<BR> </FONT></DIV>
<DIV><FONT face=Arial size=2> prop1 =
planeWidgetX.GetPlaneProperty()<BR> prop1.SetColor(1, 0,
0)<BR> <BR> planeSourceX =
vtk.vtkPlaneSource()<BR>
planeSourceX.SetOrigin(planeWidgetX.GetOrigin())<BR>
planeSourceX.SetPoint1(planeWidgetX.GetPoint1())<BR>
planeSourceX.SetPoint2(planeWidgetX.GetPoint2())<BR>
planeSourceX.SetNormal(planeWidgetX.GetNormal())<BR> </FONT></DIV>
<DIV><FONT face=Arial size=2> planeMapperX =
vtk.vtkPolyDataMapper()<BR>
planeMapperX.SetInput(self.planeSourceX.GetOutput())<BR>
</FONT></DIV>
<DIV><FONT face=Arial size=2> planeActorX =
vtk.vtkActor()<BR>
planeActorX.SetMapper(planeMapperX)<BR>
planeActorX.VisibilityOff()<BR></FONT><FONT face=Arial size=2>
planeActorX.SetTexture(planeWidgetX.GetTexture())<BR>
planeActorX.SetProperty(planeWidgetX.GetTexturePlaneProperty())<BR> </FONT></DIV>
<DIV><FONT face=Arial size=2> renVolume =
vtk.vtkRenderer()<BR> renVolume.SetBackground(0,0,0)
#0.2,0.4,0.6)<BR>
renVolume.InteractiveOn()<BR>
renVolume.AddActor(outlineActor)</FONT></DIV>
<DIV><FONT face=Arial
size=2> renVolume.AddActor(self.planeActorX)<BR></DIV></FONT></FONT></DIV></BODY></HTML>