ITK/Examples/SimpleOperations/RGBPixel
From KitwarePublic
RGBPixel.cxx
#include <itkImage.h> #include <itkRGBPixel.h> int main(int argc, char *argv[]) { typedef itk::RGBPixel<unsigned char> RGBPixelType; typedef itk::Image<RGBPixelType> RGBImageType; RGBImageType::Pointer image = RGBImageType::New(); return EXIT_SUCCESS; }
CMakeLists.txt
cmake_minimum_required(VERSION 2.8) project(RGBPixel) find_package(ITK REQUIRED) include(${ITK_USE_FILE}) add_executable(RGBPixel RGBPixel.cxx) if( "${ITK_VERSION_MAJOR}" LESS 4 ) target_link_libraries(RGBPixel ITKReview ${ITK_LIBRARIES}) else( "${ITK_VERSION_MAJOR}" LESS 4 ) target_link_libraries(RGBPixel ${ITK_LIBRARIES}) endif( "${ITK_VERSION_MAJOR}" LESS 4 )