Hi Dean,<br><br>The issue is amongst the commits today in <a href="http://www.vtk.org/Testing/Sites/DASH3.kitware/Win32-vs60/20071019-2001-Continuous/Update.html">http://www.vtk.org/Testing/Sites/DASH3.kitware/Win32-vs60/20071019-2001-Continuous/Update.html
</a> .<br><br>Please let us know if this works for you.<br><br>Thanks<br>--<br>Karthik Krishnan<br>R&D Engineer,<br>Kitware Inc.<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 Karthik,<br><br>thanks for pointing that out, I missed the<br>second (original) implementation.  However,<br>even if I change vtkImageActorPointPlacer as<br>suggested, this will not work, at least with<br>MS Vis Studio, since the signatures of the
<br>vtkBoundedPointPlacer's ComputeWorldPosition<br>are equivalent due to the vtkNotUsed macro:<br><br>// first appearanc in implementation file<br>// of ComputeWorldPosition<br>int vtkBoundedPlanePointPlacer::ComputeWorldPosition(
<br>    vtkRenderer * ren,<br>    double        displayPos[2],<br>    double        refWorldPos[3],<br>    double        worldPos[3],<br>    double      * vtkNotUsed(worldOrient) )<br>{<br><br><br>// second implementation "looks" the same
<br>// so the compiler always calls the first implementation<br>int vtkBoundedPlanePointPlacer::ComputeWorldPosition( vtkRenderer *ren,<br>                                                      double displayPos[2],<br>                                                      double worldPos[3],
<br>                                                      double worldOrient[9] )<br><br><br>I tried and the contour widget's handle translation still does<br>not function.<br><br>Dean<br><br><br>><br>> Hi Dean,
<br>><br>> Could you please check if the following change to vtkImageActorPointPlacer<br>> fixes it.<br>><br>> On line 78, replace<br>>    this->Placer->ComputeWorldPosition( ren, displayPos, refWorldPos,
<br>> worldPos, worldOrient );<br>> with<br>>    this->Placer->ComputeWorldPosition( ren, displayPos, worldPos,<br>> worldOrient );<br>><br>> If so, please commit it.<br>><br>> Thanks,<br>> Regards
<br>> --<br>> karthik<br>><br>> On 10/16/07, <a href="mailto:dean.inglis@camris.ca">dean.inglis@camris.ca</a> <<a href="mailto:dean.inglis@camris.ca">dean.inglis@camris.ca</a>> wrote:<br>> ><br>> > 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>> > #------------------------------------------------------------------------------------<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>> >
<br>><br>><br>><br>> --<br>> Karthik Krishnan<br>> R&D Engineer,<br>> Kitware Inc.<br>><br>><br></blockquote></div>