[vtkusers] circle

David.Pont at ensisjv.com David.Pont at ensisjv.com
Tue Aug 16 17:10:49 EDT 2005


Renaud Isabelle <renauisa at yahoo.fr> wrote on 17/08/2005 08:22:43:

> Hi,
>
> I would like to draw a circle each time and where exactly the user
> clicks on my displayed image.
>
> I saw examples to draw a sphere:
>
>  vtkSphereSource* m_sphere = vtkSphereSource::New();
>  vtkActor*  m_sphereActor = vtkActor::New();
>  vtkPolyDataMapper* sphereMapper = vtkPolyDataMapper::New();
>  sphereMapper->SetInput(m_sphere->GetOutput());
>  m_sphereActor->SetMapper(sphereMapper);
>  m_Renderer->AddActor( m_sphereActor );
>
> But is there a way to draw a circle (that is empty disk and in 2D)
> instead of a filled sphere in 3D? Maybe  vtkSphereSource added to
vtkActor2D
> could be a way?
>
> I am not familiar with VTK for the moment, so, please, excuse me if
> this seems obvious....

You could try:
  vtkCutter with vtkPlane and your vtkSphereSource
  vtkDiskSource
  vtkTexture loaded with an image of a circle on a transparent (alpha=0)
background and placed on a vtkPlaneSource
  vtkImageViewer (never used this but worth a look I think...) with an
image of a circle...

 Dave P

>
> Isabelle
> Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo!
Messenger
> Téléchargez le ici ! _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.
> org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers




More information about the vtkusers mailing list