<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.E-MailFormatvorlage17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=DE link=blue vlink=purple>
<div class=WordSection1>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Hi Karthik,<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>thank you very much for your answer.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Using your suggested widget is much easier than using the
vtkCursor3D.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>It works fine in my application.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Thanks again and best regards,<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Michael<o:p></o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'><br>
<br>
</span><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:#1F497D'>.......................................................... </span><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p></o:p></span></p>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Von:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Karthik Krishnan
[mailto:karthik.krishnan@kitware.com] <br>
<b>Gesendet:</b> Dienstag, 14. September 2010 11:31<br>
<b>An:</b> Granseier, Michael (VISUS)<br>
<b>Cc:</b> vtkusers@vtk.org<br>
<b>Betreff:</b> Re: [vtkusers] Perspective view of vtkCursor3D<o:p></o:p></span></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><o:p> </o:p></p>
<div>
<p class=MsoNormal>On Mon, Sep 13, 2010 at 8:05 PM, Granseier, Michael (VISUS)
<<a href="mailto:granseier@visus.com">granseier@visus.com</a>> wrote:<o:p></o:p></p>
<p class=MsoNormal style='margin-bottom:12.0pt'>Dear VTK Users,<br>
<br>
I'm trying to mark a three-dimensional point in a volume using the vtkCursor3D
class.<br>
My problem is, that the length of the crosshairs' lines stay constant, even if
the position of the point is farther away from the camera.<br>
I'm using SetModelBounds to specify the length.<br>
<br>
The same problem occurs with a vtkSphereSource. The radius of the source stays
the same, no matter how far away it is from the camera.<br>
<br>
Is it possible to scale the crosshairs' lines or the sphere radius relative to
the camera distance?<br>
So, that the marker-object becomes smaller, the further the specified point is
away from the camera and larger, the closer it is?<o:p></o:p></p>
<div>
<p class=MsoNormal><br>
I presume you mean "becomes larger the further ..."<br>
<br>
3D props maintain a fixed physical (world) size, unlike 2D props which maintain
a fixed display size.<br>
<br>
I'd recommend using the vtkHandleWidget, in conjunction with a
vtkPointHandleRepresentation3D. This representation contains a vtkCursor3D and
scales it dynamically based on the camera distance, so that it appears to
maintain the same normalized display size.<br>
<br>
Use the widget with event processing disabled (SetProcessEventsOff()) and its
pretty much what you need. Take a look at its tests in VTK for usage.<br>
<br>
-------<br>
<br>
Alternatively, to dynamically on your own prop you could write a prop that
derives from vtkProp3D and internally contains a vtkCursor3D along with its
associated polydatamapper and actor. Then override the method
RenderOpaqueGeometry to set your own actor scale.... something to the effect
of...<br>
<br>
int myProp::RenderOpaqueGeometry(vtkViewport *v) <br>
{<br>
// Get camera params<br>
// Use the coordinate conversion methods vtkRenderer to <br>
// compute the right scale so that your cursor maintains the same<br>
// extent in normalized display coordinates.<br>
this->Cursor3DActor->SetScale( computedScale );<br>
return this->Cursor3DActor->RenderOpaqueGeometry(v);<br>
}<br>
<br>
<br>
--<br>
karthik <o:p></o:p></p>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</body>
</html>