Hi Matthias, sorry but I can't reproduce this issue (neither 2016.11 nor 
2018.04-beta). Also, the check if a DataNode contains data or not boils down to 
dataNode->GetData() == nullptr, so I really think that there is something else 
happening in your code.

Best,
Stefan

-----Original Message-----
From: Noll, Matthias [mailto:matthias.n...@igd.fraunhofer.de] 
Sent: Donnerstag, 1. November 2018 10:23
To: 'mitk-users'
Subject: Re: [mitk-users] helper objects are not visible

Hi everybody,

I've encountered an issue when loading an .mitk project file which is related 
to the below linked "Show nodes containing no data" flag issue from 2011.

So what's happening: We generate some vtkPolygons from segmentations of CT or 
MRI image data. The polys are remeshed and stored in the mitk::DataStorage 
using mitk::Surfaces. Now, there seems to be an issue with saving and loading 
polygons and here's why I think that. When I load the .mitk file, only the data 
nodes that previously held some image data are shown in the DataStorage. The 
data nodes belonging to the polygons are hidden due to the "containing no data" 
option in the DataManager settings. However, the polygons are still rendered in 
the standard views. This confused me at first, because I could see the polygons 
but the corresponding data nodes were missing. This meant I could not turn off 
the rendering of the surfaces. When I found out this is because of the option 
"Show nodes containing no data" I was confused.

My thoughts: The polygons are stored in the mitk::DataStorage as 
mitk::Surfaces. The mitk::Surface class derives from mitk::BaseData and thus is 
an mitk::DataObject. I would expect all nodes that hold some mitk::DataObject 
to be handled similarly on save and load, with some exceptions e.g. if a flag 
like "helper node" is present in the nodes' properties. 

I've observed that after loading the polygon nodes' context option "details" 
does not show anything anymore. Before saving, it showed all the information 
about the internal polydata. I believe because of that missing data the nodes 
are put into the "containing no data" category. But since they are rendered and 
actually hold the polygon data still, they should not fall into that category. 
I think this is a bug. Correct me if I'm wrong or if this is intended behavior.

Kind regards,
Matthias


-----Original Message-----
From: Seitel, Alexander <a.sei...@dkfz-heidelberg.de> 
Sent: Mittwoch, 10. August 2011 16:19
To: 'Miklos Espak' <esp...@gmail.com>
Cc: 'mitk-users' <mitk-users@lists.sourceforge.net>
Subject: Re: [mitk-users] helper objects are not visible

Hi Miklos,

we now added a preference "Show nodes containing no data" to the preference 
page of the DataManager that allows you to show those nodes that contain no 
data. Thus, you should be able to configure your application to meet your 
requirements.

If you still encounter any problems please let us know.

Best,
Alex

-----Ursprüngliche Nachricht-----
Von: Miklos Espak [mailto:esp...@gmail.com]
Gesendet: Donnerstag, 4. August 2011 12:06
An: Müller, Michael
Cc: mitk-users
Betreff: Re: [mitk-users] helper objects are not visible

Hi Michael,

that is great, this "Show nodes containing no data" option is exactly what I 
miss.
Thank you for investigating the problem!

Best,
Miklos

