<commit_before>#include <itkCommand.h>
#include <mitkDataTreeFilter.h>
#include <mitkDataTreeFilterEvents.h>
#include <mitkDataTree.h>
#include <mitkDataTreeHelper.h>
#include <mitkPropertyManager.h>
#include <mitkShapeModelData.h>

#ifndef NDEBUG
#include <ostream>
  #define DEBUG_STATE           if (m_DEBUG) PrintStateForDebug(std::cout);

  #define DEBUG_MSG_STATE(MSG)  if (m_DEBUG) { \
                                              std::cout << "========================================" << std::endl; \
                                              std::cout << MSG << std::endl; \
                                              PrintStateForDebug(std::cout); \
                                             }

  #define DEBUG_MSG(MSG)        if (m_DEBUG) std::cout << MSG << std::endl;
#else
  #define DEBUG_STATE
  #define DEBUG_MSG_STATE(MSG)
  #define DEBUG_MSG(MSG)
#endif

namespace mitk
{

//------ Some common filter functions ----------------------------------------------------

/// default filter, lets everything except NULL pointers pass
bool IsDataTreeNode(DataTreeNode* node)
{
  return ( node!= 0 );
}
  
bool IsGoodDataTreeNode(DataTreeNode* node)
{
  return ( node!= 0 && node->GetData() );
}

bool IsImage(DataTreeNode* node)
{
  return ( node!= 0 && node->GetData() && dynamic_cast<Image*>( node->GetData() ) );
}

bool IsShapeModel(DataTreeNode* node)
{
  return ( node!= 0 && node->GetData() && dynamic_cast<ShapeModelData*>( node->GetData() ) );<commit_msg>removed filter. cannot be external<commit_after>#include <itkCommand.h>
#include <mitkDataTreeFilter.h>
#include <mitkDataTreeFilterEvents.h>
#include <mitkDataTree.h>
#include <mitkDataTreeHelper.h>
#include <mitkPropertyManager.h>

#ifndef NDEBUG
#include <ostream>
  #define DEBUG_STATE           if (m_DEBUG) PrintStateForDebug(std::cout);

  #define DEBUG_MSG_STATE(MSG)  if (m_DEBUG) { \
                                              std::cout << "========================================" << std::endl; \
                                              std::cout << MSG << std::endl; \
                                              PrintStateForDebug(std::cout); \
                                             }

  #define DEBUG_MSG(MSG)        if (m_DEBUG) std::cout << MSG << std::endl;
#else
  #define DEBUG_STATE
  #define DEBUG_MSG_STATE(MSG)
  #define DEBUG_MSG(MSG)
#endif

namespace mitk
{

//------ Some common filter functions ----------------------------------------------------

/// default filter, lets everything except NULL pointers pass
bool IsDataTreeNode(DataTreeNode* node)
{
  return ( node!= 0 );
}
  
bool IsGoodDataTreeNode(DataTreeNode* node)
{
  return ( node!= 0 && node->GetData() );
}

bool IsImage(DataTreeNode* node)
{
  return ( node!= 0 && node->GetData() && dynamic_cast<Image*>( node->GetData() ) );
{'fraction_non_alphanumeric': 0.19192634560906516, 'fraction_numerical': 0.002478753541076487, 'mean_word_length': 2.2621247113163974, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5205160', 'n_tokens_mistral': 807, 'n_tokens_neox': 792, 'n_words': 180}