Hi Andrea,

welcome to MITK. Loading an image into a data storage is shown in part II of 
the first tutorial step [1]. In step 9 [2] you can see that your view, commonly 
called "plugin", has a derived method named GetDataStorage() to get the 
standard data storage, which is represented by the Data Manager. So in a 
nutshell, in your button click handler, write something like:

mitk::IOUtil::Load("path/to/my/nifti/image", this->GetDataStorage());


Best,

Stefan


[1] http://docs.mitk.org/2016.11/Step01Page.html

[2] http://docs.mitk.org/2016.11/Step09Page.html

?

________________________________
Von: Andrea Schuepfer <[email protected]>
Gesendet: Dienstag, 24. April 2018 23:20
An: [email protected]
Betreff: [mitk-users] load volume in datamanager

Hi all,

I'm new to mitk and just created my own project to build a customized plugin. I 
have created it with the PluginGenerator and I'm trying to adapt the generated 
.cpp/.h/.ui files to do the following. I would like to have a button and when 
it is clicked, I would like to load a CT image stored in nifti format, add it 
to the datamanager and display the volume. The button functionality is working 
without any problems. However I couldn't find the information how I can load 
the image. The idea is to just have a string "Path-to-image" and then load the 
image with this information. Is this even possible? And is there somewhere an 
explanation/example how I can access the datamanager from my custom plugin.

Thank you already.

Best,
Andrea
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to