On Thu, Aug 4, 2011 at 11:20 AM, Müller, Michael 
<michael.muel...@dkfz-heidelberg.de> wrote:
> Hi Miklos,
>
> we openend a bug on this issue (http://bugs.mitk.org/show_bug.cgi?id=8920) 
> and we decided to add another preference which allows the user to see all 
> helper objects including those without a data object. The error you mentioned 
> is raised by the datamanager who expects that each node contains a data 
> object. It does not necessarily mean something`s going wrong. We will 
> investigate any side effects and report them in the bug and let you know.
>
> Best,
> Michael
>
> -----Ursprüngliche Nachricht-----
> Von: Miklos Espak [mailto:esp...@gmail.com]
> Gesendet: Dienstag, 2. August 2011 19:30
> An: Müller, Michael
> Cc: mitk-users
> Betreff: Re: [mitk-users] helper objects are not visible
>
> Hi Michael,
>
> I modified the code as you said. I enabled viewing nodes without data.
> I found that helper object is not the feature I needed, because after 
> the modification some nodes appeared that are not supposed to be seen 
> by the user. So I disabled helper objects in the preferences.
>
> The code looks like this, the old version is commented:
>
>  if (! m_ShowHelperObjects)
>  {
>    //hide helper objects....
> //    m_Predicate = mitk::NodePredicateAnd::New(dataIsNotNull,
> isNotHelperObject);
>    m_Predicate = isNotHelperObject;
>  }
>  else
>  {
>    //show helper objects
> //    m_Predicate = dataIsNull;
>    m_Predicate = mitk::NodePredicateOr::New(dataIsNull,
> dataIsNotNull);
>  }
>
> I did not find a "true" predicate, and instead of creating one by 
> subclassing, I used this ugly trick.
>
> For the first sight it seems to work well, however, there was probably 
> an intention behind not showing nodes without data. Do you know if it 
> can cause problems later? What I found for now, is the following 
> message in the output:
>
> #5.570# ERROR: WARNING: No image, too many (>2) or two equal images 
> were selected.
>
> Thank you!
>
> Regards,
> Miklos
>
>
> On Fri, Jul 29, 2011 at 9:24 AM, Müller, Michael 
> <michael.muel...@dkfz-heidelberg.de> wrote:
>> Hi Miklos,
>>
>> well no, you dont need to use fake images. You may use the helper objects 
>> for organizing your nodes in a way that you want. It is just that the 
>> DataManager will not show this nodes. Nodes marked as "helper objects" and 
>> contain data are meant for nodes that should be rendered but not accessible 
>> by the user, e.g. the bounding box used by the ImageCropper bundle. Do not 
>> forget that the DataStorage is not a tree-like structure although the 
>> DataManager shows it in a TreeView. This is why we decided not to use 
>> "organizer" nodes any more.
>> But feel free to change this behavior: The class QmitkDataStorageTreeModel 
>> is responsible for what is shown in the DataManager. You will find the 
>> method "SetShowHelperObjects"- here you will find the predicate 
>> "dataIsNotNull" for the data selection. Just remove it and your nodes should 
>> show up if the preference is enabled.
>>
>> Regards,
>> Michael
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Miklos Espak [mailto:esp...@gmail.com]
>> Gesendet: Donnerstag, 28. Juli 2011 23:00
>> An: Müller, Michael
>> Cc: mitk-users
>> Betreff: Re: [mitk-users] helper objects are not visible
>>
>> Hi,
>>
>> the name could have been anything, "helper node" was just an example.
>>
>> I am afraid I did not understand the concept behind helper nodes. I 
>> thought they are some "symbolic" nodes only for grouping other nodes, 
>> so they do not need to contain data. According to your mail I was 
>> wrong. But if they contain data like other nodes then what is the 
>> difference between helper and not helper nodes? Nothing? Is this only 
>> a flag?
>>
>> What I need is some nodes for grouping other nodes, but not 
>> containing data. Just for organizing the image nodes. Is there a way 
>> to achieve this? Shall I create a "fake" image (0x0 pixel) and assign 
>> it to such nodes?
>>
>> Thanks,
>> Miklos
>>
>> On Thu, Jul 28, 2011 at 11:26 AM, Müller, Michael 
>> <michael.muel...@dkfz-heidelberg.de> wrote:
>>> Hi Miklos,
>>>
>>> the code you posted is not correct- you need to set a bool property "helper 
>>> object" and not the name:
>>>
>>>        mitk::DataNode::Pointer helperNode = mitk::DataNode::New();
>>>        helperNode->SetName("awesome node");
>>>        helperNode->SetBoolProperty("helper object", true);
>>>        GetDataStorage()->Add(helperNode);
>>>        helperNode->SetVisibility(true);
>>>
>>> !!! But be aware that enabling the mentioned preference will only show up 
>>> helper objects that contain data. Helper objects without data will never be 
>>> shown.
>>> Hope that helps. If it is still not working, feel free to file a bug 
>>> on http://bugs.mitk.org
>>>
>>> Regards,
>>> Michael
>>>
>>> -----Ursprüngliche Nachricht-----
>>> Von: Miklos Espak [mailto:esp...@gmail.com]
>>> Gesendet: Dienstag, 12. Juli 2011 17:59
>>> An: mitk-users
>>> Betreff: [mitk-users] helper objects are not visible
>>>
>>> Hi,
>>>
>>> I would like to add some nodes to the Datamanager View that do not 
>>> contain images, they would just group some other nodes. Browsing the 
>>> MITK code I found that helper objects are for this. Showing helper 
>>> objects can be enabled/disabled from the Window / Preferences dialog.
>>> I enabled it but I still not see the nodes not containing images.
>>>
>>> The code I used to create a helper node is the following:
>>>
>>>        mitk::DataNode::Pointer helperNode = mitk::DataNode::New();
>>>        helperNode->SetName("helper node");
>>>        GetDataStorage()->Add(helperNode);
>>>        helperNode->SetVisibility(true);
>>>
>>> Is there something I missed?
>>> I added the code to the AwesomeApp, and built it with the HEAD.
>>>
>>> Regards,
>>> Miklos
>>>
>>> --------------------------------------------------------------------
>>> ---------- All of the data generated in your IT infrastructure is 
>>> seriously valuable.
>>> Why? It contains a definitive record of application performance, 
>>> security threats, fraudulent activity, and more. Splunk takes this 
>>> data and makes sense of it. IT sense. And common sense.
>>> http://p.sf.net/sfu/splunk-d2d-c2
>>> _______________________________________________
>>> mitk-users mailing list
>>> mitk-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/mitk-users
>>>
>>
>> ---------------------------------------------------------------------
>> ---------
>> Got Input?   Slashdot Needs You.
>> Take our quick survey online.  Come on, we don't ask for help often.
>> Plus, you'll get a chance to win $100 to spend on ThinkGeek.
>> http://p.sf.net/sfu/slashdot-survey
>> _______________________________________________
>> mitk-users mailing list
>> mitk-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/mitk-users
>>
>

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA The must-attend 
event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and the 
tools developers use with it. Learn more about uberSVN and get a free download 
at:  http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to