[vtkusers] vtk + qt delay in corner annotation?

David Doria daviddoria at gmail.com
Thu Jun 7 10:12:55 EDT 2012


On Thu, Jun 7, 2012 at 10:01 AM, Ale <notinmyhead at gmail.com> wrote:
> 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

I don't see any Update() or Modified() calls there like Jochen suggested?

David



More information about the vtkusers mailing list