ITK/Examples/Images/ImageRegion

From KitwarePublic
< ITK‎ | Examples
Revision as of 14:03, 2 November 2010 by Daviddoria (talk | contribs) (Created page with "==ImageRegion.cxx== <source lang="cpp"> #include "itkImageRegion.h" #include "itkIndex.h" #include "itkSize.h" int main(int, char *[]) { itk::Size<2> size; size.Fill(3); ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

ImageRegion.cxx

<source lang="cpp">

  1. include "itkImageRegion.h"
  2. include "itkIndex.h"
  3. include "itkSize.h"

int main(int, char *[]) {

 itk::Size<2> size;
 size.Fill(3);
 itk::Index<2> index;
 index.Fill(1);
 
 typedef itk::ImageRegion<2> RegionType;
 RegionType region(index,size);
 std::cout << region << std::endl;
 return EXIT_SUCCESS;

}

</source>

CMakeLists.txt

<source lang="cmake"> cmake_minimum_required(VERSION 2.6)

PROJECT(ImageRegion)

FIND_PACKAGE(ITK REQUIRED) INCLUDE(${ITK_USE_FILE})

ADD_EXECUTABLE(ImageRegion ImageRegion.cxx) TARGET_LINK_LIBRARIES(ImageRegion ITKIO)

</source>