<!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>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Hi Deam,</FONT></DIV>
<DIV><FONT face=Arial size=2>my english is not so good, but i will try to 
explain</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I´m trying to use vtkImagePlaneWidget to take 
oblique images as below:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>#####</FONT></DIV>
<DIV><FONT face=Arial size=2>volmap = 
vtkOpenGLVolumeRayCastMapper()</FONT></DIV>
<DIV><FONT face=Arial size=2>volmap.SetInput(imagedata)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>volume = vtkVolume()</FONT></DIV>
<DIV><FONT face=Arial size=2>volume.SetMapper(volmap)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>renVolume = vtkRenderer()</FONT></DIV>
<DIV><FONT face=Arial size=2>renVolume.AddVolume(volume)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>renwin = 
vtkRenderWindow()<BR>renwin.AddRenderer(renVolume)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>paneVolume = wxVTKRenderWindowInteractor(frame,-1, 
size = (512,512),rw = renwin, stereo = 1)</FONT></DIV>
<DIV><FONT face=Arial size=2>...</FONT></DIV>
<DIV><FONT face=Arial size=2>iact = paneVolume._Iren</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>planeWidgetX = vtkImagePlaneWidget()</FONT></DIV>
<DIV><FONT face=Arial size=2>planeWidgetX.SetInput(imagedata) </FONT></DIV>
<DIV><FONT face=Arial size=2>...</FONT></DIV>
<DIV><FONT face=Arial size=2>planeWidgetX.SetInteractor(iact)</FONT></DIV>
<DIV><FONT face=Arial size=2>####</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>But&nbsp;if I&nbsp;set VisibilityOff in 
planeWidget... when I set VisibityOn again, the volume raycast&nbsp;does not 
appear in front of planewidget. The planewidget get in the "first 
plane".</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>So i tried to put a planeSource to receive the 
texture of planewidget. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>i´m having&nbsp;problem&nbsp;with the two 
alternatives ( planewidget&nbsp;and planesource ). </FONT></DIV>
<DIV><FONT face=Arial size=2>I need the interaction of planewidget and i need to 
take oblique images with this one.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><FONT face="Times New Roman" size=3>-----Original 
Message-----</FONT><BR></FONT><FONT face=Arial size=2><FONT face=Arial 
size=2></FONT></FONT></DIV>
<DIV><FONT face=Arial size=2><FONT face="Times New Roman" size=3>Hi Glauco, 
<BR><BR>I'm not sure what your objective is,<BR>but if what you are trying to do 
is to resample<BR>your raw image data and then view one of<BR>the orthogonal 
image planes (ie, sagittal, coronal,<BR>axial), use a vtkImageResample on the 
raw<BR>input followed by a vtkImageActor for viewing.<BR>vtkImagePlaneWidget is 
designed for image<BR>input, followed by interactive reslicing in<BR>ANY 
orientation.&nbsp; It seems to me that you are<BR>trying to bypass the 
functionality of the widget<BR>when you really do not have to do 
this.<BR><BR>Dean</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2><FONT face="Times New Roman" 
size=3></FONT><BR></FONT><FONT face=Arial size=2><FONT face="Times New Roman" 
size=3>&nbsp;-----Original Message-----</FONT><BR></DIV></FONT>
<DIV><FONT face=Arial size=2><FONT face="Times New Roman" size=3>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?<BR>I tryed 
paste to vtkImagePlaneWidget a imageData and a reslice.GetOutput(). How can i 
get successful interpolation ?<BR><BR>extent of ImageData = 
(0,255,0,255,1,107)<BR>spacing of ImageData = (0.95,0.95,1.5)<BR><BR>Part of my 
code:<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; sp = 
min(spacing)<BR><BR>&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)<BR><BR>&nbsp;&nbsp;&nbsp; reslice = 
vtkImageReslice()<BR>&nbsp;&nbsp;&nbsp; 
reslice.SetInput(imageData)<BR>&nbsp;&nbsp;&nbsp; 
reslice.InterpolateOn()<BR>&nbsp;&nbsp;&nbsp; 
reslice.SetInterpolationModeToLinear()<BR>&nbsp;&nbsp;&nbsp; 
reslice.SetOutputSpacing(sp,sp,sp)<BR>&nbsp;&nbsp;&nbsp; 
reslice.SetOutputExtent(self.extent)<BR>&nbsp;&nbsp;&nbsp; 
<BR>&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; <BR>&nbsp;&nbsp;&nbsp; prop1 
= planeWidgetX.GetPlaneProperty()<BR>&nbsp;&nbsp;&nbsp; prop1.SetColor(1, 0, 
0)<BR>&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; 
<BR>&nbsp;&nbsp;&nbsp; planeMapperX = 
vtk.vtkPolyDataMapper()<BR>&nbsp;&nbsp;&nbsp; 
planeMapperX.SetInput(self.planeSourceX.GetOutput())<BR>&nbsp;&nbsp;&nbsp; 
<BR>&nbsp;&nbsp;&nbsp; planeActorX = vtk.vtkActor()<BR>&nbsp;&nbsp;&nbsp; 
planeActorX.SetMapper(planeMapperX)<BR>&nbsp;&nbsp;&nbsp; 
planeActorX.VisibilityOff()<BR>&nbsp;&nbsp;&nbsp; 
planeActorX.SetTexture(planeWidgetX.GetTexture())<BR>&nbsp;&nbsp;&nbsp; 
planeActorX.SetProperty(planeWidgetX.GetTexturePlaneProperty())<BR>&nbsp;&nbsp;&nbsp; 
<BR>&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)<BR>&nbsp;&nbsp;&nbsp; 
renVolume.AddActor(self.planeActorX)</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2><FONT face="Times New Roman" 
size=3></FONT>&nbsp;</DIV></FONT></BODY></HTML>