[ITK] [ITK-users] starting ITK with cmake (no gui)

Barbara Post bpo at eonix.be
Thu Mar 20 04:25:53 EDT 2014


Hello, here is my helloworld.
Did you double click the exe you built ? Personally I ran it from my IDE after building.

CMakeLists.txt:

cmake_minimum_required(VERSION 2.8.8)

project(HelloItk)

find_package(ITK REQUIRED)

include(${ITK_USE_FILE})

# executable then list of files
add_executable(
	HelloItk 
	main.cpp
)
target_link_libraries(HelloItk ${ITK_LIBRARIES})


main.cpp:

#include "itkImage.h"
#include <iostream>
int main()
{
typedef itk::Image< unsigned short, 3 > ImageType;
ImageType::Pointer image = ImageType::New();
std::cout << "ITK Hello World !" << std::endl;
}

-- 
Barbara POST 

-----Original Message-----
From: Insight-users [mailto:insight-users-bounces at itk.org] On Behalf Of lianliliu
Sent: mercredi 19 mars 2014 18:38
To: insight-users at itk.org
Subject: [ITK-users] starting ITK with cmake (no gui)

I am new to ITK and I am trying to configure my projects using cmake on a terminal. Thus I do not have the interface as shown in the guide. I think I have configured ITK successfully and there is ITKConfig.cmake in my directory. But when I try to run the helloworld, after cmake . there is not .dsw or .sh files generated, instead I get a message saying building files have been writen to ... and some .cmake and .h files. Does this mean I did not configure successfully? How can I run the helloworld program?



--
View this message in context: http://itk-users.7.n7.nabble.com/starting-ITK-with-cmake-no-gui-tp33592.html
Sent from the ITK - Users mailing list archive at Nabble.com.
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users



More information about the Community mailing list