Dear Sascha,
your CMakeLists.txt file works like a dream. I was successful in compiling
the Step1.cpp by myself. Thanks a lot.

Regards,
Francesco

> Hi Francesco,
>
> welcome to MITK and thanks for the detailed problem description!
>
> Regarding your CMake problem, setting the environment variable should
> work, but the usual way is to just set the *CMake variable* MITK_DIR to
> the build directory containing the MITKConfig.cmake file. In the ccmake
> curses gui, there should be entry for this variable.
>
> Although your CMakeLists.txt file is essential correct (as it is from
> the documentation page), it is unfortunately outdated and will not work
> satisfactory (some changes in the recent past broke it). Here is a link
> to an example which I just created and which demonstrates the preferred
> way:
>
> http://mitk.org/git/?p=MITK.git;a=blob;f=Examples/QtAppExample/CMakeLists.txt;h=5105f5ea17693738460ce449e2130208a2f32c03;hb=HEAD
>
> I also fixed the documentation, it will be online tomorrow.
>
> Thanks,
>
> Sascha
>
> On 05/24/2012 07:14 PM, Mr Francesco Grussu wrote:
>> Dear all,
>> my name is Francesco Grussu and I am new to MITK.
>> I am trying to follow all the steps needed to set up the Toolkit and use
>> it in my own projects on Ubuntu 11.10.
>>
>> Briefly, this is what I did.
>>
>> After getting all the prerequisites I cloned the MITK's current git
>> repository in my home with
>> $ git clone http://git.mitk.org/MITK.git . This produced a directory
>> named
>> MITK in my home.
>> Then I configured the superbuild process with the CMake GUI (I made sure
>> to tick the MTK_USE_VTK_5_8_IN_SUPERBUILD option). I configured twice
>> and
>> generated. After moving to the directory where I wanted the binaries to
>> be
>> built, I typed $ make. The superbuld process was successful.
>>
>> Now I would like to use MITK in a project of mine as a toolkit. I read
>> the
>> mailing list FAQ at http://www.mitk.org/wiki/MailinglistFAQ and I tried
>> to
>> follow the advice previously provided to the question "New to MITK" by
>> Kilgus. I thought that compiling some of the tutorials source by myself
>> would have been good practice.
>>
>> I TRIED TO COMPILE THE Step1.cpp FILE BY MYSELF
>> (whose source is here http://docs.mitk.org/nightly-qt4/Step01Page.html
>> ).
>>
>> This is the CMakeLists.txt file I wrote according to the advice in
>> http://docs.mitk.org/nightly-qt4/BuildInstructionsPage.html ( Use MITK
>> in
>> your own project (as a toolkit)  )
>>
>> ________________________________________________
>>
>> cmake_minimum_required(VERSION 2.6)
>> find_package(MITK)
>> include_directories(${QMITK_INCLUDE_DIRS})
>> link_directories(${MITK_LINK_DIRECTORIES})
>> add_executable(MyApp Step1.cpp)
>> target_link_libraries(Step1 ${QMITK_LIBRARIES})
>> ________________________________________________
>>
>> The output produced by Cmake after giving
>> $ccmake .
>> was:
>>
>> **************************************
>>
>>     CMake Warning at CMakeLists.txt:2 (find_package):
>>     Could not find module FindMITK.cmake or a configuration file for
>> package
>>     MITK.
>>
>>     Adjust CMAKE_MODULE_PATH to find FindMITK.cmake or set MITK_DIR to
>> the
>>     directory containing a CMake configuration file for MITK.  The file
>> will
>>     have one of the following names:
>>
>>       MITKConfig.cmake
>>       mitk-config.cmake
>>
>> ***************************************
>>
>> So, I edited my .bashrc to set the value of the environment variable
>> MITK_DIR with the path where the MITKConfig.cmake is.
>> I rebooted my system, I checked that the value of MITK_DIR was right and
>> then I tried to give ccmake again. Anyway, the same error occurred.
>>
>> Could someone possibly give me any explanation about that?
>> How could I fix it?
>>
>> My final task should be the following. I would like to write a main.cpp
>> function in order to load some CT data (DICOM) and apply an automatic
>> segmentation algorithm, using the algorithms provided by (M)ITK. After
>> that, I would like to show the results or even save the data and view
>> them
>> with 3M3 afterwards.
>>
>> Thank you in advance,
>> my apologies for the length of the e-mail
>>
>> Regards,
>> Francesco Grussu
>>
>>
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond.
>> Discussions
>> will include endpoint security, mobile security and the latest in
>> malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> mitk-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/mitk-users
>
>



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to