<!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> </DIV>
<DIV><FONT face=Arial size=2></FONT> </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> </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> </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> </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> </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> </DIV>
<DIV><FONT face=Arial size=2>renwin =
vtkRenderWindow()<BR>renwin.AddRenderer(renVolume)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </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> </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> </DIV>
<DIV><FONT face=Arial size=2>But if I set VisibilityOff in
planeWidget... when I set VisibityOn again, the volume raycast does not
appear in front of planewidget. The planewidget get in the "first
plane".</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </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> </DIV>
<DIV><FONT face=Arial size=2>i´m having problem with the two
alternatives ( planewidget 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> </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. 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> -----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> <BR> sp =
min(spacing)<BR><BR> 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)<BR><BR> reslice =
vtkImageReslice()<BR>
reslice.SetInput(imageData)<BR>
reslice.InterpolateOn()<BR>
reslice.SetInterpolationModeToLinear()<BR>
reslice.SetOutputSpacing(sp,sp,sp)<BR>
reslice.SetOutputExtent(self.extent)<BR>
<BR> 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> <BR> 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>
<BR> planeMapperX =
vtk.vtkPolyDataMapper()<BR>
planeMapperX.SetInput(self.planeSourceX.GetOutput())<BR>
<BR> planeActorX = vtk.vtkActor()<BR>
planeActorX.SetMapper(planeMapperX)<BR>
planeActorX.VisibilityOff()<BR>
planeActorX.SetTexture(planeWidgetX.GetTexture())<BR>
planeActorX.SetProperty(planeWidgetX.GetTexturePlaneProperty())<BR>
<BR> renVolume = vtk.vtkRenderer()<BR>
renVolume.SetBackground(0,0,0) #0.2,0.4,0.6)<BR>
renVolume.InteractiveOn()<BR>
renVolume.AddActor(outlineActor)<BR>
renVolume.AddActor(self.planeActorX)</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2><FONT face="Times New Roman"
size=3></FONT> </DIV></FONT></BODY></HTML>