Hi Noelia,
To create a new DataEntity type, you need to create a new class
derived from DataEntityImpl and register it to the framework. There are
several example in the MITKPlugin, in the class ProcessorCollective. If you
take a look at Core::SignalImpl, you will see that is very simple class.
Basically, this class contains an internal pointer to your concrete
implementation and provides functions to retrieve and set the pointer. In
the future, you could add more representations for the same type. For
example, a matrix can be implemented using blMatrix, vnl matrix or boost
matrix. DataEntity will allow you to switch between each of these
implementations automatically depending on the requested data in your
processor.
You also need to add a new type in the enum DataEntityType. For
example if it's a matrix data type, you can add MatrixTypeId. However, if
you want your plugin to be compatible with the other plugins of
GIMIAS-1.4.1, you cannot change the include files of the Framework. Then you
need to reuse one of the already available types. I recommend you to take a
look at coreDataEntityTypes.h and check what is the most suitable type
identifier. For a matrix, it could be NumericDataTypeId.
After you create your implementation, you could also need to create
a reader/writer for your new type. There are several examples of
readers/writers in MITKPlugin. If you don't have a specific format, I
recommend you to use XML. You can use TinyXML to read and write files. For
an example, you can take a look at blXMLTagMapReader.cpp and
blXMLTagMapWriter.cpp.
Regarding the visualization of your data type, the simplest solution
is to create a widget that takes your new data type as input. However, in
order to support custom working areas with multiple windows, it will be
better to create a specific RenderingTree and RenderWindow, like is done in
CMGUIPlugin. But this is something we could plan for the future, when the
data type is more mature.
Best,
Xavi
------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
Gimias-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gimias-developers