[IGSTK-Developers] View class refactoring
Andinet Enquobahrie
andinet.enqu at kitware.com
Tue Aug 14 11:09:22 EDT 2007
Hi Torleif,
Thank you for testing the newly refactored view classes.
>
>
> 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?
This is definitely a bug. As you have pointed out, type defs were
missing. Furthermore, modification was needed in the input
argument types of the RequestSetView method to be able to handle
ViewNew2D and ViewNew3D. I have committed a fix to
the Sandbox.
Please update your check out and give it a try.
Let me know if you encounter other issues.
Thanks!
-Andinet
>
>
--
==========================================================
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