Hi all, I have had an mitk ExtApp built on my SuSE linux, but recently (last week) I was trying to extend the mitk ExtApp through the function generator in the mitk source folder, but ran into some problems.
I had the mitk, itk and vtk libraries installed userwide (no sudo, and no system-wide installations) i.e. they were built into their own folders inside the user home directory. The built application ExtApp would work fine from there. But, when trying to write a code using those libraries in my own program, the gcc would obviously cry out for the missing libraries and not finding the header files unless the complete address was given (not exactly realistic). So, I built the mitk, itk and vtk again with their respective target folders in the user directory like before, but this time I did a system wide installation and library files and linux executable were created in the /usr/local/bin and /usr/local/lib directories (at least that is what I tracked out, may be some other files were created in other folders too, I don't know), but the executable in these folders, could not link up with the files in the build directories in the user folder. No error was produced during the "make install" process. It was only after the "successful" build mitk, when I tried to run the ExtApp from the terminal, that I realized that the application in the /usr/local/bin folder can not find libraries from the build directories in the user folder. I tried adding the path to those libraries in the /etc/ld.so.conf file, but that didn't work. (Earlier the ExtApp was not even finding the libraries in the /usr/local/lib but after ldconfig, at least those library errors were gone, so ld.so.conf mattered). Then I tried using the "chrpath" to link the ExtApp to the directories in the user folder. That didn't work. An error would come up that, "ExtApp has no relative path tags". I am not sure, but I think the problem could be that during the making of the make file of mitk using cmake, I saw there was an option to "use relative paths for mitk", that was left unchecked during the build process. But up till then I had already built and rebuilt mitk, itk and vtk each, 3 times in my attempts to fix the problem (time consuming process). I saw in the mail archives of mitk mailing list that some other people also had faced this problem (http://www.mail-archive.com/[email protected]/msg01086.html) so, after spending a day on this, I changed the source tar balls of mitk being used so far from the 0.14 version to the newer svn version of mitk, thinking that maybe this is a bug, but that's when things took a turn for the worse for me, for reasons not worth mentioning here(in brief, newer svn mitk source tarball needed newer cmake and newer cmake was not available in my distro repositories, so I tried to cheat and used non-official repositories and broke my linux). So after a couple of days, I got the system back up and running again. And NOW, I am thinking of building the itk, vtk and mitk again. I explained everything in detail (too much detail), so that no ambiguities are left. I don't want to build system wide again. Anyone has some ideas? After this experience, I made my system dual-boot. So, will it be easier to do all this again in linux considering I am familiar to the process a little, by now, on linux or should I start from scratch on windows ! Also, I have a second question, I wanted to extend the ExtApp with a small application that can give access to some images in the mitk ExtApp environment. I am not sure, (because of the above problems), but does that application have to be complete on it's own, because I am using perl library to access images in that application right now (till I get mitk working and get access to those libraries), but I know from the mitk documentation that this library is also available in mitk. Can't those be used in building the original application and then the application can be integrated with the mitk using the FunctionGenerator in mitk source directory. All apologies for making this too long ! Best Regards, Junaid Naseer On Tue, 2011-05-24 at 09:54 +0000, [email protected] wrote: > Send mitk-users mailing list submissions to > [email protected] > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/mitk-users > or, via email, send a message with subject or body 'help' to > [email protected] > > You can reach the person managing the list at > [email protected] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of mitk-users digest..." > > > Today's Topics: > > 1. Re: Building step1 of tutorial (Sascha Zelzer) > 2. Re: Add menu entry with BlueBerry2? (Sascha Zelzer) > 3. Re: Add menu entry with BlueBerry2? (Miklos Espak) > 4. Re: Building step1 of tutorial ([email protected]) > 5. Re: Building step1 of tutorial (Seitel, Alexander) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 20 May 2011 11:36:40 +0200 > From: Sascha Zelzer <[email protected]> > Subject: Re: [mitk-users] Building step1 of tutorial > To: "[email protected]" <[email protected]> > Cc: "[email protected]" > <[email protected]> > Message-ID: <[email protected]> > Content-Type: text/plain; charset=UTF-8; format=flowed > > Hi Timm, > > Do you mean with "Redoing it without the superbuild" that you pointed > cmake (cmake-gui) to the build directory "MITK-build" inside your > superbuild directory? That would be the right way to get access to all > MITK CMake variables. > > Is it only the org_mitk_gui_qt_toftutorial bundle which can not be loaded? > > Best, > Sascha > > On 05/20/2011 10:59 AM, [email protected] wrote: > > Hi Sascha, > > > > thanks for you quick reply. It's working fine now with your Cmake File and > > a batch file to set up the correct environment with all mitk, itk, vtk etc. > > path in it. > > > > However, I would like to ask another question. I've compiled the superbuild > > and had no flag to set the TOF Hardwar enabled. Redoing it without the > > superbuild enabled me to set these options. Still, I get an error when I > > try to execute the ExtApp that the liborg_mitk_gui_qt_toftutoriald can not > > be loaded, although it's exactly in the path where the ExtApp is looking > > for it. I checked the plugin and manifest file but it seems ok. Do you have > > any idea? > > > > Thank you for your help > > Timm > > > > > > > >> Hi Timm, > >> > >> here is a minimal CMakeLists.txt which should work for you (I assume you > >> are using the latest git sources): > >> > >> # ==================================================== > >> CMAKE_MINIMUM_REQUIRED(VERSION 2.8.2) > >> > >> PROJECT(Step1) > >> > >> set(project_policies > >> CMP0001 # NEW: CMAKE_BACKWARDS_COMPATIBILITY should no longer be used. > >> CMP0002 # NEW: Logical target names must be globally unique. > >> CMP0003 # NEW: Libraries linked via full path no longer produce > >> linker search paths. > >> CMP0004 # NEW: Libraries linked may NOT have leading or trailing > >> whitespace. > >> CMP0005 # NEW: Preprocessor definition values are now escaped > >> automatically. > >> CMP0006 # NEW: Installing MACOSX_BUNDLE targets requires a BUNDLE > >> DESTINATION. > >> CMP0007 # NEW: List command no longer ignores empty elements. > >> CMP0008 # NEW: Libraries linked by full-path must have a valid > >> library file name. > >> CMP0009 # NEW: FILE GLOB_RECURSE calls should not follow symlinks by > >> default. > >> CMP0010 # NEW: Bad variable reference syntax is an error. > >> CMP0011 # NEW: Included scripts do automatic cmake_policy PUSH and POP. > >> CMP0012 # NEW: if() recognizes numbers and boolean constants. > >> CMP0013 # NEW: Duplicate binary directories are not allowed. > >> CMP0014 # NEW: Input directories must have CMakeLists.txt > >> ) > >> foreach(policy ${project_policies}) > >> if(POLICY ${policy}) > >> cmake_policy(SET ${policy} NEW) > >> endif() > >> endforeach() > >> > >> FIND_PACKAGE(MITK REQUIRED) > >> > >> MITK_USE_MODULE(QmitkExt) > >> > >> INCLUDE_DIRECTORIES( > >> ${CMAKE_CURRENT_SOURCE_DIR} > >> ${ALL_INCLUDE_DIRECTORIES} > >> ) > >> LINK_DIRECTORIES(${MITK_LINK_DIRECTORIES}) > >> > >> ADD_EXECUTABLE(Step1 Step1.cpp QtTesting.cpp) > >> TARGET_LINK_LIBRARIES(Step1 ${ALL_LIBRARIES}) > >> # ==================================================== > >> > >> Note that you also need the QtTesting.h and QtTesting.cpp files from the > >> Tutorial directory in MITK and you need to use the same CMAKE_BUILD_TYPE > >> in your project as in your MITK build. > >> > >> Best, > >> Sascha > >> > >> > >> On 05/18/2011 03:29 PM, [email protected] wrote: > >>> Hi, > >>> > >>> I'm trying to get started with MITK by following the tutorial steps. > >> I've successfully build MITK via the superbuild option. Now I've copied > >> step1.cpp into a new folder and wrote my own CMakeLists holding the > >> following > >> information: > >>> PROJECT(Step1) > >>> > >>> CMAKE_MINIMUM_REQUIRED(VERSION 2.4) > >>> if(COMMAND cmake_policy) > >>> cmake_policy(SET CMP0003 OLD) > >>> endif(COMMAND cmake_policy) > >>> > >>> FIND_PACKAGE(MITK REQUIRED) > >>> FIND_PACKAGE(Qt4 REQUIRED) > >>> > >>> INCLUDE(${QT_USE_FILE}) > >>> > >>> > >>> FIND_PACKAGE(ITK REQUIRED) > >>> FIND_PACKAGE(VTK REQUIRED) > >>> > >>> INCLUDE_DIRECTORIES(${QMITK_INCLUDE_DIRS}) > >>> LINK_DIRECTORIES(${MITK_LINK_DIRECTORIES}) > >>> > >>> ADD_EXECUTABLE(Step1 Step1.cpp) > >>> TARGET_LINK_LIBRARIES(Step1 ${QMITK_LIBRARIES} ${QT_LIBRARIES}) > >>> > >>> > >>> > >>> however, when I try to compile step1 I get an error "itkObject.h": No > >> such file or directory. > >>> It's probably simple to solve but I'm not familiar with writing CMake > >> files. > >>> I'm using Visual Studio 2008. > >>> all the best and thanks for your help > >>> Timm > >> > >> ------------------------------------------------------------------------------ > >> What Every C/C++ and Fortran developer Should Know! > >> Read this article and learn how Intel has extended the reach of its > >> next-generation tools to help Windows* and Linux* C/C++ and Fortran > >> developers boost performance applications - including clusters. > >> http://p.sf.net/sfu/intel-dev2devmay > >> _______________________________________________ > >> mitk-users mailing list > >> [email protected] > >> https://lists.sourceforge.net/lists/listinfo/mitk-users > > > > > ------------------------------ > > Message: 2 > Date: Fri, 20 May 2011 11:41:07 +0200 > From: Sascha Zelzer <[email protected]> > Subject: Re: [mitk-users] Add menu entry with BlueBerry2? > To: [email protected] > Message-ID: <[email protected]> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hi Miklos, > > One of the goals in BlueBerry2 was to support an extendible menu and > toolbar infrastructure. This work had to be post-poned and BlueBerry2 is > discontinued for several reasons. In fact, the directory has been > removed from the git master branch a couple of days ago. > > In BlueBerry (1), menus and toolbar items are just created centrally in > a class inheriting from berry::WorkbenchWindowAdvisor. See for example > QmitkWorkbenchwindowAdvisor in > CoreUI/Bundles/org.mitk.gui.qt.application or > QmitkExtWorkbenchWindowAdvisor in Modules/Bundles/org.mitk.gui.qt.ext . > > If you want to have full control over the menu structure in your own > application, you would have to create your own > berry::WorkbenchWindowAdvisor and berry::IApplication implementations. > External users of MITK/BlueBerry have successfully done that. > > Hope that helps, > > Sascha > > On 05/20/2011 08:02 AM, Miklos Espak wrote: > > Hi, > > > > I would like to provide a new menu item by the perspective I made. I > > found that in the BlueBerry2 directory there is an IMenuService > > interface that can be accessed by the selection service this way: > > > > IMenuService service = (IMenuService) > > getSite().getService(IMenuService.class); > > > > Is it the right way to do it? > > > > However, it seems that the BlueBerry2 directory is not referenced at > > all by the rest of the MITK project. Is MITK about to switch from > > BlueBerry to BlueBerry2? If it is not going to happen soon, is it > > possible to add a new menu item with BlueBerry (1)? > > > > My MITK sources are not the latest, I downloaded them from the old SVN > > repo less then 3 months ago. > > > > Thanks, > > Miklos > > > > ------------------------------------------------------------------------------ > > What Every C/C++ and Fortran developer Should Know! > > Read this article and learn how Intel has extended the reach of its > > next-generation tools to help Windows* and Linux* C/C++ and Fortran > > developers boost performance applications - including clusters. > > http://p.sf.net/sfu/intel-dev2devmay > > _______________________________________________ > > mitk-users mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/mitk-users > > > > > ------------------------------ > > Message: 3 > Date: Fri, 20 May 2011 12:23:01 +0200 > From: Miklos Espak <[email protected]> > Subject: Re: [mitk-users] Add menu entry with BlueBerry2? > To: Sascha Zelzer <[email protected]> > Cc: [email protected] > Message-ID: <[email protected]> > Content-Type: text/plain; charset=ISO-8859-1 > > Hi Sascha, > > it is good to know that it is possible, and I think I got enough > information to start with. > > Thanks, > Miklos > > On Fri, May 20, 2011 at 11:41 AM, Sascha Zelzer > <[email protected]> wrote: > > Hi Miklos, > > > > One of the goals in BlueBerry2 was to support an extendible menu and > > toolbar infrastructure. This work had to be post-poned and BlueBerry2 is > > discontinued for several reasons. In fact, the directory has been > > removed from the git master branch a couple of days ago. > > > > In BlueBerry (1), menus and toolbar items are just created centrally in > > a class inheriting from berry::WorkbenchWindowAdvisor. See for example > > QmitkWorkbenchwindowAdvisor in > > CoreUI/Bundles/org.mitk.gui.qt.application or > > QmitkExtWorkbenchWindowAdvisor in Modules/Bundles/org.mitk.gui.qt.ext . > > > > If you want to have full control over the menu structure in your own > > application, you would have to create your own > > berry::WorkbenchWindowAdvisor and berry::IApplication implementations. > > External users of MITK/BlueBerry have successfully done that. > > > > Hope that helps, > > > > Sascha > > > > On 05/20/2011 08:02 AM, Miklos Espak wrote: > >> Hi, > >> > >> I would like to provide a new menu item by the perspective I made. I > >> found that in the BlueBerry2 directory there is an IMenuService > >> interface that can be accessed by the selection service this way: > >> > >> IMenuService service = (IMenuService) > >> getSite().getService(IMenuService.class); > >> > >> Is it the right way to do it? > >> > >> However, it seems that the BlueBerry2 directory is not referenced at > >> all by the rest of the MITK project. Is MITK about to switch from > >> BlueBerry to BlueBerry2? If it is not going to happen soon, is it > >> possible to add a new menu item with BlueBerry (1)? > >> > >> My MITK sources are not the latest, I downloaded them from the old SVN > >> repo less then 3 months ago. > >> > >> Thanks, > >> Miklos > >> > >> ------------------------------------------------------------------------------ > >> What Every C/C++ and Fortran developer Should Know! > >> Read this article and learn how Intel has extended the reach of its > >> next-generation tools to help Windows* and Linux* C/C++ and Fortran > >> developers boost performance applications - including clusters. > >> http://p.sf.net/sfu/intel-dev2devmay > >> _______________________________________________ > >> mitk-users mailing list > >> [email protected] > >> https://lists.sourceforge.net/lists/listinfo/mitk-users > > > > > > ------------------------------------------------------------------------------ > > What Every C/C++ and Fortran developer Should Know! > > Read this article and learn how Intel has extended the reach of its > > next-generation tools to help Windows* and Linux* C/C++ and Fortran > > developers boost performance applications - including clusters. > > http://p.sf.net/sfu/intel-dev2devmay > > _______________________________________________ > > mitk-users mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/mitk-users > > > > > > ------------------------------ > > Message: 4 > Date: Tue, 24 May 2011 10:42:12 +0200 > From: [email protected] > Subject: Re: [mitk-users] Building step1 of tutorial > To: Sascha Zelzer <[email protected]> > Cc: [email protected] > Message-ID: <[email protected]> > Content-Type: text/plain; charset="utf-8" > > Hi Sascha, > > first I did a build in a new build directory and linked against the itk/vtk > etc of the superbuild. Now I followed your advice and did a rebuild in the > MITK-build direcotry of the superbuild. However, I always have the same > problem: > > > 13.83 blueberry.osgi.bundleloader ERROR: Cannot load library: > C:\Develop\MITK2_superbuild\MITK-build\bin\ExtBundles\org.mitk.gui.qt.tofutil\bin\Debug\liborg_mitk_gui_qt_tofutild.dll > 13.84 blueberry.osgi.iconfigurationelement ERROR: Error loading class: Not > found: ::QmitkToFUtilView > 13.85 blueberry.ui.wrkbncPlg: LOG: Unable to create view ID > org.mitk.views.tofutil: Part initialization error: ::QmitkToFUtilView > > Similar errors occur for QmitkToFTutorialView > The other plugins are correctly loaded. > > Best > Timm > > > > Betreff: Re: [mitk-users] Building step1 of tutorial > > > Hi Timm, > > > > Do you mean with "Redoing it without the superbuild" that you pointed > > cmake (cmake-gui) to the build directory "MITK-build" inside your > > superbuild directory? That would be the right way to get access to all > > MITK CMake variables. > > > > Is it only the org_mitk_gui_qt_toftutorial bundle which can not be loaded? > > > > Best, > > Sascha > > > > On 05/20/2011 10:59 AM, [email protected] wrote: > > > Hi Sascha, > > > > > > thanks for you quick reply. It's working fine now with your Cmake File > > and a batch file to set up the correct environment with all mitk, itk, vtk > > etc. path in it. > > > > > > However, I would like to ask another question. I've compiled the > > superbuild and had no flag to set the TOF Hardwar enabled. Redoing it > > without the > > superbuild enabled me to set these options. Still, I get an error when I > > try to execute the ExtApp that the liborg_mitk_gui_qt_toftutoriald can not > > be > > loaded, although it's exactly in the path where the ExtApp is looking for > > it. I checked the plugin and manifest file but it seems ok. Do you have any > > idea? > > > > > > Thank you for your help > > > Timm > > > > > > > > -- > Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir > belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de > > > > ------------------------------ > > Message: 5 > Date: Tue, 24 May 2011 11:54:32 +0200 > From: "Seitel, Alexander" <[email protected]> > Subject: Re: [mitk-users] Building step1 of tutorial > To: "'[email protected]'" <[email protected]>, "Zelzer, Sascha" > <[email protected]> > Cc: "[email protected]" > <[email protected]> > Message-ID: > > <f9cbef185bb9b140a1a9edcb8d888540871ec04...@dkfzex01.ad.dkfz-heidelberg.de> > > Content-Type: text/plain; charset="iso-8859-1" > > Hi Timm, > > for activating ToF support when setting up a new MITK environment you should > basically use the following workflow: > > 1. Configure and generate superbuild of MITK with MITK_USE_OpenCV enabled > 2. Compile superbuild in the build configuration you desire (Debug/Release) > 3. Run CMake configuration of the MITK-build directory of the superbuild and > enable MITK_ENABLE_TOF_HARDWARE and according cameras (see also > http://www.mitk.org/wiki/MITK-ToF%20-%20Getting%20started) as well as desired > bundles ToFUtil / ToFTutorial > 4. Compile MITK-build using the same build configuration as for the superbuild > 5. Set the path to the vendor specific libraries in your environment variable > that they will be found on startup of ExtApp > > Did you follow this workflow when setting up your MITK? > Let me know if you have still problems. > > Best Regards, > Alex > > -----Urspr?ngliche Nachricht----- > Von: [email protected] [mailto:[email protected]] > Gesendet: Dienstag, 24. Mai 2011 10:42 > An: Zelzer, Sascha > Cc: [email protected] > Betreff: Re: [mitk-users] Building step1 of tutorial > > Hi Sascha, > > first I did a build in a new build directory and linked against the itk/vtk > etc of the superbuild. Now I followed your advice and did a rebuild in the > MITK-build direcotry of the superbuild. However, I always have the same > problem: > > > 13.83 blueberry.osgi.bundleloader ERROR: Cannot load library: > C:\Develop\MITK2_superbuild\MITK-build\bin\ExtBundles\org.mitk.gui.qt.tofutil\bin\Debug\liborg_mitk_gui_qt_tofutild.dll > 13.84 blueberry.osgi.iconfigurationelement ERROR: Error loading class: Not > found: ::QmitkToFUtilView > 13.85 blueberry.ui.wrkbncPlg: LOG: Unable to create view ID > org.mitk.views.tofutil: Part initialization error: ::QmitkToFUtilView > > Similar errors occur for QmitkToFTutorialView The other plugins are correctly > loaded. > > Best > Timm > > > > Betreff: Re: [mitk-users] Building step1 of tutorial > > > Hi Timm, > > > > Do you mean with "Redoing it without the superbuild" that you pointed > > cmake (cmake-gui) to the build directory "MITK-build" inside your > > superbuild directory? That would be the right way to get access to all > > MITK CMake variables. > > > > Is it only the org_mitk_gui_qt_toftutorial bundle which can not be loaded? > > > > Best, > > Sascha > > > > On 05/20/2011 10:59 AM, [email protected] wrote: > > > Hi Sascha, > > > > > > thanks for you quick reply. It's working fine now with your Cmake > > > File > > and a batch file to set up the correct environment with all mitk, itk, > > vtk etc. path in it. > > > > > > However, I would like to ask another question. I've compiled the > > superbuild and had no flag to set the TOF Hardwar enabled. Redoing it > > without the superbuild enabled me to set these options. Still, I get > > an error when I try to execute the ExtApp that the > > liborg_mitk_gui_qt_toftutoriald can not be loaded, although it's > > exactly in the path where the ExtApp is looking for it. I checked the > > plugin and manifest file but it seems ok. Do you have any idea? > > > > > > Thank you for your help > > > Timm > > > > > > > > -- > Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit > bis zu 50,- Euro! https://freundschaftswerbung.gmx.de > > ------------------------------------------------------------------------------ > vRanger cuts backup time in half-while increasing security. > With the market-leading solution for virtual backup and recovery, you get > blazing-fast, flexible, and affordable data protection. > Download your free trial now. > http://p.sf.net/sfu/quest-d2dcopy1 > _______________________________________________ > mitk-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/mitk-users > > > > ------------------------------ > > ------------------------------------------------------------------------------ > vRanger cuts backup time in half-while increasing security. > With the market-leading solution for virtual backup and recovery, > you get blazing-fast, flexible, and affordable data protection. > Download your free trial now. > http://p.sf.net/sfu/quest-d2dcopy1 > > ------------------------------ > > _______________________________________________ > mitk-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/mitk-users > > > End of mitk-users Digest, Vol 60, Issue 13 > ****************************************** -- Best Regards, Junaid Naseer MS Digital Communications Technische Fakultät, CAU Kiel, [email protected] [email protected] +49 ( 0176 ) 564 560 71 ------------------------------------------------------------------------------ vRanger cuts backup time in half-while increasing security. With the market-leading solution for virtual backup and recovery, you get blazing-fast, flexible, and affordable data protection. Download your free trial now. http://p.sf.net/sfu/quest-d2dcopy1 _______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users
