ITK/Tutorials/DOs and DONTs
From KitwarePublic
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
- 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: