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 <[email protected]> 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:[email protected]] > 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 > <[email protected]> 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:[email protected]] >> 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 >> <[email protected]> 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:[email protected]] >>> 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 >>> [email protected] >>> 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 >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/mitk-users >> > ------------------------------------------------------------------------------ BlackBerry® 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 [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users
