diff --git a/Core/Code/DataManagement/mitkNodePredicateSource.cpp b/Core/Code/DataManagement/mitkNodePredicateSource.cpp index bba60312aa..1edc08bf7d 100644 --- a/Core/Code/DataManagement/mitkNodePredicateSource.cpp +++ b/Core/Code/DataManagement/mitkNodePredicateSource.cpp @@ -1,41 +1,41 @@ /*========================================================================= Program: Medical Imaging & Interaction Toolkit Language: C++ Date: $Date$ Version: $Revision$ Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #include "mitkNodePredicateSource.h" mitk::NodePredicateSource::NodePredicateSource(mitk::DataNode* n, bool allsources, mitk::DataStorage* ds) : NodePredicateBase(), m_BaseNode(n), m_SearchAllSources(allsources), m_DataStorage(ds) { } mitk::NodePredicateSource::~NodePredicateSource() { } -bool mitk::NodePredicateSource::CheckNode(const mitk::DataNode* node) const +bool mitk::NodePredicateSource::CheckNode(const mitk::DataNode* childNode) const { if(m_DataStorage && m_BaseNode) { const mitk::DataStorage::SetOfObjects::STLContainerType sources = - m_DataStorage->GetSources(node, 0, !m_SearchAllSources)->CastToSTLConstContainer(); + m_DataStorage->GetSources(childNode, 0, !m_SearchAllSources)->CastToSTLConstContainer(); return std::find(sources.begin(), sources.end(), m_BaseNode) != sources.end(); } return false; } diff --git a/Core/Code/DataManagement/mitkNodePredicateSource.h b/Core/Code/DataManagement/mitkNodePredicateSource.h index 3fa8d9aafb..cf67402da3 100644 --- a/Core/Code/DataManagement/mitkNodePredicateSource.h +++ b/Core/Code/DataManagement/mitkNodePredicateSource.h @@ -1,63 +1,63 @@ /*========================================================================= Program: Medical Imaging & Interaction Toolkit Language: C++ Date: $Date$ Version: $Revision$ Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #ifndef MITKNODEPREDICATESOURCE_H_HEADER_INCLUDED_ #define MITKNODEPREDICATESOURCE_H_HEADER_INCLUDED_ #include "mitkNodePredicateBase.h" #include "mitkDataStorage.h" #include "mitkDataNode.h" #include "mitkWeakPointer.h" namespace mitk { //##Documentation //## @brief Predicate that evaluates if the given node is a direct or indirect source node of a specific node //## //## @warning Calling CheckNode() can be computationally quite expensive for a large DataStorage. //## Alternatively mitk::StandaloneDataStorage::GetSources() can be used //## //## @ingroup DataStorage class MITK_CORE_EXPORT NodePredicateSource : public NodePredicateBase { public: mitkClassMacro(NodePredicateSource, NodePredicateBase); mitkNewMacro3Param(NodePredicateSource, mitk::DataNode*, bool, mitk::DataStorage*); //##Documentation //## @brief Standard Destructor virtual ~NodePredicateSource(); //##Documentation - //## @brief Checks, if the node is a source node of m_BaseNode (e.g. if m_BaseNode "was created from" node) - virtual bool CheckNode(const mitk::DataNode* node) const; + //## @brief Checks, if m_BaseNode is a source node of childNode (e.g. if childNode "was created from" m_BaseNode) + virtual bool CheckNode(const mitk::DataNode* childNode) const; protected: //##Documentation //## @brief Constructor - This class can either search only for direct source objects or for all source objects NodePredicateSource(mitk::DataNode* n, bool allsources, mitk::DataStorage* ds); mitk::WeakPointer m_BaseNode; bool m_SearchAllSources; mitk::WeakPointer m_DataStorage; }; } // namespace mitk #endif /* MITKNODEPREDICATESOURCE_H_HEADER_INCLUDED_ */