[Insight-users] updating softwareguide ?: InsightClopedia

Luis Ibanez luis.ibanez at kitware.com
Tue Jul 7 17:36:51 EDT 2009


Hi Asamwm,

Yeap,
using #defines for defining constants is a bad practice.

We don't do it in ITK,
and it is good to have it in the list of "Don't"s
in the Wiki page.



     Luis



-------------
asamwm wrote:
> Hi Luis,
> thanks for the updates. What I meant by the #define is
> something the user would do in his/her code such as
> --myHeader.h
>       #define Dimension 3
>       ///// and then, after that comes a
>       #include someitk.h-which-has
>             ... #include some-n-dimensional-itkfilter.h that happens to 
> use "Dimension"
> -----
> The whole point is to make macro/const names unique
> enough so they won't clash. I ran into this
> earlier last week when  I had some temporary #define 's
> that I had intended to have them replaced by arguments.
> 
> I am hoping people will add more from their experiences.
> 
> Regards.
> 
> 
> On Tue, Jul 7, 2009 at 9:59 AM, Luis Ibanez <luis.ibanez at kitware.com 
> <mailto:luis.ibanez at kitware.com>> wrote:
> 
> 
>     Hi Asamwm,
> 
>     Thanks for posting the link to the page.
> 
>     http://www.itk.org/Wiki/ITK/InsightClopedia/DOs_and_DONTs
> 
> 
>     I have modified its formatting a bit,
>     and rewrote the third section.
> 
>     ITK doesn't use #define in order to define any numerical
>     constants. We do this through initialization of Statics
>     or by using StaticConst Macros.
> 
>     Please take a look and let us know what you think,
> 
> 
>        Thanks
> 
> 
>           Luis
> 
> 
>     ---------------------------
>     asamwm wrote:
> 
>         It is off of the top page
>         http://www.itk.org/Wiki/ITK_InsightClopedia
> 
>         that you specified earlier:
> 
>         http://www.itk.org/Wiki/ITK/InsightClopedia/DOs_and_DONTs
> 
>          It is still barely populated though.
> 
>         2009/7/6 Luis Ibanez <luis.ibanez at kitware.com
>         <mailto:luis.ibanez at kitware.com> <mailto:luis.ibanez at kitware.com
>         <mailto:luis.ibanez at kitware.com>>>
> 
> 
>            Hi Asamwm,
> 
>            Great idea,
> 
>            Can you send the link to the list,
>            so we can take a look the new page that you created ?
> 
> 
> 
>              Thanks
> 
> 
>                 Luis
> 
> 
> 
>            ----------
>            asamwm wrote:
> 
>                Hi Luis,
>                I added a Do's and Dont's page. I don't know whether you
>         would
>                like it to be there
>                or whether a better version is duplicated somewhere else.
>                Please take a look and if you like it, feel free to
>         invite input.
>                Regards.
> 
>                2009/7/6 Luis Ibanez <luis.ibanez at kitware.com
>         <mailto:luis.ibanez at kitware.com>
>                <mailto:luis.ibanez at kitware.com
>         <mailto:luis.ibanez at kitware.com>>
>         <mailto:luis.ibanez at kitware.com <mailto:luis.ibanez at kitware.com>
>                <mailto:luis.ibanez at kitware.com
>         <mailto:luis.ibanez at kitware.com>>>>
> 
> 
> 
>                   Hi Ramon,
> 
>                   Thanks a lot for populating this page.
> 
>                   This is great.
> 
> 
>                      Luis
> 
> 
> 
>                   ------------------------
> 
>                   Ramón Casero Cañas wrote:
> 
>                       Ramón Casero Cañas wrote:
> 
>                           Luis Ibanez wrote:
> 
> 
>                               Would you like to take a first pass at
>         moving the
>                content
>                               from your page into the ITK Wiki ?
> 
>                               You can get an account right now, by
>         simply going
>                through
>                               the email verification step.   :-)
> 
> 
> 
>                           Hi Luis,
> 
>                           Just a quick reply for the moment. Thanks for
>         your email.
>                           Yes, I'd like to. I'm off until Monday, but
>         I'll do
>                it then.
> 
> 
> 
> 
>                       Hi all,
> 
>                       I have now added some notes from my old wiki about
>                building ITK
>                       and ITK projects in Ubuntu to the ITK wiki. I have
>         added
>                a link
>                       to the "ITK Configuring and Building" page
> 
>                            
>         http://www.itk.org/Wiki/ITK_Configuring_and_Building#Build_for_Ubuntu_Linux
> 
>                       This new section has a link to a new page with the
>         actual
>                content
> 
>                            
>         http://www.itk.org/Wiki/ITK_Configuring_and_Building_for_Ubuntu_Linux
> 
>                       If somebody thinks that another arrangement is
>         better, then
>                       please feel welcome to make any suggestions or
>         edit the pages
>                       yourselves!
> 
>                       Best regards,
> 
>                       Ramon.
> 
>                   _____________________________________
>                   Powered by www.kitware.com <http://www.kitware.com>
>         <http://www.kitware.com>
>                <http://www.kitware.com>
> 
> 
>                   Visit other Kitware open-source projects at
>                   http://www.kitware.com/opensource/opensource.html
> 
>                   Please keep messages on-topic and check the ITK FAQ at:
>                   http://www.itk.org/Wiki/ITK_FAQ
> 
>                   Follow this link to subscribe/unsubscribe:
>                   http://www.itk.org/mailman/listinfo/insight-users
> 
> 
> 
> 


More information about the Insight-users mailing list