[vtkusers] vtk + qt delay in corner annotation?
Ale
notinmyhead at gmail.com
Thu Jun 7 10:22:50 EDT 2012
Hi thanks! It seems to work!
So if I well understand I have to call "manually" the this->annotator->Modified() member every time I change the slice?
Il giorno 07/giu/2012, alle ore 16.12, David Doria ha scritto:
> 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