Hi,

The MITK documentation assumes a certain level of familiarity with CMake. If you look into the Examples folder, you will find a minimal CMake based example essentially doing what you want:

https://github.com/MITK/MITK/tree/master/Examples/QtAppExample

We are working at providing better documentation for people new to MITK.

Best,
Sascha

On 12/12/2012 07:20 PM, Marcos wrote:
I don't mind switching to CMake, but I'm surprised the only reference to this is an example of a CMakeLists.txt. Looking "Use MITK in your own project (as a toolkit)"||:||

|||||
# Set-up the build system to use the Qmitk module
MITK_USE_MODULE(Qmitk)
include_directories(${ALL_INCLUDE_DIRECTORIES})
link_directories(${ALL_LIBRARY_DIRS})
|||||
I don't know where is ${ALL_INCLUDE_DIRECTORIES} and what other variables are available beside those.

I have compiled MITK in superbuild mode, with itk and vtk downloaded via MITK. Now I have a MITK-superbuild folder and I don't know where to start. In the QT Creator project I can create a CMakeLists.txt, but I have to change the "Build settings" (Build steps, clean steps,...). In "Build environment" I can declare variables (like ALL_INCLUDE_DIRECTORIES??). And I guess I have to delete the .pro file.

I'm just saying MITK has a great documentation for using its API, very complete. But first I have to be able to use it with the IDE Qt Creator, and it seems impossible. I can't find a simple guide. I guess it's so simple that everybody knows how to do it.

I just want to write in my existing code, for example, a simple

#include <QmitkRenderWindow.h>

and be able to compile it.

Thanks for the help.



2012/12/12 Goch, Caspar Jonas <[email protected] <mailto:[email protected]>>

    Hi Marcos,

    am I correct in assuming, that you are not using CMake for your
    own project? MITK is designed to be used in conjunction with CMake
    and the documentation is oriented along these lines.

    As CMake will set all include and library paths accordingly you
    usually do not have to worry about them.

    I am not aware of an easy way of extracting all the required
    information from the configured cmake cache and using them to set
    all the required paths by hand.

    Unless there are urgent reasons not to use CMake for your own
    project, it will be easier by far if you switch to CMake. You can
    supply your own builds of ITK and VTK during the mitk superbuild,
    but you will have to make sure they are built accordingly.

    Regarding the make install issue, MITK does not provide an install
    target.

    I hope this helps,

    Regards

    Caspar

    *Von:*Marcos [mailto:[email protected]
    <mailto:[email protected]>]
    *Gesendet:* Mittwoch, 12. Dezember 2012 16:06
    *An:* [email protected]
    <mailto:[email protected]>
    *Betreff:* [mitk-users] Just use MITK in QT Creator

    I was looking through a lot of webs, but... I'm tired.


    It should be easier. I guess it is.

    I have a Qt Creator project. I was using VTK and ITK, but
    connecting them is... complicated. So I was thinking to try MITK.

    I've downloaded the last stable release (MITK-2012.09.0-src). I've
    configured with ccmake. Then I used make. I tried make install:
    ok, it doesn't work that way.

    So I have to use a CMakeLists.txt file. I was reading
    http://docs.mitk.org/2012.09/BuildInstructionsPage.html
    the section "Use MITK in your own project (as a toolkisd

    The problem is I already have a .pro file, with another libraries.
    I can use VTK and ITK, knowing where the header files
    (/usr/local/include) and libraries (/usr/local/lib) are. But in
    MITK-build folder I can't find the header files.
    Ok, an example: the Step1.cpp file. It includes
    <QmitkRenderWindow.h
    <http://docs.mitk.org/2012.09/QmitkRenderWindow_8h.html>>. It is
    at the MITK-src folder, but inside subfolders. I have to look for
    it. And the .so files? I find them in MITK-build/bin/
    So, my include path is in MITK-src/Modules/... ? and my libs path
    in MITK-build/bin?

    I don't know.
    It would be good to have these things clearer. It's frustrating.
    Any suggestions? Thanks in advance.





