ITK/Tutorials/DOs and DONTs

From KitwarePublic
< ITK‎ | Tutorials
Revision as of 21:15, 6 July 2009 by Hussein (talk | contribs) (New page: == PipeLine == * Do call Update() before using the pipeline output! == Image Creation == * On a New()'ly -manually-created image, do initialize the pixel values if you expect them to be s...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

PipeLine

  • Do call Update() before using the pipeline output!

Image Creation

  • On a New()'ly -manually-created image, do initialize the pixel values if you expect them to be so!
    • Example: image->FillBuffer(0); // initialize it to all dark

Coding Style

  • Beware of #define CONST_VALUE_NAME 3
    • If itk is using CONST_VALUE_NAME somewhere, your compile-time (& frustration) could grow unreasonably until you find what is hidden behind some long forgotten #define in a long-forgotten .h. Example:
      • #define Dimension 2
      • #include itkTooManyFilesToList.h