[vtkusers] vtkContourWidget and vtkImageViewer2

Dora Szasz dora.szasz at yahoo.com
Tue Aug 28 05:38:53 EDT 2012


It is possible to apply vtkAffineWidget on the contour generated by vtkContourWidget? I have tried, but my contour need to be an actor.

Basically, there is the code for creating the desired contour:

vtkContourWidget *ContourWidget = vtkContourWidget::New();

  vtkOrientedGlyphContourRepresentation *rep = vtkOrientedGlyphContourRepresentation::New(); 
  rep->GetLinesProperty()->SetColor(1, 0, 0);
  ContourWidget->SetRepresentation(rep);
  
  vtkImageActorPointPlacer * imageActorPointPlacer = vtkImageActorPointPlacer::New(); 
  imageActorPointPlacer->SetImageActor(ImageViewer->GetImageActor()); 
  rep->SetPointPlacer(imageActorPointPlacer); 

  imageActorPointPlacer->Delete(); 
  rep->Delete(); 

  ContourWidget->SetInteractor(iren); 
  ContourWidget->SetEnabled(true); 
  ContourWidget->ProcessEventsOn();

How can I use AffineWidget on it?



________________________________
 From: Jothybasu Selvaraj <jothybasu at gmail.com>
To: Dora Szasz <dora.szasz at yahoo.com> 
Cc: "vtkusers at vtk.org" <vtkusers at vtk.org>; "insight-users at itk.org" <insight-users at itk.org> 
Sent: Tuesday, August 28, 2012 11:04 AM
Subject: Re: [vtkusers] vtkContourWidget and vtkImageViewer2
 

Have a look at vtkAffineWidget.

Jothy


On Mon, Aug 27, 2012 at 8:07 PM, Dora Szasz <dora.szasz at yahoo.com> wrote:

Hi,
>
>
>I still have the question about vtkContourWidget and vtkImageViewer2.
>How can I rotate only the contour, without rotating the image? (for translation, if I select the contour and drag it with the Middle Mouse, I can do this). How can I make the rotation and scaling work in such a way?
>
>
>
>
>Thank you!
>
>Dora Szasz
>_______________________________________________
>Powered by www.kitware.com
>
>Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
>Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers
>
>


-- 

Jothybasu Selvaraj
PhD Student
University of Liverpool
UK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120828/f1f73552/attachment.htm>


More information about the vtkusers mailing list