[IGSTK-Developers] View class refactoring

Andinet Enquobahrie andinet.enqu at kitware.com
Tue Aug 14 12:00:43 EDT 2007


Torleif-

To give you more insight...

I just added two more tests (regression tests) to the sandbox that 
demonstrate the use of the widgets with the rest of the IGSTK
classes.

1) igstkCTImageSpatialObjectReadingAndRepresentationTest2.cxx

This test demonstrates how to use the FLTKWidget with the image spatial 
object, representation and
the new view class (ViewNew)

2) igstkCTImageSpatialObjectReadinAndRepresentationTest3.cxx

This class demonstrates how to use the QTWidget with the IGSTK 
components listed above in (1).

Thanks

-Andinet

>>
>> However, it is now in a reasonably good shape that I would like to  
>> ask you to take a look at it and
>> give me your comments.
>>
>> Torleif and Frank,
>>
>> Since you guys have developed QT applications using IGSTK in the  
>> past, I would appreciate if you
>> would play with  the new QT widget and the refactored view classes  
>> and give me some feedbacks.
>> Thank you!
>
>
> Hi Andinet.
>
> I have started using the new classes and I get into trouble when I  
> want to use functionality in objects derived from ViewNew:
>
> igstk::ViewNew2D::Pointer my2DView = igstkViewNew2D::New();
> my2DView->RequestSetOrientation(igstk::ViewNew2D::Coronal);
> gives the compiler error:
>
>   'class igstk::ViewNew' has no member named 'RequestSetOrientation'
>
> I think this is because ViewNew2D/3D does not have it's own 'Pointer'  
> typedef, but uses its
> parent's typedef instead. I tried adding a typedef  
> itk::SmartPointer<Self> to ViewNew2D but that resulted in compile  
> errors like these where QTWidget::RequestSetView was called:
>
> error: no matching function for call to
>   'igstk::QTWidget::RequestSetView 
> (itk::SmartPointer<igstk::ViewNew2D>&)'
>   note: candidates are: void igstk::QTWidget::RequestSetView 
> (itk::SmartPointer<igstk::ViewNew>)
>
> Is there something I can do to get around this?
>
> Regards,
>
> Torleif
>


-- 
==========================================================
Andinet A. Enquobahrie, PhD
R&D Engineer
Kitware Inc.

28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x124
www.kitware.com





More information about the IGSTK-Developers mailing list