[IGSTK-Users] DICOMImageReader :: GetItkImage() access

Andinet Enquobahrie andinet.enqu at kitware.com
Wed Sep 26 09:09:37 EDT 2007


Hi Vincent,

Thanks for pointing out the bug.

You are correct.  Function and variable declarations after 
igstkLoggerMacro declaration
are part of the public class interface. We don't want this behavior 
since the macro is
declared in the private class interface.

I have moved the macro to the public interface so that by default 
everything after
this macro declaration will be part of the public interface.

Thanks again...that was a good catch!

-Andinet

> Hi all,
>
> It seems that many methods of the DICOMImageReader class are public 
> instead of being private.
> This problem is due to the igstkLoggerMacro :
>
>     public: \
>       typedef ::itk::Logger                  LoggerType; \
>     protected: \
>       LoggerType* GetLogger() const { return m_Logger; } \
>     private: \
>       mutable LoggerType::Pointer   m_Logger; \
>     public: \
>       void SetLogger(LoggerType* logger) { m_Logger = logger; }
>
>
> This includes that each method declared after a call to this macro 
> will be defined as public one.
> So you have to specify one more time methods access after this call.
>
> Note that this problem could be present in other classes... I did not 
> check.
>
> Have a nice day,
>


-- 
==========================================================
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-Users mailing list