Hi, unfortunately, assigning a 0 to a predicate smart pointer causes crash. (Line 334 in QmitkDataStorageTreeModel.cpp)
I am not thinking of complex predicates, since if a formula contains these constants you can always simplify it. The case is that currently you can create an always true formula only with the "or" and "not" predicates. I started to maintain my own branch of MITK that I will rebase on the official master regularly. If I will have anything that can be interesting for the community, I will share it. If it is not like that, I won't force you to include. ;-) Best, Miklos On Thu, Aug 11, 2011 at 9:44 AM, Neuhaus, Jochen <[email protected]> wrote: > Hi, > > the predicates are exclusively used in the mitk::DataStorage, as far as I > know. All methods that use predicates there can be supplied with a NULL > Pointer instead of a predicate, which leads to the same behavior as a "true" > predicate. Right now, I can't think of a use case where one would need to > build a complex predicate that includes a "true" or "false" predicate. But on > the other hand, it certainly wouldn't hurt to have them in MITK. > Do you want to contribute these predicates to MITK? > > Best regards, > Jochen > > -----Ursprüngliche Nachricht----- > Von: Miklos Espak [mailto:[email protected]] > Gesendet: Mittwoch, 10. August 2011 18:20 > An: mitk-users > Betreff: [mitk-users] true and false predicates > > Hi, > > the API of node predicates is incomplete. There are "not", "and" and "or" > node predicates, but there is no "true" or "false". They could be useful to > turn off or on filtering nodes depending on a preference. > > There is a simple workaround, a "true" predicate can be simulated e.g. > by "or(<some condition>, not(<some condition>))", but it is not really nice > and efficient. And one could also derive his/her own class, of course, but it > might be useful to provide them by MITK. > > What do you think? > > Best, > Miklos > > ------------------------------------------------------------------------------ > 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 > [email protected] > https://lists.sourceforge.net/lists/listinfo/mitk-users > ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-dev2dev _______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users
