Hi,<br><br>So it isn't possible to represent a spatial objet on 2D views exept if it is in the corner ?<br><br><div><span class="gmail_quote">2007/3/26, Patrick Cheng <<a href="mailto:cheng@isis.georgetown.edu">cheng@isis.georgetown.edu
</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Sophie,<br><br>Because the initial camera focus point is set to (0,0,0)<br>
If your object is at location:<br><br>transform.SetTranslation (100, 0.1, 1000);<br><br>The object will appear at one of the four corners depending on the view<br>orientation(Axial, Coronal, and Sagittal). Because the camera will try
<br>to accommodate everything in the window.<br><br>I will try your code to see if there is any issue of the cone object.<br><br>Patrick<br><br>---------- Original Message ----------------------------------<br>From: "Sophie Blestel" <
<a href="mailto:sophie.blestel@gmail.com">sophie.blestel@gmail.com</a>><br>Date: Mon, 26 Mar 2007 11:22:53 +0200<br><br> >Hi,<br> ><br> >I try to display a cone in 3D and 2D views, with a location and<br>orientation
<br> >given. But on the 2D views the cone remains in the origin (on the<br>right high<br> >corner ) (on the 3D views it is well represented).<br> ><br> >This is my code :<br> ><br> >First I declare and initialise the cone :
<br> > ConeType::Pointer m_Cone = ConeType::New();<br> > ConeRepresentationType::Pointer m_ConeRepresentation =<br> >ConeRepresentationType::New();<br> ><br> > transform.SetTranslation (100, 0.1
, 1000);<br> ><br> > m_Cone->RequestSetTransform( transform );<br> > m_ConeRepresentation->RequestSetConeObject( m_Cone );<br> ><br> ><br> >I create my 4 views (Axial, Sagittal, Coronal and 3D) in a file .FL as
<br> >follows :<br> > Fl_Box DisplaySagittal {<br> > label {Display Sagittal}<br> > xywh {550 0 380 330} box FLAT_BOX color 0 labelcolor 7<br> > class {igstk::View2D} }<br>
><br> >Then I set the orientation ok the 2D views :<br> > DisplayAxial->RequestSetOrientation( View2D::Axial );<br> > DisplaySagittal->RequestSetOrientation( View2D::Sagittal );<br> > DisplayCoronal->RequestSetOrientation( View2D::Coronal );
<br> ><br> >And I add the cone representation to the 2D and 3D views :<br> > DisplayAxial->RequestAddObject( m_ConeRepresentation ); // if I do<br> >m_ConeRepresentation->Copy() the cone disappears<br>
> DisplaySagittal->RequestAddObject( m_ConeRepresentation );<br> > DisplayCoronal->RequestAddObject( m_ConeRepresentation );<br> > Display3D->RequestAddObject( m_ConeRepresentation );<br> ><br>
>For each view, I do :<br> > DisplaySagittal->RequestResetCamera();<br> > DisplaySagittal->Update();<br> > DisplaySagittal->RequestEnableInteractions();<br> > DisplaySagittal->RequestSetRefreshRate( 20 );
<br> > DisplaySagittal->RequestStart();<br> ><br> >And this is my loop :<br> > while(m_tms->mainWindow->visible())<br> > {<br> > Fl::wait(0.05);<br> > igstk::PulseGenerator::CheckTimeouts();
<br> > Fl::check();<br> > }<br> ><br> ><br> >Thanks for helping me,<br> ><br> >Sophie<br> ><br> ><br> ><br></blockquote></div><br>