Page MenuHomePhabricator

bug-16811-Also-print-out-properties-in-BaseData.patch

Authored By
wegner
Jan 15 2014, 5:00 PM
Size
1 KB
Referenced Files
None
Subscribers
None

bug-16811-Also-print-out-properties-in-BaseData.patch

From f82c64b9571615ae220f757f40a7a2322a867660 Mon Sep 17 00:00:00 2001
From: Ingmar Wegner <iwegner@gmx.de>
Date: Wed, 15 Jan 2014 15:04:13 +0100
Subject: [PATCH] adding output of base data properties
---
Core/Code/DataManagement/mitkBaseData.cpp | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/Core/Code/DataManagement/mitkBaseData.cpp b/Core/Code/DataManagement/mitkBaseData.cpp
index a48a9dd..c18755d 100644
--- a/Core/Code/DataManagement/mitkBaseData.cpp
+++ b/Core/Code/DataManagement/mitkBaseData.cpp
@@ -293,4 +293,19 @@ void mitk::BaseData::PrintSelf(std::ostream& os, itk::Indent indent) const
os << "NULL" << std::endl;
else
GetTimeGeometry()->Print(os, indent);
+
+ // print out all properties
+ PropertyList::Pointer propertyList = this->GetPropertyList();
+ if (propertyList.IsNotNull() && ! propertyList->IsEmpty() )
+ {
+ //general headline
+ os << "Properties of BaseData:" << std::endl;
+
+ const PropertyList::PropertyMap* map = propertyList->GetMap();
+ for (PropertyList::PropertyMap::const_iterator iter = map->begin(); iter != map->end(); iter++)
+ {
+ os << " " << (*iter).first << " " << (*iter).second->GetValueAsString() << std::endl;
+ }
+ }
}
+
--
1.7.9.msysgit.0

File Metadata

Mime Type
text/plain
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1063
Default Alt Text
bug-16811-Also-print-out-properties-in-BaseData.patch (1 KB)

Event Timeline

patch for feature request 16811