Hi Sascha,
I have been checking the documentation and the code around workbench and
I still cant understand how loading data is processed and where it is
stored. I apologize, but I don't understand what these mappers are. I
have been, for a week now, trying to understand and creating a simple
example-plugin for me.
Is there any place (docs, example, thread) that discusses and explain
this in detail?
I just want to know how to access the data I loaded into the workbench.
I am trying to do, on my plugin cpp:
mitk::DataStorage::Pointer m_DataStorage;
mitk::IDataStorageReference::Pointer ref =
this->GetDataStorageReference();
if (ref.IsNotNull()) m_DataStorage = ref->GetDataStorage();
else return;
mitk::DataNode::Pointer dnode = m_DataStorage->GetNode();
mitk::BaseData::Pointer bdata = dnode->GetData();
mitk::Geometry3D::Pointer geo3d = bdata->GetGeometry();
does this make any sense? I get a error while running this, like there
is no data. Should I get an "instance"? am I looking in the wrong place?
I am sorry but this is starting to be a little annoying.
Again, thank you for your patience.
Miguel
On 26.10.2012 12:03, Sascha Zelzer wrote:
> Hi Miguel,
>
> Independent of the workbench, Step 3, etc. the "mappers" (objects
> which are responsible for rendering stuff) are attached to a
> mitk::DataNode instance in mitkCoreObjectFactory.cpp (or some extra
> factories registered from other libraries). For example, look at
> mitkCoreObjectFactory.cpp:203, there a mitk::VolumeDataVtkMapper3D
> instance is created. The mappers usually get the data object by
> calling getData() which is inherited from mitk::Mapper. Have a look at
> the respective class documentation and API.
>
> Our volume rendering mappers usually resort to some VTK class (afaik).
> I think we also have some low-level mappers issuing OpenGL calls
> directly.
>
> Best,
> Sascha
>
> On 10/24/2012 03:12 PM, Miguel Nunes wrote:
>> Hello
>>
>> I still am having problems understanding where and how data is stored in
>> the workbench.
>>
>> I have been exploring the code and, for example, Step 3 is all about
>> Volume Rendering, and everything is done "magicaly". I can't find the
>> algorithm that accesses the data structure to generate and shoot rays (I
>> am supposing volume rendering is here done using some ray casting
>> algorithm).
>>
>> So... Help? Thank you!
>> Miguel
>>
>> On 22.10.2012 14:37, Miguel Nunes wrote:
>>> thank you Sascha!
>>>
>>> So, anyone around with experience in these data structures and
>>> generating the volume itself?
>>>
>>> On 19.10.2012 21:10, Sascha Zelzer wrote:
>>>> Hi,
>>>>
>>>> On 10/19/2012 05:39 PM, Miguel Nunes wrote:
>>>>> Hello again,
>>>>>
>>>>> As you may remember from my past topic, I am trying to build a
>>>>> plug-in
>>>>> with OpenCL to render volumes for medical imaging. I managed to
>>>>> create
>>>>> my plugin by generating also a new MITK-based project, compile
>>>>> everything, managed to have some basic OpenCL functions and Kernels
>>>>> running on the GPU (just for testing) and I am now looking forward to
>>>>> develop some cool stuff with MITK.
>>>> Great :)
>>>>
>>>>> I have been looking around the MITK documentation but I am finding
>>>>> hard
>>>>> to find the proper documentation regarding the data structures and
>>>>> how
>>>>> to generate a volume texture from a data set. Probably I didn't
>>>>> searched enough to find this information.
>>>>>
>>>>> Let`s say I want to open the Pic3D.nrrd example provided by you.
>>>>> How can
>>>>> I access the data, generate a Volume and having access to all the
>>>>> accelerating data structures (bounding boxes, for example)? where
>>>>> can I
>>>>> find this information?
>>>> I am not an expert in rendering techniques, there are other people in
>>>> the MITK team who might want to add some information here.
>>>>
>>>> I think the best way would be to write your own "mapper" and attach it
>>>> to a mitk::DataNode:
>>>>
>>>> http://docs.mitk.org/nightly-qt4/classmitk_1_1Mapper.html
>>>>
>>>> http://docs.mitk.org/nightly-qt4/classmitk_1_1DataNode.html#a51a8601ffc2e3b94a393adad060b4b90
>>>>
>>>>
>>>>
>>>>
>>>> Have a look at some mappers in the MITK source code how they access
>>>> the data and generate visual output.
>>>>
>>>> There is also a factory mechanism which you could use later to
>>>> "permanently" add your mapper to mitk::DataNodes.
>>>>
>>>> Unfortunately, I don't know of any nice tutorial explaining the
>>>> technique in detail.
>>>>
>>>>> Also, and just out of curiosity, how can I deactivate the 4
>>>>> visualization widgets present in the "display" tab?
>>>> You can switch off the MITK_BUILD_org.mitk.gui.qt.stdmultiwidgeteditor
>>>> CMake variable in your MITK build configuration. You then need to
>>>> provide your own "render window editor".
>>>>
>>>> Best,
>>>> Sascha
>>>>
>>>>> Kind regards,
>>>>> Miguel
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>>
>>>>>
>>>>>
>>>>> Everyone hates slow websites. So do we.
>>>>> Make your web apps faster with AppDynamics
>>>>> Download AppDynamics Lite for free today:
>>>>> http://p.sf.net/sfu/appdyn_sfd2d_oct
>>>>> _______________________________________________
>>>>> mitk-users mailing list
>>>>> [email protected]
>>>>> https://lists.sourceforge.net/lists/listinfo/mitk-users
>>
>
------------------------------------------------------------------------------
The Windows 8 Center - In partnership with Sourceforge
Your idea - your app - 30 days.
Get started!
http://windows8center.sourceforge.net/
what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users