ITK/Examples/Images/Size
From KitwarePublic
< ITK | Examples
Jump to navigationJump to search
Revision as of 13:38, 2 November 2010 by Daviddoria (talk | contribs) (Created page with "==Size.cxx== <source lang="cpp"> #include "itkSize.h" int main(int, char *[]) { itk::Size<2> size; // Method 1 size.Fill(0); /* // Method 2 size[0] = 1; size[1] ...")
Size.cxx
<source lang="cpp">
- include "itkSize.h"
int main(int, char *[]) {
itk::Size<2> size;
// Method 1 size.Fill(0);
/* // Method 2 size[0] = 1; size[1] = 2; */ std::cout << size << std::endl;
return EXIT_SUCCESS;
}
</source>
CMakeLists.txt
<source lang="cmake"> cmake_minimum_required(VERSION 2.6)
PROJECT(Size)
FIND_PACKAGE(ITK REQUIRED) INCLUDE(${ITK_USE_FILE})
ADD_EXECUTABLE(Size Size.cxx) TARGET_LINK_LIBRARIES(Size ITKIO)
</source>