Medical Imaging Interaction Toolkit  2018.4.99-9a29ffc6
Medical Imaging Interaction Toolkit
mitk::PropertyFilter Class Reference

Consists of blacklist and whitelist entries. More...

#include <mitkPropertyFilter.h>

Public Types

enum  List { Blacklist, Whitelist }
 Specifies the type of a filter entry. More...
 

Public Member Functions

 PropertyFilter ()
 
 ~PropertyFilter ()
 
 PropertyFilter (const PropertyFilter &other)
 
PropertyFilteroperator= (PropertyFilter other)
 
void AddEntry (const std::string &propertyName, List list)
 Add a filter entry for a specific property. More...
 
std::map< std::string, BaseProperty::PointerApply (const std::map< std::string, BaseProperty::Pointer > &propertyMap) const
 Apply the filter to a property list. More...
 
bool HasEntry (const std::string &propertyName, List list) const
 Check if filter has specific entry. More...
 
bool IsEmpty () const
 Check if filter is empty. More...
 
void RemoveAllEntries (List list)
 Remove all entries from property filter. More...
 
void RemoveEntry (const std::string &propertyName, List list)
 Remove specific entry from property filter. More...
 

Detailed Description

Consists of blacklist and whitelist entries.

Blacklist filtering is less restrictive than whitelist filtering since you can filter out individual property names. If whitelist entries were added, all other property names are filtered out. In addition, whitelist entries are reduced by blacklist entries.

Definition at line 30 of file mitkPropertyFilter.h.

Member Enumeration Documentation

◆ List

Specifies the type of a filter entry.

Enumerator
Blacklist 

Blacklisted filter entries are filtered out.

Whitelist 

Whitelisted filter entries are the only entries that remain after filtering.

Definition at line 35 of file mitkPropertyFilter.h.

Constructor & Destructor Documentation

◆ PropertyFilter() [1/2]

mitk::PropertyFilter::PropertyFilter ( )

Definition at line 121 of file mitkPropertyFilter.cpp.

◆ ~PropertyFilter()

mitk::PropertyFilter::~PropertyFilter ( )

Definition at line 125 of file mitkPropertyFilter.cpp.

◆ PropertyFilter() [2/2]

mitk::PropertyFilter::PropertyFilter ( const PropertyFilter other)

Definition at line 130 of file mitkPropertyFilter.cpp.

Member Function Documentation

◆ AddEntry()

void mitk::PropertyFilter::AddEntry ( const std::string &  propertyName,
List  list 
)

Add a filter entry for a specific property.

Parameters
[in]propertyNameName of the property.
[in]listType of the filter entry.

Definition at line 140 of file mitkPropertyFilter.cpp.

Referenced by mitk::MultilabelObjectFactory::SetDefaultProperties().

◆ Apply()

std::map< std::string, mitk::BaseProperty::Pointer > mitk::PropertyFilter::Apply ( const std::map< std::string, BaseProperty::Pointer > &  propertyMap) const

Apply the filter to a property list.

Parameters
[in]propertyMapProperty list to which the filter is applied.
Returns
Filtered property list.

Definition at line 146 of file mitkPropertyFilter.cpp.

Referenced by mitk::PropertyFilters::ApplyFilter().

◆ HasEntry()

bool mitk::PropertyFilter::HasEntry ( const std::string &  propertyName,
List  list 
) const

Check if filter has specific entry.

Parameters
[in]propertyNameName of the property.
[in]listType of the filter entry.
Returns
True if property filter has specified entry, false otherwise.

Definition at line 152 of file mitkPropertyFilter.cpp.

◆ IsEmpty()

bool mitk::PropertyFilter::IsEmpty ( ) const

Check if filter is empty.

Returns
True if filter is empty, false otherwise.

Definition at line 157 of file mitkPropertyFilter.cpp.

Referenced by mitk::PropertyFilters::AddFilter(), and mitk::PropertyFilters::ApplyFilter().

◆ operator=()

mitk::PropertyFilter & mitk::PropertyFilter::operator= ( mitk::PropertyFilter  other)

Definition at line 134 of file mitkPropertyFilter.cpp.

References swap().

◆ RemoveAllEntries()

void mitk::PropertyFilter::RemoveAllEntries ( List  list)

Remove all entries from property filter.

Parameters
[in]listFilter list from which all entries are removed.

Definition at line 162 of file mitkPropertyFilter.cpp.

◆ RemoveEntry()

void mitk::PropertyFilter::RemoveEntry ( const std::string &  propertyName,
List  list 
)

Remove specific entry from property filter.

Parameters
[in]propertyNameName of property.
[in]listFilter list from which the entry is removed.

Definition at line 167 of file mitkPropertyFilter.cpp.


The documentation for this class was generated from the following files: