Unfortunately I do not have a system available where I can currently test the 
Kinect implementation anymore. Looking at your CMake configuration I wonder if 
the dependency to MitkKinect is necessary as this is a submodule of 
MitkTofHardware. 

An alternative way to access the correct image grabber would be to use the 
QmitkToFConnectionWidget which already handles the connection part: 
http://docs.mitk.org/nightly/classQmitkToFConnectionWidget.html

Completely reusing ToFUtil via the implemented micro services is also possible. 
For this a QmitkServiceListWidget has to be added to the own plugin and 
connected to the ServiceSelectionChanged signal. See e.g. the implementation of 
the QmitkToFScreenshotMaker inside the QmitkToFUtil plugin.



-----Original Message-----
From: afinster [mailto:afins...@stud.hs-heilbronn.de] 
Sent: Wednesday, May 6, 2020 11:49 AM
To: mitk-users@lists.sourceforge.net
Subject: Re: [mitk-users] Add Kinect to MITK

Hello,

this is my CMakeLists.txt:

project(org_mitk_gui_qt_workerobservation)

mitk_create_plugin(
   EXPORT_DIRECTIVE WORKEROBSERVATION_EXPORT
   EXPORTED_INCLUDE_SUFFIXES src
  MODULE_DEPENDS MitkQtWidgetsExt MitkToFHardware MitkToFProcessing MitkToFUI 
MitkKinect
)

and this my files.cmake:

set(CPP_FILES
  src/internal/Workerobservation_Activator.cpp
   src/internal/WorkerObservation.cpp

)

set(UI_FILES
   src/internal/WorkerObservationControls.ui
)

set(MOC_H_FILES
   src/internal/Workerobservation_Activator.h
   src/internal/WorkerObservation.h
)

# list of resource files which can be used by the plug-in # system without 
loading the plug-ins shared library, # for example the icon used in the menu 
and tabs for the # plug-in views in the workbench set(CACHED_RESOURCE_FILES
   resources/kinectIcon.png
   plugin.xml
)

# list of Qt .qrc files which contain additional resources # specific to this 
plugin set(QRC_FILES

)

When I copied the code from the tutorial to my plugin I can build the workbench 
correctly, but if I changed the device to kinectdevice 
(tofImageGrabber->SetCameraDevice(mitk::ToFCameraMITKPlayerDevice::New()); 
--> tofImageGrabber->SetCameraDevice(mitk::KinectDevice::New());)
the error appears.


I would be grateful if you could look into this.

Axel


---------------------------------------------------------------------
Am 2020-05-04 16:03, schrieb Seitel, Alexander:

     Hi Axel,

     Did you make sure that you set the plugin dependencies for your own
     plugin / module correctly? When using ToFImageGrabber a dependency to
     the Module MitkToFHardware needs to be added in the CMakeLists.txt of
     your plugin.

     Maybe you can share your configuration which would simplify
     troubleshooting.

     Thanks

     Alex

     P.S. Please also make sure that you keep the conversation on the
     mailing list.

     From: Axel Finsterle [mailto:axel...@web.de]
     Sent: Monday, May 4, 2020 3:33 PM
     To: Seitel, Alexander <a.sei...@dkfz-heidelberg.de>
     Subject: Aw: RE: [mitk-users] Add Kinect to MITK

     Hi Alex,

     I tried the ToFUtil Pluginl, it works fine with my kinect.

     I added the Path of the library folder of OpenNI with the library and
     the bin64 folder with the dll's to the environment path, but nothing
     changed. The same error appears.

     Best

     Axel

     Gesendet: Montag, 04. Mai 2020 um 13:28 Uhr
     Von: "Seitel, Alexander" <a.sei...@dkfz-heidelberg.de>
     An: "afinster" <afins...@stud.hs-heilbronn.de>,
     "mitk-users@lists.sourceforge.net" 
<mitk-users@lists.sourceforge.net>
     Betreff: RE: [mitk-users] Add Kinect to MITK

     Hi Axel,

     I assume that WorkerObservation is your own plugin in which you try to
     instantiate a ToFImage Grabber, right?
     Can you try to configure the MITK Workbench such that you also build
     the ToFUtil plugin and test if you can connect to the camera this way.
     I guess that there is a dependency problem which might potentially be
     solved by adding the library folder of OpenNI (containing the dll) to
     your environment path.

     Best
     Alex

     -----Original Message-----
     From: afinster [mailto:afins...@stud.hs-heilbronn.de]
     Sent: Saturday, May 2, 2020 5:25 PM
     To: mitk-users@lists.sourceforge.net
     Subject: [mitk-users] Add Kinect to MITK

     Hello MITK Pros,

     i got following Issue. I tried to add my kinect 360 to my new plugin.
     I followed these steps below.

     http://mitk.org/wiki/Using_Kinect_with_MITK-ToF

     My CMake settings:

     MITK_Kinect_INCLUDE DIR C:/Program Files/OpenNI/Include
     MITK_Kinect_LIB C:/Program Files/OpenNI/Lib64/openNI64.lib

     MITK_USE_TOF_KINECT true

     I configured and generated it.

     --> I added in my plugin CMakeLists.txt with depend MITKKinect and i
     was
     able to import the mitkKinectDevice.h file.

     Then i followed the toftutorial and tried to adjust it to the kinect.

     Now the problem is, when i tried to configure the ImageGrabber
     tofImageGrabber->SetCameraDevice(mitk::KinectDevice::New());
     i am getting the following error:

     2.06 core.mod.apputil.baseApp WARNING: Startup error:
     ctkPluginException: The plugin
     
"C:/MITK/bin/MITK-build/bin/plugins/Release/liborg_mitk_gui_qt_workerobservation.dll"

     could not be loaded: Cannot load library
     
C:\MITK\bin\MITK-build\bin\plugins\Release\liborg_mitk_gui_qt_workerobservation.dll:

     Das angegebene Modul wurde nicht gefunden.

     But in this giving folder the file is existing?

     Can anybody help pls :)

     I appreciate your help,

     Axel

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


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


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

Reply via email to