Hi Dean,<br><br>Could you please check if the following change to vtkImageActorPointPlacer fixes it.<br><br>On line 78, replace<br>   this->Placer->ComputeWorldPosition( ren, displayPos, refWorldPos, worldPos, worldOrient );
<br>with<br>   this->Placer->ComputeWorldPosition( ren, displayPos, worldPos, worldOrient );<br><br>If so, please commit it.<br><br>Thanks,<br>Regards<br>--<br>karthik<br><br><div><span class="gmail_quote">On 10/16/07, 
<b class="gmail_sendername"><a href="mailto:dean.inglis@camris.ca">dean.inglis@camris.ca</a></b> <<a href="mailto:dean.inglis@camris.ca">dean.inglis@camris.ca</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><br>there were some changes made to vtkBoundedPointPlacer for the<br>new vtkParallelopipedWidget that does not appear to allow<br>for simple placement on bounded 2D planes and breaks the functionality<br>of vtkImageActorPointPlacer .  Can anyone verify by
<br>drawing on an image with vtkContourWidget and then trying to move<br>the widget's handles.  See script below...<br><br>Dean<br><br>#------------------------------------------------------------------------------------
<br>package require vtk<br>package require vtkinteraction<br><br># Start by loading some data.<br>#<br>vtkVolume16Reader v16<br>  v16 SetDataDimensions 64 64<br>  v16 SetDataByteOrderToLittleEndian<br>  v16 SetImageRange 1 93
<br>  v16 SetDataSpacing 3.2 3.2 1.5<br>  v16 SetFilePrefix "$VTK_DATA_ROOT/Data/headsq/quarter"<br>  v16 Update<br><br># Display a y-z plane.<br>#<br>vtkImageViewer2 viewer<br>  viewer SetInput [v16 GetOutput]<br>
  viewer SetSliceOrientationToXY<br><br>vtkRenderWindowInteractor iren<br>  viewer SetupInteractor iren<br><br>  vtkContourWidget ContourWidget<br>  ContourWidget KeyPressActivationOn<br><br>  vtkOrientedGlyphContourRepresentation ContourRep
<br>  ContourWidget SetRepresentation ContourRep<br><br>  ContourWidget   SetInteractor iren<br><br><br>  #vtkImageActorPointPlacer placer<br>  #placer SetImageActor [ viewer GetImageActor ]<br><br>  vtkBoundedPlanePointPlacer placer
<br><br>  placer DebugOn<br><br>  ContourRep SetPointPlacer placer<br><br> set bounds [[viewer GetImageActor] GetBounds]<br> set xmin [lindex $bounds 0]<br> set xmax [lindex $bounds 1]<br> set ymin [lindex $bounds 2]<br> set ymax [lindex $bounds 3]
<br> set zmin [lindex $bounds 4]<br> set zmax [lindex $bounds 5]<br><br>  placer SetProjectionNormalToZAxis<br><br> set center [[viewer GetImageActor] GetCenter]<br> set c [lindex $center 2]<br>  placer SetProjectionPosition  $c
<br><br>  vtkPlane p1<br>  p1 SetOrigin $xmin $ymin $zmin<br>  p1 SetNormal 1.0 0.0 0.0<br><br>  vtkPlane p2<br>  p2 SetOrigin $xmin $ymin $zmin<br>  p2 SetNormal 0.0 1.0 0.0<br><br>  vtkPlane p3<br>  p3 SetOrigin $xmax $ymax $zmax
<br>  p3 SetNormal -1.0 0.0 0.0<br><br>  vtkPlane p4<br>  p4 SetOrigin $xmax $ymax $zmax<br>  p4 SetNormal 0.0 -1.0 0.0<br><br><br>  placer AddBoundingPlane p1<br>  placer AddBoundingPlane p2<br>  placer AddBoundingPlane p3
<br>  placer AddBoundingPlane p4<br><br><br><br>  [ContourRep GetLinesProperty] SetColor 0 0 1<br>  [ContourRep GetActiveProperty] SetColor 0 1 0<br>  [ContourRep GetProperty] SetColor 0 1 0<br><br>iren AddObserver UserEvent {wm deiconify .vtkInteract}
<br><br>viewer Render<br><br>ContourWidget On<br><br><br># Prevent the tk window from showing up then start the event loop.<br>wm withdraw .<br>_______________________________________________<br>vtk-developers mailing list
<br><a href="mailto:vtk-developers@vtk.org">vtk-developers@vtk.org</a><br><a href="http://www.vtk.org/mailman/listinfo/vtk-developers">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br></blockquote></div><br><br clear="all">
<br>-- <br>Karthik Krishnan<br>R&D Engineer,<br>Kitware Inc.