Hi Nil,

there is a feature request about moving the IDataStorageService class to 
a module and make it accessible from a module context (which would 
publish it as a service for plugins as well) but it didn't get much 
attention yet: http://bugs.mitk.org/show_bug.cgi?id=17912

You are talking about an IO module, so assuming you have your own reader 
for trk files, there is an overload of IFileReader::Read which is passed 
the data storage instance which is to be filled with the read data. The 
workbench open file action always calls this method and allows you 
inspect the current contents.

If you are not using your own reader, how are you listening to "load 
events" of trk files?

Best,
Sascha

On 07/21/2015 08:08 PM, Nil Goyette wrote:
> Hi all,
>
> I know it's possible to access the DataStorage in a view (with
> GetDataStorage) and in a plugin (with the plugin's context and
> IDataStorageService), but I have a special case where I need the
> DataStorage in a IO module. Before you tell me "Don't do that", here's
> my use-case :)
>
> The user loads a .trk file, which may be linked to a reference image, so
> before loading the trk, we check the DataStorage if such an image exists
> and use its affine transformation if it does. Here I say a .trk file,
> but I will have the same problem with surfaces (some are not in world
> position)
>
> I currently handle the situation with a ugly hack, but I would be
> interested in a cleaner solution if there's one.
> Thank you.
>
> Nil
>
>
> ------------------------------------------------------------------------------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> _______________________________________________
> mitk-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mitk-users


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to