[vtkusers] vtkContourWidget

Lodron, Gerald Gerald.Lodron at joanneum.at
Thu May 19 09:28:43 EDT 2016


Hi

Thanks, didn’t know labelMapper yet

I currently successfully implemented it over an own Representation inherited from vtkOrientedGlyphContourRepresentation
Where I made a vtkTextActor array for each node of my contour. It works but my contour has up to 600 points (which means 600 text actors) where this solution gets really slow, especially when I use mouse to change cameras position…….

I will try yours, this should be much faster I think….

Best regards,
Gerald

Von: Dean Inglis [mailto:inglis.dl at gmail.com]
Gesendet: Donnerstag, 19. Mai 2016 15:22
An: Lodron, Gerald
Betreff: Re: [vtkusers] vtkContourWidget

Hi Gerald,
have a look at the following classes:
vtkIdFilter
vtkLabeledDataMapper
vtkActor2D
if you have polydata from your contour, you could
setup a visualization pipeline as follows:
vtkPolyData contour
vtkIdFilter filter
vtkLabeledDataMapper mapper
vtkActor2D actor
filter->PointIdson();
filter->CellIdsOff();
filter->FieldDataOn();
filter->SetInput(contour);

mapper->SetLabelModeToLabelFieldData();
mapper->SetInputConnection(filter->GetOutputPort());
actor->SetMapper(mapper);


HTH,
Dean


On Thu, May 19, 2016 at 1:46 AM, Lodron, Gerald <Gerald.Lodron at joanneum.at<mailto:Gerald.Lodron at joanneum.at>> wrote:
Hi

I use a vtkContourWidget to draw a contour over a set of detected points because I like the highlighting of points when mouse is moved over the contour points. I successfully deactivated manual manipulation of the contour. I now like to add a drawing with the point number over or on the side of the current highlighted point where the mouse hoovers. Is that possible?

I do not find a function or callback  to use….

Any suggestions?

------------------------------------------------------------------------------------
Gerald Lodron

Researcher of Machine Vision Applications Group
DIGITAL - Institute for Information and Communication Technologies

JOANNEUM RESEARCH Forschungsgesellschaft mbH
Steyrergasse 17, 8010 Graz, AUSTRIA

phone:   +43-316-876-1751
general fax: +43-316-876-1751
web: http://www.joanneum.at/digital
e-mail: gerald.lodron at joanneum.at<mailto:gerald.lodron at joanneum.at>




_______________________________________________
Powered by www.kitware.com<http://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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160519/e415fb37/attachment.html>


More information about the vtkusers mailing list