2012/12/12 Marcos <[email protected] <mailto:[email protected]>>

    I don't mind switching to CMake, but I'm surprised the only
    reference to this is an example of a CMakeLists.txt. Looking "Use
    MITK in your own project (as a toolkit)"||:||

    |||||
    # Set-up the build system to use the Qmitk module
    MITK_USE_MODULE(Qmitk)
    include_directories(${ALL_INCLUDE_DIRECTORIES})
    link_directories(${ALL_LIBRARY_DIRS})
    |||||
    I don't know where is ${ALL_INCLUDE_DIRECTORIES} and what other
    variables are available beside those.

    I have compiled MITK in superbuild mode, with itk and vtk
    downloaded via MITK. Now I have a MITK-superbuild folder and I
    don't know where to start. In the QT Creator project I can create
    a CMakeLists.txt, but I have to change the "Build settings" (Build
    steps, clean steps,...). In "Build environment" I can declare
    variables (like ALL_INCLUDE_DIRECTORIES??). And I guess I have to
    delete the .pro file.

    I'm just saying MITK has a great documentation for using its API,
    very complete. But first I have to be able to use it with the IDE
    Qt Creator, and it seems impossible. I can't find a simple guide.
    I guess it's so simple that everybody knows how to do it.

    I just want to write in my existing code, for example, a simple

    #include <QmitkRenderWindow.h>

    and be able to compile it.

    Thanks for the help.



    2012/12/12 Goch, Caspar Jonas <[email protected]
    <mailto:[email protected]>>

        Hi Marcos,

        am I correct in assuming, that you are not using CMake for
        your own project? MITK is designed to be used in conjunction
        with CMake and the documentation is oriented along these lines.

        As CMake will set all include and library paths accordingly
        you usually do not have to worry about them.

        I am not aware of an easy way of extracting all the required
        information from the configured cmake cache and using them to
        set all the required paths by hand.

        Unless there are urgent reasons not to use CMake for your own
        project, it will be easier by far if you switch to CMake. You
        can supply your own builds of ITK and VTK during the mitk
        superbuild, but you will have to make sure they are built
        accordingly.

        Regarding the make install issue, MITK does not provide an
        install target.

        I hope this helps,

        Regards

        Caspar

        *Von:*Marcos [mailto:[email protected]
        <mailto:[email protected]>]
        *Gesendet:* Mittwoch, 12. Dezember 2012 16:06
        *An:* [email protected]
        <mailto:[email protected]>
        *Betreff:* [mitk-users] Just use MITK in QT Creator

        I was looking through a lot of webs, but... I'm tired.


        It should be easier. I guess it is.

        I have a Qt Creator project. I was using VTK and ITK, but
        connecting them is... complicated. So I was thinking to try MITK.

        I've downloaded the last stable release (MITK-2012.09.0-src).
        I've configured with ccmake. Then I used make. I tried make
        install: ok, it doesn't work that way.

        So I have to use a CMakeLists.txt file. I was reading
        http://docs.mitk.org/2012.09/BuildInstructionsPage.html
        the section "Use MITK in your own project (as a toolkisd

        The problem is I already have a .pro file, with another libraries.
        I can use VTK and ITK, knowing where the header files
        (/usr/local/include) and libraries (/usr/local/lib) are. But
        in MITK-build folder I can't find the header files.
        Ok, an example: the Step1.cpp file. It includes
        <QmitkRenderWindow.h
        <http://docs.mitk.org/2012.09/QmitkRenderWindow_8h.html>>. It
        is at the MITK-src folder, but inside subfolders. I have to
        look for it. And the .so files? I find them in MITK-build/bin/
        So, my include path is in MITK-src/Modules/... ? and my libs
        path in MITK-build/bin?

        I don't know.
        It would be good to have these things clearer. It's frustrating.
        Any suggestions? Thanks in advance.




------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to