Hi,
On 07/20/2013 09:44 AM, Miklos Espak wrote:
Hi Sascha,
thanks for dealing with this.
Sorry for the delay...
Hope you don't mind that I try to answer this question on behalf of
Gergely, since I know the problem well and he is out of office currently.
The import function is not a feasible option because it should be
possible to open some data simply by File/Open. Gergely introduced new
data types and wrote the reader/writer classes for them. There is e.g.
a "surgical plan" data type that contains "tractographies". The aim is
to be able to open tractographies from the file system and they should
be put under the same node if they belong to the same plan. (And the
plan should be created if there isn't any yet.)
A custom import function is currently the only way if you need to set-up
parent/child relationships when reading multiple data from the
filesystem. This certainly is a limitation of the current design. We are
working on a redesign of the reader/writer architecture for while now
and it will support your use case when it is finished. I am hoping to
have it in the September release, but cannot promise anything.
Another option would be to replace the File/Open menu item by a
modifying the workbench window advisor, but it's a kind of a hack.
As we discussed earlier among us, it might be a good idea to rename
the DataNodeFactory to DataNodeReader, since it's not really a factory
but an itk::ProcessObject. (Moreover, some local variables of this
type are already called dataNodeReaders in MITK itself what suggest
the same.)
Agreed. We will consider a renaming.
And there could be a DataNodeReaderFactory class that could provide a
customised data node reader for an application. In this way an
application could have a data node reader that has access to the data
storage and can put the newly created nodes to the required position
in the data hierarchy. (And could also create new nodes if necessary.)
The current mitk::DataNodeFactory or any of its base classes know
nothing about a mitk::DataStorage. Anyway, the above mentioned project
should allow you to do this.
This was our idea, basically, but of course we are happy to discuss
this and provide code if we agree in the design.
Thanks for all your input!
Sascha
Cheers,
Miklos
On 19 July 2013 15:59, Sascha Zelzer <[email protected]
<mailto:[email protected]>> wrote:
Hi Gergely,
sorry for the delay. Maybe you could elaborate a little more on what
your own DataNodeFactory is supposed to do?
Please note that the parent/child relationships between datanodes are
not encoded in the datanodes themselves, but in the datastorage in
which
they are put. So any kind of custom DataNodeFactory is unable to
influence parent/child information.
Mayby a custom import function for your data would just do? It
would use
the DataNodeFactory to create the datanodes and use your additional
knowledge about the to be imported data to generate the appropriate
parent/child hierarchy when putting the datanodes in a datastorage.
Best,
Sascha
On 07/05/2013 03:54 PM, Gergely Zombori wrote:
> Hi All,
> In my application I am trying to import a set of data that has a
> hierarchical structure. Let's say we have a "Container" node and
many
> "DataNode" under it.
>
> Currently when I read in my data the mitk::DataNodeFactory will put
> all my data objects into individual data nodes that are at the same
> level (topmost) of the data storage. As I checked in MITK it is hard
> coded to use the mitk::DataNodeFactory in every occasion to import
> data. However it would nicer if I could customize this
DataNodeFactory
> by overriding some of its methods.
>
> So the suggestion is to create a DataNodeFactory factory, that
> instantiates a preferred application specific factory. This way the
> application level I could register my own type of
DataNodeFactory and
> the system would use this whenever it is required to load data (and
> stuff it to a datanode).
>
> Does this sound reasonable?
>
> Cheers,
> Gergely
>
>
------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> mitk-users mailing list
> [email protected]
<mailto:[email protected]>
> https://lists.sourceforge.net/lists/listinfo/mitk-users
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
mitk-users mailing list
[email protected]
<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/mitk-users
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users