Discussion:
[mitk-users] Editing an MITK plugin
Jernej Finžgar
2017-03-22 16:04:03 UTC
Permalink
Hello!

I have a question regarding MITK plugins; what would be the most
elegant/time efficient way (for a beginner in MITK development) to edit an
existing MITK plugin (for example the "Statistics" plugin). By editing I
mean for example keeping the layout as it is, and changing the algorithms
etc. Ideally, I would like to keep the original "Statistics" plugin intact,
and create and alter a copy of it, which would in the end be included in
the build.

Thank you in advance!

Best regards,

Jernej F.
Goch, Caspar Jonas
2017-03-22 16:27:59 UTC
Permalink
Hi Jernej,

I think you will be able to only pick one out of elegant/time efficient

As for quick and dirty:
The fastest way to get a new view would be to copy – paste – rename [1,2,3] in the same folder, rename the classes themselves and add the files/IDs to [4,5,6].

Nicer and longer:
Create a new plugin and port the desired functionality/layout to the new plugin, remember to switch it on in CMake.

More info at [7,8].

Best,
Caspar

[1] https://phabricator.mitk.org/source/mitk/browse/master/Plugins/org.mitk.gui.qt.measurementtoolbox/src/internal/QmitkImageStatisticsView.cpp
[2] https://phabricator.mitk.org/source/mitk/browse/master/Plugins/org.mitk.gui.qt.measurementtoolbox/src/internal/QmitkImageStatisticsView.h
[3] https://phabricator.mitk.org/source/mitk/browse/master/Plugins/org.mitk.gui.qt.measurementtoolbox/src/internal/QmitkImageStatisticsViewControls.ui
[4] https://phabricator.mitk.org/source/mitk/browse/master/Plugins/org.mitk.gui.qt.measurementtoolbox/src/internal/mitkPluginActivator.cpp
[5] https://phabricator.mitk.org/source/mitk/browse/master/Plugins/org.mitk.gui.qt.measurementtoolbox/files.cmake
[6] https://phabricator.mitk.org/source/mitk/browse/master/Plugins/org.mitk.gui.qt.measurementtoolbox/plugin.xml
[7] http://docs.mitk.org/nightly/NewPluginPage.html
[8] http://docs.mitk.org/nightly/NewViewPage.html


Von: Jernej FinÅŸgar [mailto:***@gmail.com]
Gesendet: Mittwoch, 22. MÀrz 2017 17:04
An: mitk-***@lists.sourceforge.net
Betreff: [mitk-users] Editing an MITK plugin

Hello!

I have a question regarding MITK plugins; what would be the most elegant/time efficient way (for a beginner in MITK development) to edit an existing MITK plugin (for example the "Statistics" plugin). By editing I mean for example keeping the layout as it is, and changing the algorithms etc. Ideally, I would like to keep the original "Statistics" plugin intact, and create and alter a copy of it, which would in the end be included in the build.

Thank you in advance!

Best regards,

Jernej F.
Jernej Finžgar
2017-04-06 13:48:35 UTC
Permalink
Hello,

I have a few questions about the "quick and dirty" method: is the correct
way for editing a plugin by changing the plugin's source cloned from git,
then generating it with cmake and building it with for example Visual
Studio, or is it possible to edit a plugin in the Visual Studio project
generated by cmake? The second option would seem more developer-friendly,
since it enables one to use the full benefits of developing with Visual
Studio, but if that is the case, do (and if so in what manner) the changes
made in the VS project then propagate back to the original source, cloned
from git.

Thank you and best regards,

Jernej
Post by Jernej Finžgar
Hello!
I have a question regarding MITK plugins; what would be the most
elegant/time efficient way (for a beginner in MITK development) to edit an
existing MITK plugin (for example the "Statistics" plugin). By editing I
mean for example keeping the layout as it is, and changing the algorithms
etc. Ideally, I would like to keep the original "Statistics" plugin intact,
and create and alter a copy of it, which would in the end be included in
the build.
Thank you in advance!
Best regards,
Jernej F.
Goch, Caspar Jonas
2017-04-18 15:07:04 UTC
Permalink
Hi Jernej,

if you just want to change what a button does for example, you can easily do this by changing the corresponding code from within Visual Studio. However setting up a new plugin requires the use of CMake.

Best,
Caspar

Von: Jernej FinÅŸgar [mailto:***@gmail.com]
Gesendet: Donnerstag, 6. April 2017 15:49
An: mitk-***@lists.sourceforge.net
Betreff: Re: [mitk-users] Editing an MITK plugin

Hello,

I have a few questions about the "quick and dirty" method: is the correct way for editing a plugin by changing the plugin's source cloned from git, then generating it with cmake and building it with for example Visual Studio, or is it possible to edit a plugin in the Visual Studio project generated by cmake? The second option would seem more developer-friendly, since it enables one to use the full benefits of developing with Visual Studio, but if that is the case, do (and if so in what manner) the changes made in the VS project then propagate back to the original source, cloned from git.

Thank you and best regards,

Jernej

2017-03-22 17:04 GMT+01:00 Jernej FinÅŸgar <***@gmail.com<mailto:***@gmail.com>>:
Hello!

I have a question regarding MITK plugins; what would be the most elegant/time efficient way (for a beginner in MITK development) to edit an existing MITK plugin (for example the "Statistics" plugin). By editing I mean for example keeping the layout as it is, and changing the algorithms etc. Ideally, I would like to keep the original "Statistics" plugin intact, and create and alter a copy of it, which would in the end be included in the build.

Thank you in advance!

Best regards,

Jernej F.

Loading...