[ITK] [ITK-users] Running an ITK program

Abdul Abdul abdul.sw84 at gmail.com
Wed Oct 29 09:58:23 EDT 2014


Sorry, forgot to attach CMakeLists.txt

On Wed, Oct 29, 2014 at 2:56 PM, Abdul Abdul <abdul.sw84 at gmail.com> wrote:

> I got the following error for CMakeLists.txt (attached):
>
> CMake Error at CMakeLists.txt:11 (find_package):
> By not providing "FindItkVtkGlue.cmake" in CMAKE_MODULE_PATH this project
> has asked CMake to find a package configuration file provided by
> "ItkVtkGlue", but CMake did not find one.
>
> Could not find a package configuration file provided by "ItkVtkGlue" with
> any of the following names:
>
> ItkVtkGlueConfig.cmake
> itkvtkglue-config.cmake
>
> Add the installation prefix of "ItkVtkGlue" to CMAKE_PREFIX_PATH or set
> "ItkVtkGlue_DIR" to a directory containing one of the above files. If
> "ItkVtkGlue" provides a separate development package or SDK, be sure it has
> been installed.
>
> Do you know why is that? Should I look for "ItkVtkGlue"?
>
> Thanks.
>
> On Wed, Oct 29, 2014 at 1:03 PM, John Drescher <drescherjm at gmail.com>
> wrote:
>
>>
>>
>> On Wed, Oct 29, 2014 at 6:09 AM, Abdul Abdul <abdul.sw84 at gmail.com>
>> wrote:
>>
>>> I will build VTK. But, the main issue is on the steps to follow to run
>>> an ITK program. Does that make sense?
>>>
>>> For instance, should I create "source" and "build" directories?
>>>
>>
>> You do not create a source folder. This folder is where your source
>> exists. You do create a build folder. I put the build folder in a
>> completely different tree from the source tree but you can if you want make
>> the build folder a subfolder of the source.
>>
>>
>>> When I run CMake, what should I do? ....etc
>>>
>>
>>
>> Usually in cmake-gui its set the source folder and the build folder. Then
>> Configure. You will be asked what generator to use (Visual Studio 12 2013
>> Win64 ...)  After this you Generate.
>>
>> John
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20141029/ddaafa4a/attachment.html>
-------------- next part --------------
cmake_minimum_required(VERSION 2.8)
 
project(readDisplayImageInfo)
 
find_package(ITK REQUIRED)
include(${ITK_USE_FILE})
if (ITKVtkGlue_LOADED)
  find_package(VTK REQUIRED)
  include(${VTK_USE_FILE})
else()
  find_package(ItkVtkGlue REQUIRED)
  include(${ItkVtkGlue_USE_FILE})
  set(Glue ItkVtkGlue)
endif()
 
add_executable(readDisplayImageInfo MACOSX_BUNDLE readDisplayImageInfo.cxx)
target_link_libraries(readDisplayImageInfo
  ${Glue}  ${VTK_LIBRARIES} ${ITK_LIBRARIES})


-------------- next part --------------
_____________________________________
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://public.kitware.com/mailman/listinfo/insight-users


More information about the Community mailing list