Hi,

CMake has an extensive documentation on how find_package() is trying to find 
things and in which order. There are many options and ways to allow you to tell 
CMake how it should find things by setting certain variables, so I highly 
recommend to dive into this page to get a better understanding of this process:

https://cmake.org/cmake/help/v3.15/command/find_package.html

Make sure to select your CMake version in the documentation at the top to get 
an accurate description.

See slide 8 of the following presentation to see a minimum but working example:
http://mitk-um.org/wp-content/uploads/2016/05/MITK_Tutorial_Introductory_Session.pdf



From: Ivaylo Angelov [mailto:ivaylo_ange...@gmx.de]
Sent: Thursday, November 7, 2019 10:23 PM
To: Dinkelacker, Stefan <s.dinkelac...@dkfz-heidelberg.de>
Cc: mitk-userslists.sourceforge.net <mitk-users@lists.sourceforge.net>
Subject: Aw: AW: [mitk-users] creating an MITK project

Hello Stefan,

thank you for your detailed explanation on the matter.
I have a follow-up question regarding this:

I chose the first option, because I already have a bit of a GUI that is more 
than sufficient, so I figured,
I might as well just use MITK as a library and thereby learn a bit about cmake, 
which I had not used by then
(apart from the MITK setup of course).
Given that my project is located elsewhere on my computer and I don't want to 
copy everything another time into my project folder,
I figured that, what I have to do in order to use all MITK functionalities I 
would like is to
include the  * find_library() * or * find_package() * command and then use
*target_link_libraries(MY_EXECUTABLE LIBRARY)*.
Unfortunately I can not make up how to use those in order to be able to use 
MITK as a library (maybe it's more suitable to use 
*target_include_directories()* ..?).

I guess it is quite a basic question but I got very confused trying to 
accomplish this and hope that you can help me.

There is also a follow up to that, because I was thinking about further code I 
will write:
having set that up, will I be able to also use VTK functionalities or do I have 
to proceed similarly with those.
In that case, I guess the information I found under 
>>https://vtk.org/Wiki/VTK/Tutorials/CMakeListsFile<<
would be the way to proceed.

Thank you very much in advance!

Kind regards,
Ivaylo Angelov

Gesendet: Montag, 07. Oktober 2019 um 08:24 Uhr
Von: "Dinkelacker, Stefan" 
<s.dinkelac...@dkfz-heidelberg.de<mailto:s.dinkelac...@dkfz-heidelberg.de>>
An: "Ivaylo Angelov" <ivaylo_ange...@gmx.de<mailto:ivaylo_ange...@gmx.de>>, 
"mitk-userslists.sourceforge.net" 
<mitk-users@lists.sourceforge.net<mailto:mitk-users@lists.sourceforge.net>>
Betreff: AW: [mitk-users] creating an MITK project

Hi,



basically you can follow two different paths when using MITK:



(1) Using MITK as a toolkit/library. You can use all the MITK features like 
algorithms, data handling, rendering but are responsible for designing and 
developing the actual application. This is very flexible but you will probably 
write some thousands lines of codes more for the boilerplate code of 
interactive GUI applications.



(2a) Using MITK as a framework. You develop a BlueBerry application like the 
MITK Workbench or MITK Diffusion with all the possibilities but also the 
restrictions a framework dictates. It is possible to write a completely new 
BlueBerry application that looks quite different from the typical MITK 
Workbench look and feel or you could take the probably easiest approach (b) of 
just writing modules and plugins for the standard MITK Workbench, switching 
everything off or on to your liking with a build configuration file, but you 
end up with a MITK Workbench-style application - Menu, toolbar, plugin views 
and an the editor in the center.



I usually recommend the last approach [2b] if there isn't any blocker as you 
can concentrate on the actual code for your features. This is also a good 
staring point for beginners as one can later still write a completely 
customized BlueBerry application and just use the already developed modules and 
plugins [2a]. The customized BlueBerry application approach is currently very 
tough to use in the beginning, as we do not have a minimal example actually 
explaining the details of how things are working. In fact, I am currently 
creating such an application example for the MITK ProjectTemplate but it even 
takes quite an amount of time for me as an MITK core developer. I probably push 
it into the MITK ProjectTemplate this month. If you do not really care of what 
is going on in detail you can just copy one of the minimal BlueBerry examples 
or even the MITK Workbench or MITK Diffusion and delete and add stuff as needed 
in a kind of trial-and-error approach.!



Best,

Stefan

________________________________
Von: Ivaylo Angelov <ivaylo_ange...@gmx.de<mailto:ivaylo_ange...@gmx.de>>
Gesendet: Mittwoch, 2. Oktober 2019 23:13
An: mitk-userslists.sourceforge.net
Betreff: [mitk-users] creating an MITK project

Dear all,

I have a general question on building projects based on MITK.
My goal is to build a small application in which I would like to give the user 
opportunity to load and view certain datasets
and alter them by using (mostly) MITK and VTK libraries as well as QT.
In the end I would like to create an executable file for convenience.

After reading a lot of documentation and browsing through your website, I am 
still a little confused
as to what is the most suitable way to start building such an application...
it seems to me that creating a module would be a proper way and within that 
module incorporate
the libraries etc that I need..

The other possibility I see is creating an Application, following the style of 
your
"Workbench" or "Plugin-Generator"... the last two I mention because I pictured 
a project
in which I have an own Solution File, e.g. a completely new Visual Studio 
solution, incorporating certain
MITK functionalities and ultimately executing my "application".

You could describe it as trying to set up my own workbench, in a sense that I 
want to have an application that I can extend
and I can work on in a separate solution file.

Could you guide me through what I have to do or point me to a tutorial I may 
have missed on your page
or tell me the crucial files/settings I have to take into consideration (maybe 
with the workbench as an example).

I apologize for the long mail but I am trying to picture it as well as possible 
to do it properly right away.
Thank you very much in advance, I hope to hear from you soon.

Kind regards

Ivaylo Angelov
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to