ITK/Examples/Images/ImageRegion
From KitwarePublic
< ITK | Examples
Jump to navigationJump to search
Revision as of 13:53, 18 November 2010 by Daviddoria (talk | contribs)
This class holds an itkIndex (the "bottom left" corner of a region) and a itkSize (the size of the region). These two items together completely describe a region.
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);
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>