[vtkusers] vtk + qt delay in corner annotation?

Ale notinmyhead at gmail.com
Thu Jun 7 10:01:29 EDT 2012


Hi,

I try. Since the this->renderer is the result of QVTKWidget GetRenderWindow() function, I simply add this piece of code to set the annotator in the constructor of my class (which instantiate the QVTKWidget within a frame) :

    this->annotator = vtkSmartPointer<vtkCornerAnnotation>::New();

    this->annotator->SetLinearFontScaleFactor( 2 );
    this->annotator->SetNonlinearFontScaleFactor( 1 );
    this->annotator->SetMaximumFontSize( 13 );

    this->annotator->GetTextProperty()->SetColor( 1,1,1);
    this->annotator->SetText( 0, "<slice_and_max>");
  
    this->renderer->AddActor(this->annotator);
    this->renderer->ResetCamera();

I found out that if I left-click several times to the current slice, the <slice_and_max> updates, otherwise it keep to show a wrong value...

I hope this help...
Thanks,
Ale


Il giorno 07/giu/2012, alle ore 15.48, Jochen K. ha scritto:

> Hi Ale,
> 
> it's hard to suggest a solution having no clue about your source code, but I
> would suggest to play around with Modified() and/or Update() on several
> places and objects.
> 
> with kind regards
> Jochen
> 
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/vtk-qt-delay-in-corner-annotation-tp5713651p5713659.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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




More information about the vtkusers mailing list