diff --git a/Base/OGSError.cpp b/Base/OGSError.cpp
index 434f578d11d74fbcd99bc85aae725e693d47b697..5620ee672100e18e3f859cd428633e28e8391ce6 100644
--- a/Base/OGSError.cpp
+++ b/Base/OGSError.cpp
@@ -17,7 +17,7 @@ OGSError::~OGSError()
  * Displays an error in a QMessageBox
  * \param e The error message.
  */
-void OGSError::box(QString e)
+void OGSError::box(const QString &e)
 {
 	box(e, "OpenGeoSys");
 }
@@ -28,7 +28,7 @@ void OGSError::box(QString e)
  * \param t The title of the message box
  * \sa QMessageBox
  */
-void OGSError::box(QString e, QString t)
+void OGSError::box(const QString &e, const QString &t)
 {
 	QMessageBox msgBox;
 	msgBox.setWindowTitle(t);
diff --git a/Base/OGSError.h b/Base/OGSError.h
index fd6ce0839cc904784298fc27c49ea3825e055e32..99de59763fb81e5faa9efd776894c23b2385b166 100644
--- a/Base/OGSError.h
+++ b/Base/OGSError.h
@@ -14,8 +14,8 @@ class QString;
 class OGSError
 {
 public:
-	static void box(QString e);
-	static void box(QString e, QString t);
+	static void box(const QString &e);
+	static void box(const QString &e, const QString &t);
 
 protected:
 	OGSError();
diff --git a/Base/TreeItem.cpp b/Base/TreeItem.cpp
index bbb4147690f34c82b6356d3797ee75222d91e3fb..0182de58ae57ef89dbf071675b5c7d7904b8a6d4 100644
--- a/Base/TreeItem.cpp
+++ b/Base/TreeItem.cpp
@@ -10,9 +10,8 @@
  * and the data associated with each column.
  */
 TreeItem::TreeItem(const QList<QVariant> &data, TreeItem* parent)
+: _itemData(data), _parentItem(parent)
 {
-	_parentItem = parent;
-	_itemData = data;
 }
 
 /**
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 782ced848cf52d9bbc85eff7560e8c4ffdd62800..8b8266403419fce02ed28582dee377539d33e6a5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,11 +4,13 @@ ENDIF (NOT VTK_FOUND)
 INCLUDE( ${VTK_USE_FILE} )
 
 # Find libgeotiff
-FIND_PACKAGE( LibTiff )
 FIND_PACKAGE( LibGeoTiff )
 IF(libgeotiff_FOUND)
 	ADD_DEFINITIONS(-Dlibgeotiff_FOUND)
 ENDIF() # libgeotiff_FOUND
+IF(NOT MSVC)
+	FIND_PACKAGE( LibTiff )
+ENDIF() # NOT MSVC
 
 SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO  "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /ZI /Od /Ob0")
 
diff --git a/DataView/CMakeLists.txt b/DataView/CMakeLists.txt
index 5ce494aed430c7106cf924ad0bfb862c90e0211e..4d4bbf31177c9cf4fc37862bdb0e33f3dfd53d94 100644
--- a/DataView/CMakeLists.txt
+++ b/DataView/CMakeLists.txt
@@ -2,13 +2,11 @@
 set( SOURCES
 	ColorTableModel.cpp
 	ColorTableView.cpp
-	ConditionModel.cpp
-	ConditionTabWidget.cpp
-	ConditionView.cpp
 	DatabaseConnection.cpp
 	DataView.cpp
 	DBConnectionDialog.cpp
 	ElementTreeModel.cpp
+	FEMConditionSetupDialog.cpp
 	GEOModels.cpp
 	GeoTabWidget.cpp
 	GeoTreeModel.cpp
@@ -16,6 +14,7 @@ set( SOURCES
 	GMSHPrefsDialog.cpp
 	LineEditDialog.cpp
 	ListPropertiesDialog.cpp
+	ModellingTabWidget.cpp
 	ModelTreeItem.cpp
 	MshEditDialog.cpp
 	MshItem.cpp
@@ -23,8 +22,12 @@ set( SOURCES
 	MshModel.cpp
 	MshQualitySelectionDialog.cpp
 	MshTabWidget.cpp
+	NewProcessDialog.cpp
 	OGSRaster.cpp
+	ProcessModel.cpp
+	ProcessView.cpp
 	QueryResultsDialog.cpp
+	SetNameDialog.cpp
 	StationTabWidget.cpp
 	StationTreeModel.cpp
 	StationTreeView.cpp	
@@ -34,13 +37,12 @@ set( SOURCES
 set( MOC_HEADERS
 	ColorTableModel.h
 	ColorTableView.h
-	ConditionModel.h
-	ConditionTabWidget.h
-	ConditionView.h
+	CondItem.h	
 	DatabaseConnection.h
 	DataView.h
 	DBConnectionDialog.h
 	ElementTreeModel.h
+	FEMConditionSetupDialog.h
 	GEOModels.h
 	GeoTabWidget.h
 	GeoTreeModel.h
@@ -48,11 +50,16 @@ set( MOC_HEADERS
 	GMSHPrefsDialog.h
 	LineEditDialog.h
 	ListPropertiesDialog.h
+	ModellingTabWidget.h
 	MshEditDialog.h
 	MshModel.h
 	MshQualitySelectionDialog.h
 	MshTabWidget.h
+	NewProcessDialog.h
+	ProcessModel.h
+	ProcessView.h
 	QueryResultsDialog.h
+	SetNameDialog.h
 	StationTabWidget.h
 	StationTreeModel.h
 	StationTreeView.h
@@ -61,7 +68,7 @@ set( MOC_HEADERS
 # Header files
 set( HEADERS
 	BaseItem.h
-	CondItem.h
+	ProcessItem.h
 	CondObjectListItem.h
 	GeoObjectListItem.h
 	GeoTreeItem.h
@@ -73,15 +80,17 @@ set( HEADERS
 
 # UI files
 set( UIS
-	ConditionTabWidgetBase.ui
 	DatabaseResultView.ui
 	DBConnection.ui
+	FEMConditionSetup.ui
 	GeoTabWidgetBase.ui
 	GMSHPrefs.ui
 	LineEdit.ui
+	ModellingTabWidgetBase.ui
 	MshEdit.ui
 	MshQualitySelection.ui
 	MshTabWidgetBase.ui
+	NewProcess.ui
 	StationTabWidgetBase.ui
 )
 
@@ -137,9 +146,9 @@ IF (OGS_USE_OPENSG)
 	INCLUDE_DIRECTORIES( ${OpenSG_INCLUDE_DIRS} )
 ENDIF (OGS_USE_OPENSG)
 
-IF (libtiff_FOUND AND libgeotiff_FOUND)
-	INCLUDE_DIRECTORIES( ${libtiff_INCLUDE_DIR}	${libgeotiff_INCLUDE_DIR} )
-ENDIF () # libtiff_FOUND AND libgeotiff_FOUND
+IF (libgeotiff_FOUND)
+	INCLUDE_DIRECTORIES( ${libgeotiff_INCLUDE_DIR} ${libgeotiff_INCLUDE_DIR}/libxtiff ${VTK_DIR}/../Utilities/vtktiff )
+ENDIF () # libgeotiff_FOUND
 
 # Put moc files in a project folder
 source_group("UI Files" REGULAR_EXPRESSION "\\w*\\.ui")
@@ -171,6 +180,6 @@ target_link_libraries( QtDataView
 IF (Shapelib_FOUND)
 	TARGET_LINK_LIBRARIES( QtDataView ${Shapelib_LIBRARIES} )
 ENDIF () # Shapelib_FOUND
-IF (libtiff_FOUND AND libgeotiff_FOUND)
-	TARGET_LINK_LIBRARIES( QtDataView ${libtiff_LIBRARIES} ${libgeotiff_LIBRARIES} )
-ENDIF () # libtiff_FOUND AND libgeotiff_FOUND
+IF (libgeotiff_FOUND)
+	TARGET_LINK_LIBRARIES( QtDataView ${libgeotiff_LIBRARIES} )
+ENDIF () # libgeotiff_FOUND
diff --git a/DataView/CondObjectListItem.h b/DataView/CondObjectListItem.h
index 873398fb323e7b5237b87e6aba7331a61a7a9c80..7f4934de393afccb30fc29ade99133fce0fe1da6 100644
--- a/DataView/CondObjectListItem.h
+++ b/DataView/CondObjectListItem.h
@@ -28,10 +28,9 @@ public:
 	/// Constructor for the TreeItem specifying FEM Conditions.
 	CondObjectListItem(const QList<QVariant> &data,
 	                   TreeItem* parent,
-	                   FEMCondition::CondType type,
+	                   const FEMCondition::CondType type,
 	                   const std::vector<GEOLIB::Point*>* points)
-		: TreeItem(data,
-		           parent), _vtkSource(VtkConditionSource::New()),  _type(type),
+		: TreeItem(data, parent), _vtkSource(VtkConditionSource::New()),  _type(type),
 		  _cond_vec(new std::vector<FEMCondition*>)
 	{
 		QString display_name = parent->data(0).toString().append(" - ").append(
@@ -54,20 +53,10 @@ public:
 	}
 
 	/// Returns the type of geo-objects contained in the subtree of this item.
-	FEMCondition::CondType getType() { return _type; }
+	FEMCondition::CondType getType() const { return _type; };
 
 	/// Returns the Vtk polydata source object
-	vtkPolyDataAlgorithm* vtkSource() const
-	{
-		return _vtkSource;
-		/*
-		   vtkThresholdPoints* threshold = vtkThresholdPoints::New();
-		   threshold->SetInputConnection(_vtkSource->GetOutputPort());
-		   threshold->ThresholdByUpper(-9998);
-		   threshold->Update();
-		   return threshold;
-		 */
-	}
+	vtkPolyDataAlgorithm* vtkSource() const	{ return _vtkSource; };
 
 private:
 	/// The Vtk data source object. This is the starting point for a Vtk data visualization pipeline.
diff --git a/DataView/ConditionModel.cpp b/DataView/ConditionModel.cpp
deleted file mode 100644
index 3192f3b2be44c5ed6a374ca6924c4f9b47f86d68..0000000000000000000000000000000000000000
--- a/DataView/ConditionModel.cpp
+++ /dev/null
@@ -1,266 +0,0 @@
-/**
- * \file ConditionModel.cpp
- * 18/10/2010 KR Initial implementation
- */
-
-// ** INCLUDES **
-#include "CondItem.h"
-#include "CondObjectListItem.h"
-#include "ConditionModel.h"
-#include "FEMCondition.h"
-#include "GEOObjects.h"
-#include "GeoObject.h"
-#include "GeoType.h"
-
-#include <QFileInfo>
-#include <vtkPolyDataAlgorithm.h>
-
-ConditionModel::ConditionModel( ProjectData &project, QObject* parent /*= 0*/ )
-	: TreeModel(parent), _project(project)
-{
-	QList<QVariant> rootData;
-	delete _rootItem;
-	rootData << "Name" << "Value" << "" << "" << "";
-	_rootItem = new TreeItem(rootData, NULL);
-}
-
-ConditionModel::~ConditionModel()
-{
-}
-
-int ConditionModel::columnCount( const QModelIndex &parent /*= QModelIndex()*/ ) const
-{
-	Q_UNUSED(parent)
-
-	return 2;
-}
-
-void ConditionModel::addConditionItem(FEMCondition* c)
-{
-	TreeItem* geoParent =
-	        this->getGEOParent(QString::fromStdString(c->getAssociatedGeometryName()), true);
-	CondObjectListItem* condParent = this->getCondParent(geoParent, c->getCondType());
-	if (condParent == NULL)
-		condParent = this->createCondParent(geoParent, c->getCondType());
-
-	if (condParent)
-	{
-		QList<QVariant> condData;
-		condData << QString::fromStdString(c->getGeoName()) << QString::fromStdString(
-		        c->getGeoTypeAsString());
-		CondItem* condItem = new CondItem(condData, condParent, c);
-		condParent->appendChild(condItem);
-		// add process information
-		QList<QVariant> pcsData;
-		pcsData << QString::fromStdString(convertProcessTypeToString(c->getProcessType()));
-		TreeItem* pcsInfo = new TreeItem(pcsData, condItem);
-		// add information on primary variable
-		QList<QVariant> pvData;
-		pvData <<
-		QString::fromStdString(convertPrimaryVariableToString(c->getProcessPrimaryVariable()));
-		TreeItem* pvInfo = new TreeItem(pvData, condItem);
-		// add distribution information
-		QList<QVariant> disData;
-		disData <<
-		QString::fromStdString(convertDisTypeToString(c->getProcessDistributionType()));
-		std::vector<double> dis_value = c->getDisValue();
-		TreeItem* disInfo;
-		if (!(c->getProcessDistributionType() == FiniteElement::LINEAR ||
-		      c->getProcessDistributionType() == FiniteElement::LINEAR_NEUMANN))
-		{
-			for (size_t i = 0; i < dis_value.size(); i++)
-				disData << dis_value[i];
-			disInfo = new TreeItem(disData, condItem);
-		}
-		else
-		{
-			size_t nVals = dis_value.size() / 2;
-			disData << static_cast<int>(nVals);
-			disInfo = new TreeItem(disData, condItem);
-			for (size_t i = 0; i < nVals; i++)
-			{
-				QList<QVariant> linData;
-				linData << dis_value[2 * i] << dis_value[2 * i + 1];
-				TreeItem* linInfo = new TreeItem(linData, disInfo);
-				disInfo->appendChild(linInfo);
-			}
-		}
-
-		condItem->appendChild(pcsInfo);
-		condItem->appendChild(pvInfo);
-		condItem->appendChild(disInfo);
-
-		condParent->addCondition(c);
-		reset();
-	}
-	else
-		std::cout <<
-		"Error in ConditionModel::addConditionItem() - Parent object not found..." <<
-		std::endl;
-}
-
-void ConditionModel::addConditions(std::vector<FEMCondition*> &conditions)
-{
-	for (size_t i = 0; i < conditions.size(); i++)
-	{
-		bool is_domain = (conditions[i]->getGeoType() == GEOLIB::GEODOMAIN) ? true : false;
-		const GEOLIB::GeoObject* object = this->getGEOObject(
-		        conditions[i]->getAssociatedGeometryName(),
-		        conditions[i]->getGeoType(),
-		        conditions[i]->getGeoName());
-		if (object || is_domain)
-		{
-			conditions[i]->setGeoObj(object);
-			_project.addCondition(conditions[i]);
-			this->addConditionItem(conditions[i]);
-		}
-		else
-			std::cout <<
-			"Error in ConditionModel::addConditions() - Specified geometrical object "
-			          << conditions[i]->getGeoName() <<
-			" not found in associated geometry..." <<
-			std::endl;
-	}
-}
-/*
-   bool ConditionModel::removeConditionItem(const QModelIndex &idx)
-   {
-    if (idx.isValid())
-    {
-        CondItem* item = dynamic_cast<CondItem*>(this->getItem(idx));
-        if (item)
-        {
-            emit conditionRemoved(this, idx);
-            TreeItem* parent = item->parentItem();
-            if (parent->childCount() <=1)
-                this->removeFEMConditions(QString::fromStdString(item->getItem()->getAssociatedGeometryName()), item->getItem()->getCondType());
-            else
-                parent->removeChildren(item->row(),1);
-            reset();
-            return true;
-        }
-    }
-
-    std::cout << "ConditionModel::removeCondition() - Specified index does not exist." << std::endl;
-    return false;
-   }
- */
-
-void ConditionModel::removeFEMConditions(const QString &geometry_name, FEMCondition::CondType type)
-{
-	TreeItem* geoParent = this->getGEOParent(geometry_name);
-	emit conditionsRemoved(this, geometry_name.toStdString(), type);
-
-	if ((type == FEMCondition::UNSPECIFIED) || (geoParent->childCount() <= 1)) //remove all conditions for the given geometry
-		removeRows(geoParent->row(), 1, QModelIndex());
-	else
-	{
-		TreeItem* condParent = getCondParent(geoParent, type);
-		removeRows(condParent->row(), 1, index(geoParent->row(), 0));
-	}
-	_project.removeConditions(geometry_name.toStdString(), type);
-}
-
-const GEOLIB::GeoObject* ConditionModel::getGEOObject(const std::string &geo_name,
-                                                      GEOLIB::GEOTYPE type,
-                                                      const std::string &obj_name) const
-{
-	if (type == GEOLIB::POINT)
-		return this->_project.getGEOObjects()->getPointVecObj(geo_name)->getElementByName(
-		               obj_name);
-	else if (type == GEOLIB::POLYLINE)
-		return this->_project.getGEOObjects()->getPolylineVecObj(geo_name)->
-		       getElementByName(obj_name);
-	else if (type == GEOLIB::SURFACE)
-		return this->_project.getGEOObjects()->getSurfaceVecObj(geo_name)->getElementByName(
-		               obj_name);
-	return NULL;
-}
-
-int ConditionModel::getGEOIndex(const std::string &geo_name,
-                                GEOLIB::GEOTYPE type,
-                                const std::string &obj_name) const
-{
-	bool exists(false);
-	size_t idx(0);
-	if (type == GEOLIB::POINT)
-		exists =
-		        this->_project.getGEOObjects()->getPointVecObj(geo_name)->
-		        getElementIDByName(
-		                obj_name,
-		                idx);
-	else if (type == GEOLIB::POLYLINE)
-		exists =
-		        this->_project.getGEOObjects()->getPolylineVecObj(geo_name)->
-		        getElementIDByName(
-		                obj_name,
-		                idx);
-	else if (type == GEOLIB::SURFACE)
-		exists =
-		        this->_project.getGEOObjects()->getSurfaceVecObj(geo_name)->
-		        getElementIDByName(
-		                obj_name,
-		                idx);
-
-	if (exists)
-		return idx;
-	return -1;
-}
-
-TreeItem* ConditionModel::getGEOParent(const QString &geoName, bool create_item)
-{
-	int nLists = _rootItem->childCount();
-	for (int i = 0; i < nLists; i++)
-		if (_rootItem->child(i)->data(0).toString().compare(geoName) == 0)
-			return _rootItem->child(i);
-
-	if (create_item)
-	{
-		QList<QVariant> geoData;
-		geoData << QVariant(geoName) << "";
-		TreeItem* geo = new TreeItem(geoData, _rootItem);
-		_rootItem->appendChild(geo);
-		return geo;
-	}
-	return NULL;
-}
-
-CondObjectListItem* ConditionModel::getCondParent(TreeItem* parent, FEMCondition::CondType type)
-{
-	int nLists = parent->childCount();
-	for (int i = 0; i < nLists; i++)
-		if (dynamic_cast<CondObjectListItem*>(parent->child(i))->getType() == type)
-			return dynamic_cast<CondObjectListItem*>(parent->child(i));
-	return NULL;
-}
-
-CondObjectListItem* ConditionModel::createCondParent(TreeItem* parent, FEMCondition::CondType type)
-{
-	QString condType(QString::fromStdString(FEMCondition::condTypeToString(type)));
-	QList<QVariant> condData;
-	condData << condType << "";
-
-	std::string geo_name = parent->data(0).toString().toStdString();
-	const std::vector<GEOLIB::Point*>* pnts = _project.getGEOObjects()->getPointVec(geo_name);
-	if (pnts)
-	{
-		CondObjectListItem* cond = new CondObjectListItem(condData, parent, type, pnts);
-		parent->appendChild(cond);
-		emit conditionAdded(this, parent->data(0).toString().toStdString(), type);
-		return cond;
-	}
-	return NULL;
-}
-
-vtkPolyDataAlgorithm* ConditionModel::vtkSource(const std::string &name,
-                                                FEMCondition::CondType type)
-{
-	TreeItem* geoParent = this->getGEOParent(QString::fromStdString(name));
-	if (geoParent)
-	{
-		CondObjectListItem* condParent = this->getCondParent(geoParent, type);
-		if (condParent)
-			return condParent->vtkSource();
-	}
-	return NULL;
-}
diff --git a/DataView/ConditionModel.h b/DataView/ConditionModel.h
deleted file mode 100644
index c77ebdba0c333ed5438359e49077f5fdec73ac7e..0000000000000000000000000000000000000000
--- a/DataView/ConditionModel.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * \file ConditionModel.h
- * 18/10/2010 KR Initial implementation
- */
-
-#ifndef CONDITIONMODEL_H
-#define CONDITIONMODEL_H
-
-// ** INCLUDES **
-#include "ProjectData.h"
-#include "TreeModel.h"
-
-class FEMCondition;
-class CondObjectListItem;
-class vtkPolyDataAlgorithm;
-
-namespace GEOLIB
-{
-class GeoObject;
-class GeoType;
-}
-
-/**
- * \brief A model for the ConditionView implementing a tree of FEM-Conditions (BCs, ICs, STs) as a double-linked list.
- * \sa TreeModel, ConditionView, TreeItem, CondObjectListItem
- */
-class ConditionModel : public TreeModel
-{
-	Q_OBJECT
-
-public:
-	ConditionModel(ProjectData &project, QObject* parent = 0);
-	~ConditionModel();
-
-	int columnCount(const QModelIndex& parent = QModelIndex()) const;
-	/// Returns the vtk source object for the specified subtree of a geometry with the given name.
-	vtkPolyDataAlgorithm* vtkSource(const std::string &name, FEMCondition::CondType type);
-
-public slots:
-	/// Adds a vector of FEM Conditions to the model. Objects in the vector can consist of BCs, ICs or STs in any combination and sequence.
-	void addConditions(std::vector<FEMCondition*> &conditions);
-
-	/// Removes a subtree (BCs, ICs, STs) from the the model. If all conditions for a given geometry are removed, this tree is completely removed.
-	void removeFEMConditions(const QString &geometry_name,
-	                         FEMCondition::CondType type = FEMCondition::UNSPECIFIED);
-
-private:
-	/// Adds a new FEM condition to the condition tree model.
-	void addConditionItem(FEMCondition* conditions);
-
-	/// Removes the FEM condition with the given index.
-	//bool removeConditionItem(const QModelIndex &idx);
-
-	/// Creates the TreeItem for one of the condition subtrees.
-	CondObjectListItem* createCondParent(TreeItem* parent, FEMCondition::CondType type);
-
-	/// Returns the subtree-item for a given type of condtion.
-	CondObjectListItem* getCondParent(TreeItem* parent, FEMCondition::CondType type);
-
-	/// Returns the subtree item for a geometry with the given name. If create_item is true, this item will be created if it doesn't exist yet.
-	TreeItem* getGEOParent(const QString &geoName, bool create_item = false);
-	/// Returns the geo object for a geometric item of the given name and type for the associated geometry.
-	const GEOLIB::GeoObject* getGEOObject(const std::string &geo_name,
-	                                      GEOLIB::GEOTYPE type,
-	                                      const std::string &obj_name) const;
-	/// Returns the index of a geometric item of the given name and type for the associated geometry.
-	int getGEOIndex(const std::string &geo_name,
-	                GEOLIB::GEOTYPE type,
-	                const std::string &obj_name) const;
-
-	ProjectData& _project;
-
-signals:
-	void conditionAdded(ConditionModel*, const std::string &name, FEMCondition::CondType);
-	void conditionsRemoved(ConditionModel*, const std::string &name, FEMCondition::CondType);
-};
-
-#endif // CONDITIONMODEL_H
diff --git a/DataView/ConditionTabWidget.cpp b/DataView/ConditionTabWidget.cpp
deleted file mode 100644
index 10323c838e336a25a3a3f7c8597ba69e3fc19763..0000000000000000000000000000000000000000
--- a/DataView/ConditionTabWidget.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * \file ConditionTabWidget.cpp
- * 2010/12/14 KR Initial implementation
- *
- * Implementation of StationTabWidget
- */
-
-// ** INCLUDES **
-#include "ConditionModel.h"
-#include "ConditionTabWidget.h"
-#include "TreeItem.h"
-
-ConditionTabWidget::ConditionTabWidget( QWidget* parent /*= 0*/ )
-	: QWidget(parent)
-{
-	setupUi(this);
-}
diff --git a/DataView/ConditionTabWidget.h b/DataView/ConditionTabWidget.h
deleted file mode 100644
index 076d6360d04ff17e574e8f0281d917a0d76c669c..0000000000000000000000000000000000000000
--- a/DataView/ConditionTabWidget.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * \file ConditionTabWidget.h
- * 2010/12/14 KR Initial implementation
- *
- */
-
-#ifndef CONDITIONTABWIDGET_H
-#define CONDITIONTABWIDGET_H
-
-// ** INCLUDES **
-#include "ui_ConditionTabWidgetBase.h"
-
-/**
- * \brief Widget containing the ConditionView.
- */
-class ConditionTabWidget : public QWidget, public Ui_ConditionTabWidgetBase
-{
-	Q_OBJECT
-
-public:
-	ConditionTabWidget(QWidget* parent = 0);
-};
-
-#endif // CONDITIONTABWIDGET_H
diff --git a/DataView/ConditionTabWidgetBase.ui b/DataView/ConditionTabWidgetBase.ui
deleted file mode 100644
index 2b9a2aaa98d8c5345ce7c8c19f98f5ce94f9f658..0000000000000000000000000000000000000000
--- a/DataView/ConditionTabWidgetBase.ui
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>ConditionTabWidgetBase</class>
- <widget class="QWidget" name="ConditionTabWidgetBase">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>250</width>
-    <height>500</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>Form</string>
-  </property>
-  <layout class="QVBoxLayout" name="verticalLayout">
-   <property name="margin">
-    <number>2</number>
-   </property>
-   <item>
-    <widget class="ConditionView" name="treeView"/>
-   </item>
-  </layout>
- </widget>
- <customwidgets>
-  <customwidget>
-   <class>ConditionView</class>
-   <extends>QTreeView</extends>
-   <header>ConditionView.h</header>
-  </customwidget>
- </customwidgets>
- <resources/>
- <connections/>
-</ui>
diff --git a/DataView/ConditionView.cpp b/DataView/ConditionView.cpp
deleted file mode 100644
index b865854f26d9afd691c17de17ec1140094b714b9..0000000000000000000000000000000000000000
--- a/DataView/ConditionView.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * \file ConditionView.cpp
- * 2010/12/13 KR Initial implementation
- */
-
-#include <QMenu>
-
-#include "CondItem.h"
-#include "CondObjectListItem.h"
-#include "ConditionModel.h"
-#include "ConditionView.h"
-
-ConditionView::ConditionView(QWidget* parent) : QTreeView(parent)
-{
-}
-
-void ConditionView::updateView()
-{
-	setAlternatingRowColors(true);
-	resizeColumnToContents(0);
-	setColumnWidth(1,50);
-	setColumnWidth(2,50);
-}
-
-void ConditionView::on_Clicked(QModelIndex idx)
-{
-	qDebug("%d, %d",idx.parent().row(), idx.row());
-}
-
-void ConditionView::selectionChanged( const QItemSelection &selected,
-                                      const QItemSelection &deselected )
-{
-	emit itemSelectionChanged(selected, deselected);
-	return QTreeView::selectionChanged(selected, deselected);
-}
-
-void ConditionView::contextMenuEvent( QContextMenuEvent* event )
-{
-	Q_UNUSED(event);
-
-	CondObjectListItem* item =
-	        dynamic_cast<CondObjectListItem*>(static_cast<ConditionModel*>(this->model())->
-	                                          getItem(this
-	                                                  ->
-	                                                  selectionModel()->currentIndex()));
-	if (item)
-	{
-		QMenu menu;
-		QAction* removeAction    = menu.addAction("Remove");
-		connect(removeAction, SIGNAL(triggered()), this, SLOT(removeCondition()));
-		menu.exec(event->globalPos());
-	}
-}
-
-void ConditionView::removeCondition()
-{
-	CondObjectListItem* item =
-	        dynamic_cast<CondObjectListItem*>(static_cast<ConditionModel*>(this->model())->
-	                                          getItem(this
-	                                                  ->
-	                                                  selectionModel()->currentIndex()));
-	QString geo_name = item->parentItem()->data(0).toString();
-	FEMCondition::CondType type = item->getType();
-	emit conditionsRemoved(geo_name, type);
-}
-/*
-   void ConditionView::removeAllConditions()
-   {
-    ConditionModel* model = static_cast<ConditionModel*>(this->model());
-
-    for (size_t j=0; j<3; j++)
-    {
-        QModelIndex parentIndex = model->index(j, 0, QModelIndex());
-        int nChildren = model->getItem(parentIndex)->childCount();
-        for (int i=nChildren; i>=0; i--)
-            emit requestConditionRemoval(model->index(i, 0, parentIndex));
-    }
-   }
- */
diff --git a/DataView/DBConnectionDialog.h b/DataView/DBConnectionDialog.h
index 7385933faaefbd1514a14098e36d9a6a0a293587..65bf87d45430a47af725374fb7ce2ceabe2276d4 100644
--- a/DataView/DBConnectionDialog.h
+++ b/DataView/DBConnectionDialog.h
@@ -8,7 +8,7 @@
 
 #include "ui_DBConnection.h"
 #include <QSqlQueryModel>
-#include <QtGui/QMainWindow>
+#include <QDialog>
 
 /**
  * \brief A dialog window for settung up a database connection
diff --git a/DataView/DataView.cpp b/DataView/DataView.cpp
index 9d500cdee8c8e8945483b5c9fb2452cc42c62e39..d77883d79b11a0ac10c711ce258b20ffd90f0b9a 100644
--- a/DataView/DataView.cpp
+++ b/DataView/DataView.cpp
@@ -80,13 +80,13 @@ void DataView::contextMenuEvent( QContextMenuEvent* event )
 		QAction* checkMeshAction  = menu.addAction("Check mesh quality...");
 		QAction* saveMeshAction   = menu.addAction("Save mesh...");
 		menu.addSeparator();
-		QAction* directSTAction   = menu.addAction("Add DIRECT source terms...");
+		QAction* directSTAction   = menu.addAction("Load DIRECT source terms...");
 		menu.addSeparator();
 		QAction* removeMeshAction = menu.addAction("Remove mesh");
 		connect(editMeshAction, SIGNAL(triggered()), this, SLOT(openMshEditDialog()));
 		connect(checkMeshAction, SIGNAL(triggered()), this, SLOT(checkMeshQuality()));
 		connect(saveMeshAction, SIGNAL(triggered()), this, SLOT(writeMeshToFile()));
-		connect(directSTAction, SIGNAL(triggered()), this, SLOT(addDIRECTSourceTerms()));
+		connect(directSTAction, SIGNAL(triggered()), this, SLOT(loadDIRECTSourceTerms()));
 		connect(removeMeshAction, SIGNAL(triggered()), this, SLOT(removeMesh()));
 		menu.exec(event->globalPos());
 	}
@@ -146,7 +146,7 @@ int DataView::writeMeshToFile() const
 	return 0;
 }
 
-void DataView::addDIRECTSourceTerms()
+void DataView::loadDIRECTSourceTerms()
 {
 	QModelIndex index = this->selectionModel()->currentIndex();
 	const std::vector<GEOLIB::Point*>* points = static_cast<MshModel*>(this->model())->getMesh(
diff --git a/DataView/DataView.h b/DataView/DataView.h
index 94ea2627f1471e42ff80236b10f8f8dfd7579cba..4a74bbe7dbf1ca346b150341ae24a7cdcf36a2eb 100644
--- a/DataView/DataView.h
+++ b/DataView/DataView.h
@@ -57,7 +57,7 @@ private slots:
 	/// Adds a new mesh.
 	void addMeshAction();
 
-	void addDIRECTSourceTerms();
+	void loadDIRECTSourceTerms();
 
 	/// Remove the currently selected mesh.
 	void removeMesh();
diff --git a/DataView/DiagramView/DetailWindow.cpp b/DataView/DiagramView/DetailWindow.cpp
index d2df79f29247ebdbff72260003f193fa105c9b67..48b9a344a4882ae29c8c4df6fbdc117106f2c244 100644
--- a/DataView/DiagramView/DetailWindow.cpp
+++ b/DataView/DiagramView/DetailWindow.cpp
@@ -78,6 +78,25 @@ DetailWindow::DetailWindow(DiagramList* list, QWidget* parent) : QWidget(parent)
 	resizeWindow();
 }
 
+DetailWindow::DetailWindow(std::vector<size_t> data, QWidget* parent) : QWidget(parent)
+{
+	setupUi(this);
+	size_t nEntries = data.size();
+	std::vector< std::pair<float, float> > list_data(nEntries);
+
+	for (size_t i=0; i<nEntries; i++)
+		list_data.push_back(std::pair<float, float>(static_cast<float>(i), static_cast<float>(data[i])));
+
+	DiagramList* list = new DiagramList();
+	list->setList(list_data);
+	list->setXUnit("Value");
+	list->setYUnit("Amount");
+	list->setName("Histogram");
+	stationView->setRenderHints( QPainter::Antialiasing );
+	stationView->addGraph(list);
+	resizeWindow();
+}
+
 DetailWindow::~DetailWindow()
 {
 }
diff --git a/DataView/DiagramView/DetailWindow.h b/DataView/DiagramView/DetailWindow.h
index 653541fe7aae052bc2c1141beb0ca5d0d19f8336..dc8af4c15ca380711e2dceae64346734f6d3f9a1 100644
--- a/DataView/DiagramView/DetailWindow.h
+++ b/DataView/DiagramView/DetailWindow.h
@@ -32,6 +32,9 @@ public:
 	 * \param parent The parent QWidget.
 	 */
 	DetailWindow(DiagramList* list, QWidget* parent = 0);
+
+	DetailWindow(std::vector<size_t> data, QWidget* parent = 0);
+
 	~DetailWindow(void);
 
 	/**
diff --git a/DataView/DiagramView/DiagramList.cpp b/DataView/DiagramView/DiagramList.cpp
index 9a6edd1ce2df8a86f103c62850ed9bf5f992c6ca..f2940670b4adba58ba52889047341de9ac5844b1 100644
--- a/DataView/DiagramView/DiagramList.cpp
+++ b/DataView/DiagramView/DiagramList.cpp
@@ -217,15 +217,14 @@ int DiagramList::readList(const QString &path, std::vector<DiagramList*> &lists)
 void DiagramList::setList(std::vector< std::pair<QDateTime, float> > coords)
 {
 	int numberOfDays;
-	QDateTime startDate;
 
-	startDate = coords[0].first;
+	this->_startDate = coords[0].first;
 	_coords.push_back(std::pair<float, float>(0, coords[0].second));
 
 	size_t nCoords = coords.size();
 	for (size_t i = 1; i < nCoords; i++)
 	{
-		numberOfDays = startDate.daysTo(coords[i].first);
+		numberOfDays = this->_startDate.daysTo(coords[i].first);
 		_coords.push_back(std::pair<float, float>(numberOfDays, coords[i].second));
 	}
 
@@ -234,6 +233,7 @@ void DiagramList::setList(std::vector< std::pair<QDateTime, float> > coords)
 
 void DiagramList::setList(std::vector< std::pair<float, float> > coords)
 {
+	this->_startDate = QDateTime();
 	size_t nCoords = coords.size();
 	for (size_t i = 0; i < nCoords; i++)
 		_coords.push_back(coords[i]);
diff --git a/DataView/DiagramView/DiagramScene.cpp b/DataView/DiagramView/DiagramScene.cpp
index 16765ad473cc0c6bac2081d76b0be05658d51e3a..8b845561aac5e5d8027766678fad8f50f9ac460e 100644
--- a/DataView/DiagramView/DiagramScene.cpp
+++ b/DataView/DiagramView/DiagramScene.cpp
@@ -193,14 +193,26 @@ void DiagramScene::constructGrid()
 	QPen pen(Qt::black, 1, Qt::SolidLine, Qt::SquareCap, Qt::RoundJoin);
 	_grid = addGrid(_bounds, numXTicks, numYTicks, pen);
 
-	for (int i = 0; i <= numXTicks; ++i)
+	if (_startDate == QDateTime())
 	{
-		int x =
-		        static_cast<int>(_bounds.left() / _scaleX +
-		                         (i * (_bounds.width() / _scaleX) / numXTicks));
-		QDateTime currentDate = _startDate.addSecs(x);
-		_xTicksText.push_back(addNonScalableText(currentDate.toString("dd.MM.yyyy")));
-		_xTicksText.last()->setPos(x * _scaleX, _bounds.bottom() + 15);
+		for (int i = 0; i <= numXTicks; ++i)
+		{
+			int x = static_cast<int>(_bounds.left() / _scaleX +
+									 (i * (_bounds.width() / _scaleX) / numXTicks));
+			_xTicksText.push_back(addNonScalableText(QString::number(x)));
+			_xTicksText.last()->setPos(x * _scaleX, _bounds.bottom() + 15);
+		}
+	}
+	else
+	{
+		for (int i = 0; i <= numXTicks; ++i)
+		{
+			int x = static_cast<int>(_bounds.left() / _scaleX +
+									 (i * (_bounds.width() / _scaleX) / numXTicks));
+			QDateTime currentDate = _startDate.addSecs(x);
+			_xTicksText.push_back(addNonScalableText(currentDate.toString("dd.MM.yyyy")));
+			_xTicksText.last()->setPos(x * _scaleX, _bounds.bottom() + 15);
+		}
 	}
 
 	for (int j = 0; j <= numYTicks; ++j)
diff --git a/DataView/FEMConditionSetup.ui b/DataView/FEMConditionSetup.ui
new file mode 100644
index 0000000000000000000000000000000000000000..fbc20c328bdcf93c318c05da85cd7129c829d6ad
--- /dev/null
+++ b/DataView/FEMConditionSetup.ui
@@ -0,0 +1,170 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>FEMConditionSetup</class>
+ <widget class="QDialog" name="FEMConditionSetup">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>280</width>
+    <height>272</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>FEM Condition Setup</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout">
+   <item row="1" column="0">
+    <widget class="QLabel" name="label_2">
+     <property name="text">
+      <string>Process Type</string>
+     </property>
+     <property name="margin">
+      <number>10</number>
+     </property>
+    </widget>
+   </item>
+   <item row="4" column="0">
+    <widget class="QLabel" name="label_3">
+     <property name="text">
+      <string>Distribution Type</string>
+     </property>
+     <property name="margin">
+      <number>10</number>
+     </property>
+    </widget>
+   </item>
+   <item row="5" column="0">
+    <widget class="QLabel" name="label_4">
+     <property name="text">
+      <string>Value</string>
+     </property>
+     <property name="margin">
+      <number>10</number>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="1">
+    <widget class="QComboBox" name="processTypeBox"/>
+   </item>
+   <item row="4" column="1">
+    <widget class="QComboBox" name="disTypeBox">
+     <item>
+      <property name="text">
+       <string>Constant (Direchlet)</string>
+      </property>
+     </item>
+    </widget>
+   </item>
+   <item row="3" column="0">
+    <widget class="QLabel" name="label_5">
+     <property name="text">
+      <string>Primary Variable</string>
+     </property>
+     <property name="margin">
+      <number>10</number>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="1">
+    <widget class="QComboBox" name="pvTypeBox"/>
+   </item>
+   <item row="5" column="1">
+    <widget class="QLineEdit" name="firstValueEdit"/>
+   </item>
+   <item row="7" column="1">
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+   <item row="6" column="0">
+    <spacer name="verticalSpacer">
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>20</width>
+       <height>40</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="2" column="0">
+    <widget class="QLabel" name="label">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string>Condition Type</string>
+     </property>
+     <property name="margin">
+      <number>10</number>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="1">
+    <widget class="QComboBox" name="condTypeBox">
+     <item>
+      <property name="text">
+       <string>Boundary Condition</string>
+      </property>
+     </item>
+     <item>
+      <property name="text">
+       <string>Initial Condition</string>
+      </property>
+     </item>
+     <item>
+      <property name="text">
+       <string>Source Term</string>
+      </property>
+     </item>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>FEMConditionSetup</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>FEMConditionSetup</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/DataView/FEMConditionSetupDialog.cpp b/DataView/FEMConditionSetupDialog.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..7bcb2b35988f5cd0998dbd78ee4a95bfd2741830
--- /dev/null
+++ b/DataView/FEMConditionSetupDialog.cpp
@@ -0,0 +1,170 @@
+/**
+ * \file FEMConditionSetupDialog.cpp
+ * 2011/11/07 KR Initial implementation
+ */
+
+#include "FEMConditionSetupDialog.h"
+#include "OGSError.h"
+#include "FEMEnums.h"
+#include "ProjectData.h"
+#include "StrictDoubleValidator.h"
+
+#include "BoundaryCondition.h"
+#include "InitialCondition.h"
+#include "SourceTerm.h"
+
+FEMConditionSetupDialog::FEMConditionSetupDialog(const std::string &associated_geometry,
+												 const GEOLIB::GEOTYPE type,
+												 const std::string &geo_name,
+												 const GEOLIB::GeoObject* const geo_object,
+												 QDialog* parent)
+: QDialog(parent), _cond(associated_geometry, FEMCondition::UNSPECIFIED), _secondValueEdit(NULL),
+  _first_value_validator(NULL), _second_value_validator(NULL)
+{
+	_cond.setGeoType(type);
+	_cond.setGeoName(geo_name);
+	_cond.setGeoObj(geo_object);
+
+	setupUi(this);
+
+	setupDialog();
+
+
+}
+
+FEMConditionSetupDialog::FEMConditionSetupDialog(FEMCondition &cond, QDialog* parent)
+	: QDialog(parent), _cond(cond), _secondValueEdit(NULL),
+	  _first_value_validator(NULL), _second_value_validator(NULL)
+{
+	setupDialog();
+}
+
+FEMConditionSetupDialog::~FEMConditionSetupDialog()
+{
+	delete _secondValueEdit;
+	delete _first_value_validator;
+	delete _second_value_validator;
+}
+
+void FEMConditionSetupDialog::setupDialog()
+{
+	if (_cond.getGeoType() == GEOLIB::POLYLINE)
+	{
+		this->disTypeBox->addItem("Linear (Direchlet)");
+		//this->disTypeBox->addItem("Linear (Neumann)");
+	}
+	_first_value_validator = new StrictDoubleValidator(-1e+10, 1e+10, 5);
+	_second_value_validator = new StrictDoubleValidator(-1e+10, 1e+10, 5);
+	this->firstValueEdit->setText("0");
+	this->firstValueEdit->setValidator (_first_value_validator);
+
+	const std::list<std::string> process_names = FiniteElement::getAllProcessNames();
+	for (std::list<std::string>::const_iterator it = process_names.begin(); it != process_names.end(); ++it)
+		this->processTypeBox->addItem(QString::fromStdString(*it));
+
+	const std::list<std::string> pv_names = FiniteElement::getAllPrimaryVariableNames();
+	for (std::list<std::string>::const_iterator it = pv_names.begin(); it != pv_names.end(); ++it)
+		this->pvTypeBox->addItem(QString::fromStdString(*it));
+/*
+	const std::list<std::string> dis_names = FiniteElement::getAllDistributionNames();
+	for (std::list<std::string>::const_iterator it = dis_names.begin(); it != dis_names.end(); ++it)
+		this->disTypeBox->addItem(QString::fromStdString(*it));
+*/
+}
+
+void FEMConditionSetupDialog::accept()
+{
+	_cond.setProcessType(static_cast<FiniteElement::ProcessType>(this->processTypeBox->currentIndex() + 1));
+	_cond.setProcessPrimaryVariable(static_cast<FiniteElement::PrimaryVariable>(this->pvTypeBox->currentIndex() + 1));
+
+	QString dis_type_text = this->disTypeBox->currentText();
+	if (condTypeBox->currentIndex()>1)
+	{
+		if (this->disTypeBox->currentIndex()>0) 
+			_cond.setProcessDistributionType(FiniteElement::LINEAR_NEUMANN);
+		else 
+			_cond.setProcessDistributionType(FiniteElement::CONSTANT_NEUMANN);
+	}
+	else
+	{
+		if (this->disTypeBox->currentIndex()>0) 
+			_cond.setProcessDistributionType(FiniteElement::LINEAR);
+		else 
+			_cond.setProcessDistributionType(FiniteElement::CONSTANT);
+	}
+
+	std::vector<double> dis_values;
+	dis_values.push_back(strtod(this->firstValueEdit->text().toStdString().c_str(), 0));
+	if (this->_secondValueEdit)
+		dis_values.push_back(strtod(this->_secondValueEdit->text().toStdString().c_str(), 0));
+	_cond.setDisValue(dis_values);
+
+	FEMCondition* new_cond(NULL);
+	switch(this->condTypeBox->currentIndex())
+	{
+		case 0:
+			new_cond = new BoundaryCondition(_cond);
+			break;
+		case 1:
+			new_cond = new InitialCondition(_cond);
+			break;
+		default:
+			new_cond = new SourceTerm(_cond);
+	}
+
+	emit addFEMCondition(new_cond);
+	this->done(QDialog::Accepted);
+}
+
+void FEMConditionSetupDialog::reject()
+{
+	this->done(QDialog::Rejected);
+}
+
+
+void FEMConditionSetupDialog::on_condTypeBox_currentIndexChanged(int index)
+{
+	//if (index==1)
+	//	this->geoNameBox->addItem("Domain");
+	// remove "Domain" if IC is unselected
+	if (index>1) // source terms selected
+	{
+		while (this->disTypeBox->count()>0)
+			this->disTypeBox->removeItem(0);
+		this->disTypeBox->addItem("Constant (Neumann)");
+		if (_cond.getGeoType() == GEOLIB::POLYLINE)
+			this->disTypeBox->addItem("Linear (Neumann)");
+	}
+	else
+	{
+		while (this->disTypeBox->count()>0)
+			this->disTypeBox->removeItem(0);
+		this->disTypeBox->addItem("Constant (Direchlet)");
+		if (_cond.getGeoType() == GEOLIB::POLYLINE)
+			this->disTypeBox->addItem("Linear (Direchlet)");
+	}
+}
+
+
+void FEMConditionSetupDialog::on_disTypeBox_currentIndexChanged(int index)
+{
+	if (index>0) // linear
+	{
+		if (!_secondValueEdit)
+		{
+			_secondValueEdit = new QLineEdit("0");
+			_secondValueEdit->setValidator(_second_value_validator);
+			static_cast<QGridLayout*>(this->layout())->addWidget(_secondValueEdit,5,1) ;
+		}
+	}
+	else	// constant
+	{
+		if (_secondValueEdit)
+		{
+			static_cast<QGridLayout*>(this->layout())->removeWidget(_secondValueEdit);
+			delete _secondValueEdit;
+			_secondValueEdit = NULL;
+		}
+	}
+
+}
diff --git a/DataView/FEMConditionSetupDialog.h b/DataView/FEMConditionSetupDialog.h
new file mode 100644
index 0000000000000000000000000000000000000000..ea9c66c58b10d906bd46677a0b851ed1dc345a22
--- /dev/null
+++ b/DataView/FEMConditionSetupDialog.h
@@ -0,0 +1,65 @@
+/**
+ * \file FEMConditionSetupDialog.h
+ * 2011/11/07 KR Initial implementation
+ */
+
+#ifndef FEMCONDITIONSETUPDIALOG_H
+#define FEMCONDITIONSETUPDIALOG_H
+
+#include "ui_FEMConditionSetup.h"
+#include "FEMCondition.h"
+
+#include <QDialog>
+
+class StrictDoubleValidator;
+
+namespace GEOLIB {
+	class GeoObject;
+}
+
+
+/**
+ * \brief A dialog window for adding FEM Conditions based
+ * on geometrica objects.
+ */
+class FEMConditionSetupDialog : public QDialog, private Ui_FEMConditionSetup
+{
+	Q_OBJECT
+
+public:
+	/// Constructor for creating a new FEM condition.
+	FEMConditionSetupDialog(const std::string &associated_geometry, 
+							const GEOLIB::GEOTYPE type, 
+							const std::string &geo_name, 
+							const GEOLIB::GeoObject* const geo_object, 
+							QDialog* parent = 0);
+
+	/// Constructor for editing an existing FEM condition.
+	FEMConditionSetupDialog(FEMCondition &cond, QDialog* parent = 0);
+	~FEMConditionSetupDialog(void);
+
+private:
+	void setupDialog();
+
+	FEMCondition _cond;
+	QLineEdit* _secondValueEdit;
+	StrictDoubleValidator* _first_value_validator;
+	StrictDoubleValidator* _second_value_validator;
+
+private slots:
+	/// Instructions if the OK-Button has been pressed.
+	void accept();
+
+	/// Instructions if the Cancel-Button has been pressed.
+	void reject();
+
+	void on_condTypeBox_currentIndexChanged(int index);
+
+	void on_disTypeBox_currentIndexChanged(int index);
+
+signals:
+	void addFEMCondition(FEMCondition*);
+
+};
+
+#endif //FEMCONDITIONSETUPDIALOG_H
diff --git a/DataView/GEOModels.cpp b/DataView/GEOModels.cpp
index ec684f79b2cdb55fdd0d9433aa13a83d2116715f..c6f2079f0337702f47fe0236ca2e0a5e1c8ca0ec 100644
--- a/DataView/GEOModels.cpp
+++ b/DataView/GEOModels.cpp
@@ -206,3 +206,30 @@ void GEOModels::connectPolylineSegments(const std::string &geoName,
 	else
 		OGSError::box("Corresponding geometry not found.");
 }
+
+
+void GEOModels::addNameForElement(const std::string &geometry_name, const GEOLIB::GEOTYPE object_type, size_t id, std::string new_name)
+{
+	switch(object_type) {
+		case GEOLIB::POINT:
+			{
+				GEOLIB::PointVec* pnt_vec = this->getPointVecObj(geometry_name);
+				pnt_vec->setNameForElement(id, new_name);
+				break;
+			}
+		case GEOLIB::POLYLINE:
+			{
+				GEOLIB::PolylineVec* ply_vec = this->getPolylineVecObj(geometry_name);
+				ply_vec->setNameForElement(id, new_name);
+				break;
+			}
+		case GEOLIB::SURFACE:
+			{
+				GEOLIB::SurfaceVec* sfc_vec = this->getSurfaceVecObj(geometry_name);
+				sfc_vec->setNameForElement(id, new_name);
+				break;
+			}
+		default:
+			std::cout << "Error in GEOModels::addNameForElement() - Unknown GEOTYPE..." << std::endl;
+	}
+}
diff --git a/DataView/GEOModels.h b/DataView/GEOModels.h
index 7532bc76165f138a19ef95addda87301407173c0..1396567f33bae3aaac6fd83fa1049c698933afb7 100644
--- a/DataView/GEOModels.h
+++ b/DataView/GEOModels.h
@@ -72,6 +72,8 @@ public slots:
 	                              const std::string &name);
 	virtual bool removeSurfaceVec(const std::string &name);
 
+	void addNameForElement(const std::string &geometry_name, const GEOLIB::GEOTYPE object_type, size_t id, std::string new_name);
+
 	/// Calls all necessary functions to connect polyline-segments and update all views and windows.
 	void connectPolylineSegments(const std::string &geoName,
 	                             std::vector<size_t> indexlist,
diff --git a/DataView/GMSHPrefsDialog.cpp b/DataView/GMSHPrefsDialog.cpp
index b087545d18ce4777920400ed46312fc95c8d516c..d171ab8e6c5cf7ab4fac34c96e192ce2a1267ee2 100644
--- a/DataView/GMSHPrefsDialog.cpp
+++ b/DataView/GMSHPrefsDialog.cpp
@@ -53,7 +53,7 @@ GMSHPrefsDialog::GMSHPrefsDialog(const GEOLIB::GEOObjects* geoObjects, QDialog*
 
 	// get station names
 	std::vector<std::string> geo_station_names;
-	geoObjects->getStationNames(geo_station_names);
+	geoObjects->getStationVectorNames(geo_station_names);
 
 	for (size_t k(0); k < geo_station_names.size(); k++)
 		geoNames.push_back (geo_station_names[k]);
diff --git a/DataView/GMSHPrefsDialog.h b/DataView/GMSHPrefsDialog.h
index c3c520c3680e1ddc281054c2667a95b52341235d..760490f9dc6035f93551b90b59283df994023f1e 100644
--- a/DataView/GMSHPrefsDialog.h
+++ b/DataView/GMSHPrefsDialog.h
@@ -7,7 +7,7 @@
 #define GMSHPREFSDIALOG_H
 
 #include "ui_GMSHPrefs.h"
-#include <QtGui/QMainWindow>
+#include <QDialog>
 
 class QStringListModel;
 
diff --git a/DataView/GeoObjectListItem.h b/DataView/GeoObjectListItem.h
index 7c373de9fd1eb270f46827f351396e4222b81145..19a848ff6ce77e77dba1cf4f2122be0b32d33930 100644
--- a/DataView/GeoObjectListItem.h
+++ b/DataView/GeoObjectListItem.h
@@ -16,6 +16,12 @@
 #include <QModelIndex>
 #include <vtkPolyDataAlgorithm.h>
 
+/**
+ * Creates parent items for geometric object lists (i.e. points, polylines and surfaces)
+ * for the GeoTreeModel
+ *
+ * \sa GeoTreeModel, GeoTreeItem
+ */
 class GeoObjectListItem : public TreeItem
 {
 public:
diff --git a/DataView/GeoTreeModel.cpp b/DataView/GeoTreeModel.cpp
index 652add5b54d6e8fc165b99514503459b9d780493..95617c0ddd05d10d19f165c325d0d3c10f16ff90 100644
--- a/DataView/GeoTreeModel.cpp
+++ b/DataView/GeoTreeModel.cpp
@@ -16,40 +16,26 @@ GeoTreeModel::GeoTreeModel( QObject* parent )
 {
 	QList<QVariant> rootData;
 	delete _rootItem;
-	rootData << "Id" << "x" << "y" << "z";
+	rootData << "Id" << "x" << "y" << "z" << "name ";
 	_rootItem = new GeoTreeItem(rootData, NULL, NULL);
 }
 
 GeoTreeModel::~GeoTreeModel()
 {
 }
-/*
-   const GEOLIB::GeoObject* GeoTreeModel::objectFromIndex( const QModelIndex& index, QString &geoName ) const
-   {
-    if (index.isValid())
-    {
-        GeoTreeItem* treeItem = static_cast<GeoTreeItem*>(index.internalPointer());
-        //TreeItem* parentItem = treeItem->parentItem();
-        //geoName = parentItem->data(0).toString();
-        if (treeItem) return treeItem->getGeoObject();
-    }
-    return NULL;
-   }
- */
+
 void GeoTreeModel::addPointList(QString geoName, const GEOLIB::PointVec* pointVec)
 {
 	const std::vector<GEOLIB::Point*>* points = pointVec->getVector();
 
 	QList<QVariant> geoData;
-	geoData << QVariant(geoName) << "" << "" << "";
-	//BaseItem* grpItem = new BaseItem(listName, stations);
-	GeoTreeItem* geo = new GeoTreeItem(geoData, _rootItem);
+	geoData << QVariant(geoName) << "" << "" << "" << "";
+	GeoTreeItem* geo (new GeoTreeItem(geoData, _rootItem));
 	_lists.push_back(geo);
 	_rootItem->appendChild(geo);
 
 	QList<QVariant> pointData;
-	pointData << "Points" << "" << "" << "";
-	//BaseItem* grpItem = new BaseItem(listName, stations);
+	pointData << "Points" << "" << "" << "" << "";
 	GeoObjectListItem* pointList = new GeoObjectListItem(pointData, geo, points, GEOLIB::POINT);
 	geo->appendChild(pointList);
 
@@ -57,14 +43,16 @@ void GeoTreeModel::addPointList(QString geoName, const GEOLIB::PointVec* pointVe
 
 	for (size_t j = 0; j < nPoints; j++)
 	{
-		QList<QVariant> pnt;
-		pnt << static_cast<unsigned>(j) <<
-		QString::number((*(*points)[j])[0],
-		                'f') << QString::number((*(*points)[j])[1],'f') << QString::number(
-		        (*(*points)[j])[2],
-		        'f');
-		GeoTreeItem* point =
-		        new GeoTreeItem(pnt, pointList, static_cast<GEOLIB::Point*>((*points)[j]));
+		const GEOLIB::Point &pnt(*(*points)[j]);
+		std::string pnt_name("");
+		pointVec->getNameOfElementByID(j, pnt_name);
+		QList<QVariant> pnt_data;
+		pnt_data << static_cast<unsigned>(j)
+			     << QString::number(pnt[0], 'f')
+			     << QString::number(pnt[1], 'f')
+			     << QString::number(pnt[2], 'f')
+			     << QString::fromStdString(pnt_name);
+		GeoTreeItem* point(new GeoTreeItem(pnt_data, pointList, static_cast<const GEOLIB::Point*>(&pnt)));
 		pointList->appendChild(point);
 	}
 
@@ -79,14 +67,15 @@ void GeoTreeModel::addPolylineList(QString geoName, const GEOLIB::PolylineVec* p
 	int nLists = _rootItem->childCount();
 	TreeItem* geo(NULL);
 	for (int i = 0; i < nLists; i++)
+	{
 		if (_rootItem->child(i)->data(0).toString().compare(geoName) == 0)
 			geo = _rootItem->child(i);
+	}
 
 	if (geo == NULL)
 	{
-		std::cout <<
-		"GeoTreeModel::addPolylineList() - Error: No corresponding geometry found..." <<
-		std::endl;
+		std::cout << "GeoTreeModel::addPolylineList() - Error: No corresponding geometry found..." 
+				  << std::endl;
 		return;
 	}
 
@@ -94,7 +83,6 @@ void GeoTreeModel::addPolylineList(QString geoName, const GEOLIB::PolylineVec* p
 
 	QList<QVariant> plyData;
 	plyData << "Polylines" << "" << "" << "";
-	//BaseItem* grpItem = new BaseItem(listName, stations);
 	GeoObjectListItem* plyList = new GeoObjectListItem(plyData, geo, lines, GEOLIB::POLYLINE);
 	geo->appendChild(plyList);
 	this->addChildren(plyList, polylineVec, 0, lines->size());
@@ -129,31 +117,30 @@ void GeoTreeModel::addChildren(GeoObjectListItem* plyList,
                                size_t start_index,
                                size_t end_index)
 {
-	const std::vector<GEOLIB::Polyline*>* lines = polyline_vec->getVector();
+	const std::vector<GEOLIB::Polyline*> lines = *(polyline_vec->getVector());
 
 	for (size_t i = start_index; i < end_index; i++)
 	{
-		QList<QVariant> line;
+		QList<QVariant> line_data;
 		std::string ply_name("");
-		line << "Line " + QString::number(i);
 		if (polyline_vec->getNameOfElementByID(i, ply_name))
-			line << QString::fromStdString(ply_name) << "" << "";
-		else
-			line << "" << "" << "";
+			line_data << "Line " + QString::number(i) << QString::fromStdString(ply_name) << "" << "";
+		else line_data << "Line " + QString::number(i) << "" << "" << "";
 
-		GeoTreeItem* lineItem = new GeoTreeItem(line, plyList, (*lines)[i]);
+		const GEOLIB::Polyline &line(*(lines[i]));
+		GeoTreeItem* lineItem(new GeoTreeItem(line_data, plyList, &line));
 		plyList->appendChild(lineItem);
 
-		int nPoints = static_cast<int>((*lines)[i]->getNumberOfPoints());
+		int nPoints = static_cast<int>(lines[i]->getNumberOfPoints());
 		for (int j = 0; j < nPoints; j++)
 		{
-			QList<QVariant> pnt;
-			pnt << static_cast<int>((*lines)[i]->getPointID(j)) <<
-			QString::number((*(*(*lines)[i])[j])[0],
-			                'f') <<
-			QString::number((*(*(*lines)[i])[j])[1],
-			                'f') << QString::number((*(*(*lines)[i])[j])[2],'f');
-			TreeItem* child = new TreeItem(pnt, lineItem);
+			const GEOLIB::Point pnt(*(line[j]));
+			QList<QVariant> pnt_data;
+			pnt_data << static_cast<int>(line.getPointID(j))
+				     << QString::number(pnt[0], 'f') 
+					 << QString::number(pnt[1], 'f') 
+					 << QString::number(pnt[2], 'f');
+			TreeItem* child(new TreeItem(pnt_data, lineItem));
 			lineItem->appendChild(child);
 		}
 	}
@@ -165,14 +152,15 @@ void GeoTreeModel::addSurfaceList(QString geoName, const GEOLIB::SurfaceVec* sur
 	int nLists = _rootItem->childCount();
 	TreeItem* geo(NULL);
 	for (int i = 0; i < nLists; i++)
+	{
 		if (_rootItem->child(i)->data(0).toString().compare(geoName) == 0)
 			geo = _rootItem->child(i);
+	}
 
 	if (geo == NULL)
 	{
-		std::cout <<
-		"GeoTreeModel::addSurfaceList() - Error: No corresponding geometry found..." <<
-		std::endl;
+		std::cout << "GeoTreeModel::addSurfaceList() - Error: No corresponding geometry found..." 
+				  << std::endl;
 		return;
 	}
 
@@ -192,20 +180,22 @@ void GeoTreeModel::appendSurfaces(const std::string &name, GEOLIB::SurfaceVec* s
 	for (size_t i = 0; i < _lists.size(); i++)
 	{
 		if ( name.compare( _lists[i]->data(0).toString().toStdString() ) == 0 )
-			for (int j = 0; j < _lists[i]->childCount(); j++)
+		{
+			int nChildren = _lists[i]->childCount();
+			for (int j = 0; j < nChildren; j++)
 			{
-				GeoObjectListItem* parent =
-				        static_cast<GeoObjectListItem*>(_lists[i]->child(j));
+				GeoObjectListItem* parent = static_cast<GeoObjectListItem*>(_lists[i]->child(j));
 				if (GEOLIB::SURFACE == parent->getType())
 				{
 					this->addChildren(parent, surfaceVec,
 					                  parent->childCount(),
 					                  surfaceVec->getVector()->size());
-					reset();
 					parent->vtkSource()->Modified();
+					reset();
 					return;
 				}
 			}
+		}
 	}
 	OGSError::box("Error adding surface to geometry.");
 }
@@ -217,42 +207,38 @@ void GeoTreeModel::addChildren(GeoObjectListItem* sfcList,
 {
 	const std::vector<GEOLIB::Surface*>* surfaces = surface_vec->getVector();
 
+	const std::vector<GEOLIB::Point*> &nodesVec(*((*surfaces)[start_index]->getPointVec()));
 	for (size_t i = start_index; i < end_index; i++)
 	{
 		QList<QVariant> surface;
 		std::string sfc_name("");
-		surface << "Surface " + QString::number(i);
-		if (surface_vec->getNameOfElementByID(i, sfc_name))
-			surface << QString::fromStdString(sfc_name)  << "" << "";
-		else
-			surface << "" << "" << "";
+		sfc_name = surface_vec->getNameOfElementByID(i, sfc_name);
+		surface << "Surface " + QString::number(i) << QString::fromStdString(sfc_name) << "" << "";
 
-		GeoTreeItem* surfaceItem = new GeoTreeItem(surface, sfcList, (*surfaces)[i]);
+		const GEOLIB::Surface &sfc(*(*surfaces)[i]);
+		GeoTreeItem* surfaceItem(new GeoTreeItem(surface, sfcList, &sfc));
 		sfcList->appendChild(surfaceItem);
 
-		const std::vector<GEOLIB::Point*>* nodesVec = (*surfaces)[i]->getPointVec();
-
 		int nElems = static_cast<int>((*surfaces)[i]->getNTriangles());
 		for (int j = 0; j < nElems; j++)
 		{
 			QList<QVariant> elem;
-			elem << j << static_cast<int>((*(*(*surfaces)[i])[j])[0]) <<
-			static_cast<int>((*(*(*surfaces)[i])[j])[1]) <<
-			static_cast<int>((*(*(*surfaces)[i])[j])[2]);
-			TreeItem* child = new TreeItem(elem, surfaceItem);
+			const GEOLIB::Triangle &triangle(*sfc[j]);
+			elem << j << static_cast<int>(triangle[0]) 
+				      << static_cast<int>(triangle[1]) 
+					  << static_cast<int>(triangle[2]);
+			TreeItem* child(new TreeItem(elem, surfaceItem));
 			surfaceItem->appendChild(child);
 
 			for (int k = 0; k < 3; k++)
 			{
 				QList<QVariant> node;
-				node << static_cast<int>((*(*(*surfaces)[i])[j])[k]) <<
-				QString::number((*(*nodesVec)[(*(*(*surfaces)[i])[j])[k]])[0],
-				                'f') << QString::number(
-				        (*(*nodesVec)[(*(*(*surfaces)[i])[j])[k]])[1],
-				        'f') << QString::number(
-				        (*(*nodesVec)[(*(*(*surfaces)[i])[j])[k]])[2],
-				        'f');
-				TreeItem* nchild = new TreeItem(node, child);
+				const GEOLIB::Point &pnt(*(nodesVec[triangle[k]]));
+				node << static_cast<int>(triangle[k]) 
+					 << QString::number(pnt[0], 'f') 
+					 << QString::number(pnt[1], 'f') 
+					 << QString::number(pnt[2], 'f');
+				TreeItem* nchild(new TreeItem(node, child));
 				child->appendChild(nchild);
 			}
 		}
@@ -301,3 +287,46 @@ vtkPolyDataAlgorithm* GeoTreeModel::vtkSource(const std::string &name, GEOLIB::G
 	}
 	return NULL;
 }
+
+void GeoTreeModel::setNameForItem(const std::string &name, GEOLIB::GEOTYPE type, size_t id, std::string item_name)
+{
+	int type_idx(0);
+	int col_idx(1);
+
+	switch(type)
+	{
+		case GEOLIB::POINT:
+			type_idx = 0;
+			col_idx = 4; // for points the name is at a different position
+			break;
+		case GEOLIB::POLYLINE:
+			type_idx = 1;
+			break;
+		case GEOLIB::SURFACE:
+			type_idx = 2;
+			break;
+		case GEOLIB::VOLUME:
+			type_idx = 3;
+			break;
+		default:
+			type_idx = -1;
+	}
+
+	for (size_t i=0; i<_lists.size(); i++)
+	{
+		if ( name.compare( _lists[i]->data(0).toString().toStdString() ) == 0 )
+		{
+			TreeItem* object_list = _lists[i]->child(type_idx);
+//			for (int j=0; j<object_list->childCount(); j++)
+//			{
+				TreeItem* item = object_list->child(/*j*/id);
+//				if (static_cast<size_t>(item->data(0).toInt()) == id)
+//				{
+					item->setData(col_idx, QString::fromStdString(item_name));
+//					break;
+//				}
+//			}
+			break;
+		}
+	}
+}
diff --git a/DataView/GeoTreeModel.h b/DataView/GeoTreeModel.h
index 3dc20199f6b59dc8783f4ef5ed2a817a06270d75..8da296ec245973be37312331503b8975e40feabc 100644
--- a/DataView/GeoTreeModel.h
+++ b/DataView/GeoTreeModel.h
@@ -59,6 +59,8 @@ public:
 	 */
 	void removeGeoList(const std::string &name, GEOLIB::GEOTYPE type = GEOLIB::INVALID);
 
+	void setNameForItem(const std::string &name, GEOLIB::GEOTYPE type, size_t id, std::string item_name);
+
 	/*
 	 * Returns the geo-object specified by the given index.
 	 * \param index Index of the requested item
diff --git a/DataView/GeoTreeView.cpp b/DataView/GeoTreeView.cpp
index 4a64a5bd7467ecfa1282e6a99ae27737fa474a0b..60e23b97ea0050c22e1f2cafb69a0f5f5650a475 100644
--- a/DataView/GeoTreeView.cpp
+++ b/DataView/GeoTreeView.cpp
@@ -13,12 +13,8 @@
 #include "GeoTreeView.h"
 #include "OGSError.h"
 
-#include "XMLInterface.h"
-
 GeoTreeView::GeoTreeView(QWidget* parent) : QTreeView(parent)
 {
-//	setContextMenuPolicy(Qt::CustomContextMenu);
-//    connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(showContextMenu(const QPoint &)));
 }
 
 void GeoTreeView::updateView()
@@ -38,8 +34,19 @@ void GeoTreeView::on_Clicked(QModelIndex idx)
 void GeoTreeView::selectionChanged( const QItemSelection &selected,
                                     const QItemSelection &deselected )
 {
-	emit itemSelectionChanged(selected, deselected);
-	return QTreeView::selectionChanged(selected, deselected);
+	if (!selected.isEmpty())
+	{
+		const QModelIndex idx = *(selected.indexes().begin());
+		const TreeItem* tree_item = static_cast<TreeModel*>(this->model())->getItem(idx);
+
+		const GeoObjectListItem* list_item = dynamic_cast<GeoObjectListItem*>(tree_item->parentItem());
+		if (list_item)
+			emit geoItemSelected(list_item->vtkSource(), tree_item->row());
+		else
+			emit removeGeoItemSelection();
+	}
+	//emit itemSelectionChanged(selected, deselected);
+	//return QTreeView::selectionChanged(selected, deselected);
 }
 
 void GeoTreeView::selectionChangedFromOutside( const QItemSelection &selected,
@@ -63,64 +70,91 @@ void GeoTreeView::contextMenuEvent( QContextMenuEvent* event )
 	GeoObjectListItem* list = dynamic_cast<GeoObjectListItem*>(item);
 	QMenu menu;
 
-	if (item->childCount() > 0)
+	// The current index is a list of points/polylines/surfaces
+	if (list != NULL)
 	{
-		// The current index refers to the name of a geometry-object
-		if (item->child(0)->data(0).toString().compare("Points") == 0) // clumsy way to find out
+		QAction* connectPlyAction(NULL);
+		if (list->getType() == GEOLIB::POLYLINE)
 		{
-			QAction* addCNDAction = menu.addAction("Add FEM Conditions...");
-			QAction* saveAction = menu.addAction("Save geometry...");
-			menu.addSeparator();
-			QAction* removeAction = menu.addAction("Remove geometry");
-			connect(addCNDAction, SIGNAL(triggered()), this, SLOT(addFEMConditions()));
-			connect(saveAction, SIGNAL(triggered()), this, SLOT(writeToFile()));
-			connect(removeAction, SIGNAL(triggered()), this, SLOT(removeList()));
+			connectPlyAction = menu.addAction("Connect Polylines...");
+			connect(connectPlyAction, SIGNAL(triggered()), this,
+			        SLOT(connectPolylines()));
 		}
-		else if (list != NULL)
+		menu.addSeparator();
+		QAction* removeAction = menu.addAction("Remove " + item->data(0).toString());
+		connect(removeAction, SIGNAL(triggered()), this, SLOT(removeList()));
+	}
+	else
+	{
+		GeoObjectListItem* parent = dynamic_cast<GeoObjectListItem*>(item->parentItem());
+		
+		// The current index refers to a geo-object
+		if (parent != NULL)
 		{
-			QAction* connectPlyAction(NULL);
-			if (list->getType() == GEOLIB::POLYLINE)
-			{
-				connectPlyAction = menu.addAction("Connect Polylines...");
-				connect(connectPlyAction, SIGNAL(triggered()), this,
-				        SLOT(connectPolylines()));
-			}
-			menu.addSeparator();
-			QAction* removeAction = menu.addAction("Remove " + item->data(0).toString());
-			connect(removeAction, SIGNAL(triggered()), this, SLOT(removeList()));
+			QAction* addCondAction = menu.addAction("Set as FEM condition...");
+			QAction* addNameAction = menu.addAction("Set name...");
+			connect(addCondAction, SIGNAL(triggered()), this, SLOT(setElementAsCondition()));
+			connect(addNameAction, SIGNAL(triggered()), this, SLOT(setNameForElement()));
 		}
-		// The current index refers to a geo object
-		else
+		// The current index refers to the name of a geometry-object
+		else if (item->childCount() > 0)
 		{
-			QString temp_name;
-			QMenu menu;
-			/*
-			        if (static_cast<GeoTreeModel*>(model())->objectFromIndex(index, temp_name)->type() == GEOLIB::POINT)
-			        {
-			            QAction* stratAction = menu.addAction("Display Stratigraphy...");
-			            QAction* exportAction = menu.addAction("Export to GMS...");
-			            connect(stratAction, SIGNAL(triggered()), this, SLOT(displayStratigraphy()));
-			            connect(exportAction, SIGNAL(triggered()), this, SLOT(exportStation()));
-			            menu.exec(event->globalPos());
-			        }
-			        else
-			        {
-			            menu.addAction("View Information...");
-			            QAction* showDiagramAction = menu.addAction("View Diagram...");
-			            connect(showDiagramAction, SIGNAL(triggered()), this, SLOT(showDiagramPrefsDialog()));
-			            menu.exec(event->globalPos());
-			        }
-			 */
+			if (item->child(0)->data(0).toString().compare("Points") == 0) // clumsy way to find out
+			{
+				QAction* saveAction = menu.addAction("Save geometry...");
+				QAction* addCNDAction = menu.addAction("Load FEM Conditions...");
+				QAction* saveCondAction    = menu.addAction("Save FEM conditions...");
+				menu.addSeparator();
+				QAction* removeAction = menu.addAction("Remove geometry");
+				connect(saveAction, SIGNAL(triggered()), this, SLOT(writeToFile()));
+				connect(addCNDAction, SIGNAL(triggered()), this, SLOT(loadFEMConditions()));
+				connect(saveCondAction, SIGNAL(triggered()), this, SLOT(saveFEMConditions()));
+				connect(removeAction, SIGNAL(triggered()), this, SLOT(removeList()));
+			}
 		}
 	}
+
 	menu.exec(event->globalPos());
 }
 
-void GeoTreeView::addFEMConditions()
+void GeoTreeView::connectPolylines()
+{
+	TreeItem* item = static_cast<GeoTreeModel*>(model())->getItem(
+	        this->selectionModel()->currentIndex())->parentItem();
+	emit requestLineEditDialog(item->data(0).toString().toStdString());
+}
+
+void GeoTreeView::removeList()
 {
 	TreeItem* item = static_cast<GeoTreeModel*>(model())->getItem(
 	        this->selectionModel()->currentIndex());
-	emit loadFEMCondFileRequested(item->data(0).toString().toStdString());
+
+	GeoObjectListItem* list = dynamic_cast<GeoObjectListItem*>(item);
+	if (list)
+		emit listRemoved((item->parentItem()->data(
+		                          0).toString()).toStdString(), list->getType());
+	else
+		emit listRemoved((item->data(0).toString()).toStdString(), GEOLIB::INVALID);
+}
+
+void GeoTreeView::setElementAsCondition()
+{
+	const TreeItem* item = static_cast<GeoTreeModel*>(model())->getItem(
+	        this->selectionModel()->currentIndex());
+	const size_t id = item->row();
+	const GEOLIB::GEOTYPE type = static_cast<GeoObjectListItem*>(item->parentItem())->getType();
+	const std::string geometry_name = item->parentItem()->parentItem()->data(0).toString().toStdString();
+	emit requestCondSetupDialog(geometry_name, type, id);
+}
+
+void GeoTreeView::setNameForElement()
+{
+	const TreeItem* item = static_cast<GeoTreeModel*>(model())->getItem(
+	        this->selectionModel()->currentIndex());
+	const size_t id = item->row();
+	const GEOLIB::GEOTYPE type = static_cast<GeoObjectListItem*>(item->parentItem())->getType();
+	const std::string geometry_name = item->parentItem()->parentItem()->data(0).toString().toStdString();
+	emit requestNameChangeDialog(geometry_name, type, id);
 }
 
 void GeoTreeView::writeToFile() const
@@ -129,30 +163,23 @@ void GeoTreeView::writeToFile() const
 	        this->selectionModel()->currentIndex());
 	QString gliName = item->data(0).toString();
 	QString fileName = QFileDialog::getSaveFileName(NULL,
-	                                                "Save geometry as",
-	                                                gliName,
-	                                                "GeoSys mesh file (*.gml)");
+						"Save geometry as", gliName, "GeoSys geometry file (*.gml)");
 	if (!fileName.isEmpty())
 		emit saveToFileRequested(gliName, fileName);
 }
 
-void GeoTreeView::removeList()
+void GeoTreeView::loadFEMConditions()
 {
 	TreeItem* item = static_cast<GeoTreeModel*>(model())->getItem(
 	        this->selectionModel()->currentIndex());
-
-	GeoObjectListItem* list = dynamic_cast<GeoObjectListItem*>(item);
-	if (list)
-		emit listRemoved((item->parentItem()->data(
-		                          0).toString()).toStdString(), list->getType());
-	else
-		emit listRemoved((item->data(0).toString()).toStdString(), GEOLIB::INVALID);
+	emit loadFEMCondFileRequested(item->data(0).toString().toStdString());
 }
 
-void GeoTreeView::connectPolylines()
+void GeoTreeView::saveFEMConditions()
 {
 	TreeItem* item = static_cast<GeoTreeModel*>(model())->getItem(
-	        this->selectionModel()->currentIndex())->parentItem();
-	emit requestLineEditDialog(item->data(0).toString().toStdString());
-}
-
+	        this->selectionModel()->currentIndex());
+	QString fileName = QFileDialog::getSaveFileName(NULL,
+						"Save FEM Conditions as", "", "GeoSys FEM Condition file (*.cnd)");
+	emit saveFEMConditionsRequested(item->data(0).toString(), fileName);
+}
\ No newline at end of file
diff --git a/DataView/GeoTreeView.h b/DataView/GeoTreeView.h
index fc75c36f5c82ee70cf1fe520df649536e221c90c..466289aa82a7da33f23bd647673b1e921fc0e830 100644
--- a/DataView/GeoTreeView.h
+++ b/DataView/GeoTreeView.h
@@ -10,6 +10,8 @@
 #include <QContextMenuEvent>
 #include <QTreeView>
 
+class vtkPolyDataAlgorithm;
+
 /**
  * \brief A view for the GeoTreeModel
  * \sa GeoTreeModel, GeoTreeItem
@@ -38,23 +40,33 @@ private:
 	void contextMenuEvent( QContextMenuEvent* e );
 
 private slots:
+	/// Allows to add FEM Conditions to a process
+	void loadFEMConditions();
 	void on_Clicked(QModelIndex idx);
-	/// Allows to add FEM Conditions to add to Geometry
-	void addFEMConditions();
 	/// Calls a LineEditDialog.
 	void connectPolylines();
+	/// Calls a FEMConditionSetupDialog.
+	void setElementAsCondition();
+	/// Calls a SetNameDialog.
+	void setNameForElement();
 	/// Saves a geometry in a file.
 	void writeToFile() const;
 	/// Removes a whole geometry or parts of it.
 	void removeList();
+	/// Saves FEM Conditions associated with the given geometry
+	void saveFEMConditions();
 
 signals:
-	void itemSelectionChanged(const QItemSelection & selected,
-	                          const QItemSelection & deselected);
+	void geoItemSelected(const vtkPolyDataAlgorithm*, int);
+	void removeGeoItemSelection();
+	//void itemSelectionChanged(const QItemSelection & selected, const QItemSelection & deselected);
 	void listRemoved(std::string name, GEOLIB::GEOTYPE);
 	void loadFEMCondFileRequested(std::string);
 	void saveToFileRequested(QString, QString) const;
+	void requestCondSetupDialog(const std::string&, const GEOLIB::GEOTYPE, const size_t);
 	void requestLineEditDialog(const std::string&);
+	void requestNameChangeDialog(const std::string&, const GEOLIB::GEOTYPE, const size_t);
+	void saveFEMConditionsRequested(QString, QString);
 };
 
 #endif //GEOTREEVIEW_H
diff --git a/DataView/LineEditDialog.h b/DataView/LineEditDialog.h
index ec709b743ad7d6377d3fedbf8cd564b29c94ea03..048be457e3467332e21b12b82b3b2a7de5c283ba 100644
--- a/DataView/LineEditDialog.h
+++ b/DataView/LineEditDialog.h
@@ -7,7 +7,7 @@
 #define LINEEDITDIALOG_H
 
 #include "ui_LineEdit.h"
-#include <QtGui/QMainWindow>
+#include <QDialog>
 
 #include "PolylineVec.h"
 
diff --git a/DataView/ListPropertiesDialog.h b/DataView/ListPropertiesDialog.h
index e3e306a79df63f80d367aeaf97b01b7a1cc8af3f..540af179e553cb53c12c96d4f7013a7eae1c16bd 100644
--- a/DataView/ListPropertiesDialog.h
+++ b/DataView/ListPropertiesDialog.h
@@ -9,7 +9,6 @@
 #include "GEOModels.h"
 #include "Station.h"
 #include <QDialog>
-#include <QtGui/QMainWindow>
 #include <vector>
 
 class QLabel;
diff --git a/DataView/ModellingTabWidget.cpp b/DataView/ModellingTabWidget.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..85bc76df17803259afab49620828b86f2a330e60
--- /dev/null
+++ b/DataView/ModellingTabWidget.cpp
@@ -0,0 +1,26 @@
+/**
+ * \file ModellingTabWidget.cpp
+ * 2010/12/14 KR Initial implementation
+ *
+ * Implementation of StationTabWidget
+ */
+
+// ** INCLUDES **
+#include "ProcessModel.h"
+#include "ModellingTabWidget.h"
+
+ModellingTabWidget::ModellingTabWidget( QWidget* parent /*= 0*/ )
+	: QWidget(parent)
+{
+	setupUi(this);
+}
+
+void ModellingTabWidget::on_addProcessButton_pressed()
+{
+	emit requestNewProcess();
+}
+
+void ModellingTabWidget::on_deleteAllButton_pressed()
+{
+	static_cast<ProcessModel*>(this->treeView->model())->removeAllProcesses();
+}
diff --git a/DataView/ModellingTabWidget.h b/DataView/ModellingTabWidget.h
new file mode 100644
index 0000000000000000000000000000000000000000..6a741be7b02671445f7f3ade5bb3b98c465ef14f
--- /dev/null
+++ b/DataView/ModellingTabWidget.h
@@ -0,0 +1,31 @@
+/**
+ * \file ModellingTabWidget.h
+ * 2010/12/14 KR Initial implementation
+ *
+ */
+
+#ifndef MODELLINGTABWIDGET_H
+#define MODELLINGTABWIDGET_H
+
+// ** INCLUDES **
+#include "ui_ModellingTabWidgetBase.h"
+
+/**
+ * \brief Widget containing the ProcessView.
+ */
+class ModellingTabWidget : public QWidget, public Ui_ModellingTabWidgetBase
+{
+	Q_OBJECT
+
+public:
+	ModellingTabWidget(QWidget* parent = 0);
+
+private slots:
+	void on_addProcessButton_pressed();
+	void on_deleteAllButton_pressed();
+
+signals:
+	void requestNewProcess();
+};
+
+#endif // MODELLINGTABWIDGET_H
diff --git a/DataView/ModellingTabWidgetBase.ui b/DataView/ModellingTabWidgetBase.ui
new file mode 100644
index 0000000000000000000000000000000000000000..d5ede9a4f068c67071fa36ad29cd9d0a27b778e0
--- /dev/null
+++ b/DataView/ModellingTabWidgetBase.ui
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>ModellingTabWidgetBase</class>
+ <widget class="QWidget" name="ModellingTabWidgetBase">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>250</width>
+    <height>500</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Form</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <property name="margin">
+    <number>2</number>
+   </property>
+   <item>
+    <widget class="ProcessView" name="treeView"/>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" name="horizontalLayout">
+     <item>
+      <widget class="QPushButton" name="addProcessButton">
+       <property name="text">
+        <string>Add process...</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="deleteAllButton">
+       <property name="text">
+        <string>Remove All</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <customwidgets>
+  <customwidget>
+   <class>ProcessView</class>
+   <extends>QTreeView</extends>
+   <header>ProcessView.h</header>
+  </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/DataView/MshEditDialog.h b/DataView/MshEditDialog.h
index 3b115a02bfd1a250b01da878f5add1da5d257bf3..214c04dabdfd767a0a912b4d124e090ce6bbbd05 100644
--- a/DataView/MshEditDialog.h
+++ b/DataView/MshEditDialog.h
@@ -7,7 +7,7 @@
 #define MSHEDITDIALOG_H
 
 #include "ui_MshEdit.h"
-#include <QtGui/QMainWindow>
+#include <QDialog>
 
 #include "MshLayerMapper.h"
 
diff --git a/DataView/MshLayerMapper.cpp b/DataView/MshLayerMapper.cpp
index 5322f611425a82425f76bc6f33a6a700937e6f5c..f79cb3cb52518fc19a7558efc82908414edf42b5 100644
--- a/DataView/MshLayerMapper.cpp
+++ b/DataView/MshLayerMapper.cpp
@@ -51,7 +51,7 @@ MeshLib::CFEMesh* MshLayerMapper::CreateLayers(const MeshLib::CFEMesh* mesh,
 			for (size_t i = 0; i < nElems; i++)
 			{
 				MeshLib::CElem* elem( new MeshLib::CElem() );
-				size_t nElemNodes = mesh->ele_vector[i]->nodes_index.Size();
+				size_t nElemNodes = mesh->ele_vector[i]->getNodeIndices().Size();
 				if (mesh->ele_vector[i]->GetElementType() == MshElemType::TRIANGLE)
 					elem->setElementProperties(MshElemType::PRISM);                                           // extrude triangles to prism
 				else if (mesh->ele_vector[i]->GetElementType() == MshElemType::QUAD)
@@ -72,7 +72,7 @@ MeshLib::CFEMesh* MshLayerMapper::CreateLayers(const MeshLib::CFEMesh* mesh,
 				}
 				elem->SetPatchIndex(layer_id - 1);
 				elem->SetNodesNumber(2 * nElemNodes);
-				elem->nodes_index.resize(2 * nElemNodes);
+				elem->getNodeIndices().resize(2 * nElemNodes);
 				for (size_t j = 0; j < nElemNodes; j++)
 				{
 					long idx = mesh->ele_vector[i]->GetNodeIndex(j);
@@ -85,7 +85,7 @@ MeshLib::CFEMesh* MshLayerMapper::CreateLayers(const MeshLib::CFEMesh* mesh,
 		}
 	}
 
-	new_mesh->setNumberOfElementsFromElementsVectorSize ();
+	new_mesh->setNumberOfNodesFromNodesVectorSize ();
 	new_mesh->setNumberOfMeshLayers(nLayers);
 
 	// HACK this crashes on linux systems probably because of uninitialised variables in the the element class
@@ -415,15 +415,15 @@ void MshLayerMapper::CheckLayerMapping(MeshLib::CFEMesh* mesh, const size_t nLay
 			new_elem->SetNodesNumber(4);
 
 			Math_Group::vec<MeshLib::CNode*> nodes(4);
-			nodes[0] = mesh->nod_vector[elem->nodes_index[a]];
-			nodes[1] = mesh->nod_vector[elem->nodes_index[b + 3]];
-			nodes[2] = mesh->nod_vector[elem->nodes_index[c + 3]];
-			nodes[3] = mesh->nod_vector[elem->nodes_index[c]];
+			nodes[0] = mesh->nod_vector[elem->getNodeIndices()[a]];
+			nodes[1] = mesh->nod_vector[elem->getNodeIndices()[b + 3]];
+			nodes[2] = mesh->nod_vector[elem->getNodeIndices()[c + 3]];
+			nodes[3] = mesh->nod_vector[elem->getNodeIndices()[c]];
 			new_elem->SetNodes(nodes, true);
 
-			new_elem->nodes_index.resize(4);
+			new_elem->getNodeIndices().resize(4);
 			for (size_t k = 0; k < 4; k++)
-				new_elem->nodes_index[k] = elem->GetNode(k)->GetIndex();
+				new_elem->getNodeIndices()[k] = elem->GetNode(k)->GetIndex();
 			new_elems.push_back(new_elem);
 
 			// change prism-element to 2nd tetrahedron
@@ -431,15 +431,15 @@ void MshLayerMapper::CheckLayerMapping(MeshLib::CFEMesh* mesh, const size_t nLay
 			elem->SetElementType(MshElemType::TETRAHEDRON);
 			elem->SetNodesNumber(4);
 
-			nodes[0] = mesh->nod_vector[elem->nodes_index[b]];
-			nodes[1] = mesh->nod_vector[elem->nodes_index[a]];
-			nodes[2] = mesh->nod_vector[elem->nodes_index[c]];
-			nodes[3] = mesh->nod_vector[elem->nodes_index[b + 3]];
+			nodes[0] = mesh->nod_vector[elem->getNodeIndices()[b]];
+			nodes[1] = mesh->nod_vector[elem->getNodeIndices()[a]];
+			nodes[2] = mesh->nod_vector[elem->getNodeIndices()[c]];
+			nodes[3] = mesh->nod_vector[elem->getNodeIndices()[b + 3]];
 			elem->SetNodes(nodes, true);
 
-			elem->nodes_index.resize(4);
+			elem->getNodeIndices().resize(4);
 			for (size_t k = 0; k < 4; k++)
-				elem->nodes_index[k] = elem->GetNode(k)->GetIndex();
+				elem->getNodeIndices()[k] = elem->GetNode(k)->GetIndex();
 			break;
 		}
 		case 2: // two nodes of the prism are marked false, i.e. create a tetrahedron element from the remaining 4 prism nodes
@@ -457,15 +457,15 @@ void MshLayerMapper::CheckLayerMapping(MeshLib::CFEMesh* mesh, const size_t nLay
 			elem->SetNodesNumber(4);
 
 			Math_Group::vec<MeshLib::CNode*> nodes(4);
-			nodes[0] = mesh->nod_vector[elem->nodes_index[b]];
-			nodes[1] = mesh->nod_vector[elem->nodes_index[a]];
-			nodes[2] = mesh->nod_vector[elem->nodes_index[c]];
-			nodes[3] = mesh->nod_vector[elem->nodes_index[a + 3]];
+			nodes[0] = mesh->nod_vector[elem->getNodeIndices()[b]];
+			nodes[1] = mesh->nod_vector[elem->getNodeIndices()[a]];
+			nodes[2] = mesh->nod_vector[elem->getNodeIndices()[c]];
+			nodes[3] = mesh->nod_vector[elem->getNodeIndices()[a + 3]];
 			elem->SetNodes(nodes, true);
 
-			elem->nodes_index.resize(4);
+			elem->getNodeIndices().resize(4);
 			for (size_t k = 0; k < 4; k++)
-				elem->nodes_index[k] = elem->GetNode(k)->GetIndex();
+				elem->getNodeIndices()[k] = elem->GetNode(k)->GetIndex();
 			/*
 			   //for j, l nodes if they becomes on top surface. 24.02.2009. WW
 			   if (node_b->GetBoundaryType()=='1')
@@ -541,7 +541,7 @@ void MshLayerMapper::CheckLayerMapping(MeshLib::CFEMesh* mesh, const size_t nLay
 	nElems = mesh->ele_vector.size();
 	for(size_t i = 0; i < nElems; i++)
 		for(int j = 0; j < mesh->ele_vector[i]->GetVertexNumber(); j++)
-			mesh->ele_vector[i]->nodes_index[j] =
+			mesh->ele_vector[i]->getNodeIndices()[j] =
 			        mesh->ele_vector[i]->GetNode(j)->GetIndex();
 
 	// delete elements if two of its nodes are identical (can this actually happen?????)
@@ -610,7 +610,7 @@ void MshLayerMapper::CheckLayerMapping(MeshLib::CFEMesh* mesh, const size_t nLay
 	nElems = mesh->ele_vector.size();
 	for (size_t i = 0; i < nElems; i++)
 		for (int j = 0; j < mesh->ele_vector[i]->GetVertexNumber(); j++)
-			mesh->ele_vector[i]->nodes_index[j] =
+			mesh->ele_vector[i]->getNodeIndices()[j] =
 			        mesh->ele_vector[i]->GetNode(j)->GetIndex();
 
 	mesh->ConstructGrid();
diff --git a/DataView/MshQualitySelectionDialog.h b/DataView/MshQualitySelectionDialog.h
index e10bf7b3de0f63ec1a7f2f8288f4ea00e176cfae..a74d3e2a4e3a6b24a55af3223b135d927f508423 100644
--- a/DataView/MshQualitySelectionDialog.h
+++ b/DataView/MshQualitySelectionDialog.h
@@ -8,6 +8,7 @@
 
 #include "MSHEnums.h"
 #include "ui_MshQualitySelection.h"
+#include <QDialog>
 
 class VtkMeshSource;
 
diff --git a/DataView/MshTabWidget.cpp b/DataView/MshTabWidget.cpp
index cd9ff9c46bfb0f4fbd5974eab48b3ec48c121184..fbe82e62f1c54af2b81f0e695c0df90890ee7498 100644
--- a/DataView/MshTabWidget.cpp
+++ b/DataView/MshTabWidget.cpp
@@ -16,52 +16,4 @@ MshTabWidget::MshTabWidget( QWidget* parent /*= 0*/ )
 
 	connect(this->addMeshPushButton, SIGNAL(clicked()), this->treeView, SLOT(addMeshAction()));
 	connect(this->clearAllPushButton, SIGNAL(clicked()), this->treeView, SLOT(removeAllMeshes()));
-
-/*
-    mshTableView->setSelectionMode(QAbstractItemView::ExtendedSelection);
-    mshTableView->setSelectionBehavior(QAbstractItemView::SelectRows);
-    mshNodeTableView->setSelectionMode(QAbstractItemView::ExtendedSelection);
-    mshNodeTableView->setSelectionBehavior(QAbstractItemView::SelectRows);
-
-    connect(mshTableView, SIGNAL(itemSelectionChanged(QItemSelection, QItemSelection)),
-        this, SLOT(changeMshSubmodelViews(QItemSelection, QItemSelection)));
- */
 }
-
-/*
-   void MshTabWidget::changeMshSubmodelViews( QItemSelection selected, QItemSelection deselected )
-   {
-
-    if (selected.size() > 0)
-    {
-        QModelIndex index = *(selected.begin()->indexes().begin());
-        if (!index.isValid())
-            return;
-
-        MshModel* mshModel = static_cast<MshModel*>(mshTableView->model());
-
-        ModelItem* item = mshModel->itemFromIndex(index);
-
-        mshNodeTableView->setModel(item->models()[0]);
-        mshNodeTableView->resizeColumnsToContents();
-        mshNodeTableView->resizeRowsToContents();
-
-        connect(mshNodeTableView, SIGNAL(itemSelectionChanged(const QItemSelection&,const QItemSelection&)),
-            item->models()[0], SLOT(setSelection(const QItemSelection&, const QItemSelection&)));
-
-   //		connect(item->models()[0], SIGNAL(dataChanged(QModelIndex,QModelIndex)), _scene, SLOT(updateItems(QModelIndex,QModelIndex)));
-   //		connect(item->models()[1], SIGNAL(dataChanged(QModelIndex,QModelIndex)), _scene, SLOT(updateItems(QModelIndex,QModelIndex)));
-
-        mshElemTableView->setModel(item->models()[1]);
-        mshElemTableView->resizeColumnsToContents();
-        mshElemTableView->resizeRowsToContents();
-
-    }
-    else
-    {
-        mshNodeTableView->setModel(NULL);
-        mshElemTableView->setModel(NULL);
-    }
-
-   }
- */
diff --git a/DataView/NewProcess.ui b/DataView/NewProcess.ui
new file mode 100644
index 0000000000000000000000000000000000000000..25b20ce6ef69b1d0d28941e4bcebb766c5f17d9d
--- /dev/null
+++ b/DataView/NewProcess.ui
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>NewProcess</class>
+ <widget class="QDialog" name="NewProcess">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>350</width>
+    <height>160</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Create new process...</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout">
+   <property name="horizontalSpacing">
+    <number>18</number>
+   </property>
+   <item row="2" column="3">
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="2">
+    <widget class="QLabel" name="pvLabel">
+     <property name="text">
+      <string>Select Primary Variable</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="3">
+    <widget class="QComboBox" name="pvTypeBox"/>
+   </item>
+   <item row="0" column="2">
+    <widget class="QLabel" name="processLabel">
+     <property name="text">
+      <string>Select Process Type</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="3">
+    <widget class="QComboBox" name="processTypeBox"/>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>NewProcess</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>NewProcess</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/DataView/NewProcessDialog.cpp b/DataView/NewProcessDialog.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..91c2a80c25e73c51d33c36dada175750da35ea77
--- /dev/null
+++ b/DataView/NewProcessDialog.cpp
@@ -0,0 +1,42 @@
+/**
+ * \file NewProcessDialog.cpp
+ * 2011/11/17 KR Initial implementation
+ */
+
+#include "NewProcessDialog.h"
+#include "FEMEnums.h"
+#include "ProcessInfo.h"
+
+
+NewProcessDialog::NewProcessDialog(QDialog* parent)
+: QDialog(parent)
+{
+	setupUi(this);
+	setupDialog();
+}
+
+void NewProcessDialog::setupDialog()
+{
+	const std::list<std::string> process_names = FiniteElement::getAllProcessNames();
+	for (std::list<std::string>::const_iterator it = process_names.begin(); it != process_names.end(); ++it)
+		this->processTypeBox->addItem(QString::fromStdString(*it));
+
+	const std::list<std::string> pv_names = FiniteElement::getAllPrimaryVariableNames();
+	for (std::list<std::string>::const_iterator it = pv_names.begin(); it != pv_names.end(); ++it)
+		this->pvTypeBox->addItem(QString::fromStdString(*it));
+}
+
+void NewProcessDialog::accept()
+{
+	ProcessInfo* info = new ProcessInfo();
+	info->setProcessType(static_cast<FiniteElement::ProcessType>(this->processTypeBox->currentIndex() + 1));
+	info->setProcessPrimaryVariable(static_cast<FiniteElement::PrimaryVariable>(this->pvTypeBox->currentIndex() + 1));
+
+	emit addProcess(info);
+	this->done(QDialog::Accepted);
+}
+
+void NewProcessDialog::reject()
+{
+	this->done(QDialog::Rejected);
+}
diff --git a/DataView/NewProcessDialog.h b/DataView/NewProcessDialog.h
new file mode 100644
index 0000000000000000000000000000000000000000..f189f1b2853ec8555c60cff0b846d75e89f69e4c
--- /dev/null
+++ b/DataView/NewProcessDialog.h
@@ -0,0 +1,43 @@
+/**
+ * \file NewProcessDialog.h
+ * 2011/11/17 KR Initial implementation
+ */
+
+#ifndef NEWPROCESSDIALOG_H
+#define NEWPROCESSDIALOG_H
+
+#include <QDialog>
+
+#include "ui_NewProcess.h"
+
+class ProcessInfo;
+
+/**
+ * \brief A dialog window for adding a new process in GUI
+ */
+class NewProcessDialog : public QDialog, private Ui_NewProcess
+{
+	Q_OBJECT
+
+public:
+	/// Constructor for creating a new FEM condition.
+	NewProcessDialog(QDialog* parent = 0);
+
+	~NewProcessDialog(void) {};
+
+private:
+	void setupDialog();
+
+private slots:
+	/// Instructions if the OK-Button has been pressed.
+	void accept();
+
+	/// Instructions if the Cancel-Button has been pressed.
+	void reject();
+
+signals:
+	void addProcess(ProcessInfo*);
+
+};
+
+#endif //NEWPROCESSDIALOG_H
diff --git a/DataView/OGSRaster.cpp b/DataView/OGSRaster.cpp
index ed198ff2ea0ff407920212e072157a8aeefcd6fe..b5727f52c5925b8917f370519d1d667253a5e214 100644
--- a/DataView/OGSRaster.cpp
+++ b/DataView/OGSRaster.cpp
@@ -34,12 +34,7 @@ bool OGSRaster::loadImage(const QString &fileName, QImage &raster, QPointF &orig
 		if (!loadImageFromASC(fileName, raster, origin, scalingFactor, autoscale))
 			return false;
 		if (mirrorX)
-			raster = raster.transformed(QTransform(1,
-			                                       0,
-			                                       0,
-			                                       -1,
-			                                       0,
-			                                       0), Qt::FastTransformation);
+			raster = raster.transformed(QTransform(1, 0, 0, -1, 0, 0), Qt::FastTransformation);
 	}
 #ifdef libgeotiff_FOUND
 	else if (fileInfo.suffix().toLower() == "tif")
@@ -47,12 +42,7 @@ bool OGSRaster::loadImage(const QString &fileName, QImage &raster, QPointF &orig
 		if (!loadImageFromTIFF(fileName, raster, origin, scalingFactor))
 			return false;
 		if (!mirrorX)
-			raster = raster.transformed(QTransform(1,
-			                                       0,
-			                                       0,
-			                                       -1,
-			                                       0,
-			                                       0), Qt::FastTransformation);
+			raster = raster.transformed(QTransform(1, 0, 0, -1, 0, 0), Qt::FastTransformation);
 	}
 #endif
 	else if (!loadImageFromFile(fileName, raster))
@@ -94,12 +84,8 @@ bool OGSRaster::loadImageFromASC(const QString &fileName,
 				pixVal[index + i] = strtod(replaceString(",", ".", s).c_str(),0);
 				if (pixVal[index + i] != header.noData)
 				{ // find intensity bounds but ignore noData values
-					minVal =
-					        (pixVal[index +
-					                i] < minVal) ? pixVal[index + i] : minVal;
-					maxVal =
-					        (pixVal[index +
-					                i] > maxVal) ? pixVal[index + i] : maxVal;
+					minVal = (pixVal[index + i] < minVal) ? pixVal[index + i] : minVal;
+					maxVal = (pixVal[index + i] > maxVal) ? pixVal[index + i] : maxVal;
 				}
 			}
 		}
@@ -117,14 +103,9 @@ bool OGSRaster::loadImageFromASC(const QString &fileName,
 			{ // scale intensities and set nodata values to zero (black)
 				if (pixVal[index + i] != header.noData)
 				{
-					value =
-					        (pixVal[index + i] ==
-					         header.noData) ? minVal : pixVal[index + i];
-					gVal =
-					        (autoscale) ? static_cast<int> (floor((value -
-					                                               minVal) *
-					                                              scalingFactor))
-						: static_cast<int> (value);
+					value = pixVal[index + i];
+					gVal = (autoscale) ? 
+						static_cast<int> (floor((value -minVal) * scalingFactor)) : static_cast<int> (value);
 					//gVal = value; // saudi arabia
 					img.setPixel(i,j, qRgba(gVal, gVal, gVal, 255));
 				}
@@ -197,9 +178,10 @@ bool OGSRaster::readASCHeader(ascHeader &header, std::ifstream &in)
 	else
 		return false;
 
-	// correct raster position by half a pixel for correct visualisation
-	header.x = header.x + (header.cellsize / 2);
-	header.y = header.y + (header.cellsize / 2);
+	// correct raster position by half a pixel for correct visualisation 
+	// argh! wrong! correction has to happen in visualisation object, otherwise the actual data is wrong
+	//header.x = header.x + (header.cellsize / 2);
+	//header.y = header.y + (header.cellsize / 2);
 
 	return true;
 }
diff --git a/DataView/ProcessItem.h b/DataView/ProcessItem.h
new file mode 100644
index 0000000000000000000000000000000000000000..cc71efb691789f356715853a10f90b5d9c63e8d5
--- /dev/null
+++ b/DataView/ProcessItem.h
@@ -0,0 +1,34 @@
+/**
+ * \file ProcessItem.h
+ * 2011/11/22 KR Initial implementation
+ */
+
+#ifndef PROCESSITEM_H
+#define PROCESSITEM_H
+
+#include "TreeItem.h"
+#include "ProcessInfo.h"
+
+/**
+ * \brief A TreeItem representing process information.
+ * \sa TreeItem
+ */
+class ProcessItem : public TreeItem
+{
+public:
+	/// Constructor
+	ProcessItem(const QList<QVariant> &data, TreeItem* parent, const ProcessInfo* pcs)
+		: TreeItem(data, parent), _item(pcs)
+	{
+	}
+
+	~ProcessItem() {}
+
+	/// Returns the	Process Information associated with the item.
+	const ProcessInfo* getItem() { return _item; }
+
+private:
+	const ProcessInfo* _item;
+};
+
+#endif //PROCESSITEM_H
diff --git a/DataView/ProcessModel.cpp b/DataView/ProcessModel.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..7076c75582c14abfdc1fa5ad0099fa74f58393fa
--- /dev/null
+++ b/DataView/ProcessModel.cpp
@@ -0,0 +1,267 @@
+/**
+ * \file ProcessModel.cpp
+ * 18/10/2010 KR Initial implementation
+ */
+
+// ** INCLUDES **
+#include "ProcessItem.h"
+#include "CondObjectListItem.h"
+#include "CondItem.h"
+#include "ProcessItem.h"
+#include "ProcessModel.h"
+#include "FEMCondition.h"
+#include "GEOObjects.h"
+#include "GeoObject.h"
+#include "GeoType.h"
+
+#include <QFileInfo>
+#include <vtkPolyDataAlgorithm.h>
+
+ProcessModel::ProcessModel( ProjectData &project, QObject* parent /*= 0*/ )
+	: TreeModel(parent), _project(project)
+{
+	QList<QVariant> rootData;
+	delete _rootItem;
+	rootData << "Name" << "Value" << "" << "" << "";
+	_rootItem = new TreeItem(rootData, NULL);
+}
+
+ProcessModel::~ProcessModel()
+{
+}
+
+int ProcessModel::columnCount( const QModelIndex &parent /*= QModelIndex()*/ ) const
+{
+	Q_UNUSED(parent)
+
+	return 2;
+}
+
+void ProcessModel::addConditionItem(FEMCondition* c)
+{
+	ProcessItem* processParent = this->getProcessParent(c->getProcessType());
+	if (processParent == NULL)
+	{
+		ProcessInfo* pcs = new ProcessInfo(c->getProcessType(), c->getProcessPrimaryVariable(), NULL);
+		processParent = this->addProcess(pcs);
+	}
+
+	CondObjectListItem* condParent = this->getCondParent(processParent, c->getCondType());
+	if (condParent == NULL)
+		condParent = this->createCondParent(processParent, c->getCondType(), c->getAssociatedGeometryName());
+
+	if (condParent)
+	{
+		QList<QVariant> condData;
+		condData << QString::fromStdString(c->getGeoName()) 
+			     << QString::fromStdString(c->getGeoTypeAsString());
+		CondItem* condItem = new CondItem(condData, condParent, c);
+		condParent->appendChild(condItem);
+		// add process information
+		//QList<QVariant> pcsData;
+		//pcsData << QString::fromStdString(convertProcessTypeToString(c->getProcessType()));
+		//TreeItem* pcsInfo = new TreeItem(pcsData, condItem);
+		// add information on primary variable
+		QList<QVariant> pvData;
+		pvData << QString::fromStdString(convertPrimaryVariableToString(c->getProcessPrimaryVariable()));
+		TreeItem* pvInfo = new TreeItem(pvData, condItem);
+		// add distribution information
+		QList<QVariant> disData;
+		disData << QString::fromStdString(convertDisTypeToString(c->getProcessDistributionType()));
+		std::vector<double> dis_value = c->getDisValue();
+		TreeItem* disInfo;
+		if (c->getProcessDistributionType() == FiniteElement::CONSTANT ||
+		    c->getProcessDistributionType() == FiniteElement::CONSTANT_NEUMANN)
+		{
+			//for (size_t i = 0; i < dis_value.size(); i++)
+			disData << dis_value[0];
+			disInfo = new TreeItem(disData, condItem);
+		}
+		else
+		{
+			size_t nVals = dis_value.size() / 2;
+			disData << static_cast<int>(nVals);
+			disInfo = new TreeItem(disData, condItem);
+			for (size_t i = 0; i < nVals; i++)
+			{
+				QList<QVariant> linData;
+				linData << dis_value[2 * i] << dis_value[2 * i + 1];
+				TreeItem* linInfo = new TreeItem(linData, disInfo);
+				disInfo->appendChild(linInfo);
+			}
+		}
+
+		//condItem->appendChild(pcsInfo);
+		condItem->appendChild(pvInfo);
+		condItem->appendChild(disInfo);
+
+		condParent->addCondition(c);
+		reset();
+	}
+	else
+		std::cout << "Error in ProcessModel::addConditionItem() - Parent object not found..." << std::endl;
+}
+
+void ProcessModel::addCondition(FEMCondition* condition)
+{
+	const bool is_domain = (condition->getGeoType() == GEOLIB::GEODOMAIN) ? true : false;
+
+	const GEOLIB::GeoObject* object = condition->getGeoObj();
+	if (object == NULL)
+	{
+		object = _project.getGEOObjects()->getGEOObject(
+						 condition->getAssociatedGeometryName(),
+						 condition->getGeoType(),
+						 condition->getGeoName());
+		condition->setGeoObj(object);
+	}
+	if (object || is_domain)
+	{
+		_project.addCondition(condition);
+		this->addConditionItem(condition);
+	}
+	else
+		std::cout << "Error in ProcessModel::addConditions() - Specified geometrical object \""
+		          << condition->getGeoName() << "\" not found in associated geometry..." 
+				  << std::endl;
+}
+
+void ProcessModel::addConditions(std::vector<FEMCondition*> &conditions)
+{
+	for (size_t i = 0; i < conditions.size(); i++)
+		this->addCondition(conditions[i]);
+}
+
+ProcessItem* ProcessModel::addProcess(ProcessInfo *pcs)
+{
+	if (this->getProcessParent(pcs->getProcessType()) == NULL)
+	{
+		this->_project.addProcess(pcs);
+		QList<QVariant> processData;
+		processData << QVariant(QString::fromStdString(FiniteElement::convertProcessTypeToString(pcs->getProcessType()))) << "";
+		ProcessItem* process = new ProcessItem(processData, _rootItem, pcs);
+		_rootItem->appendChild(process);
+		reset();
+		return process;
+	}
+	else
+	{
+		std::cout << "Warning in ProcessModel::addProcess() - " 
+			      << FiniteElement::convertProcessTypeToString(pcs->getProcessType()) 
+				  << " already exists." << std::endl;
+		return NULL;
+	}
+}
+
+void ProcessModel::removeFEMConditions(const FiniteElement::ProcessType pcs_type, const std::string &geometry_name, const FEMCondition::CondType cond_type)
+{
+	_project.removeConditions(pcs_type, geometry_name, cond_type);
+
+	while (_rootItem->childCount()>0)
+	{
+		ProcessItem* pcs = static_cast<ProcessItem*>(_rootItem->child(0));
+		for (int j=0; j<pcs->childCount(); j++)
+			emit conditionsRemoved(this, pcs->getItem()->getProcessType(), (static_cast<CondObjectListItem*>(pcs->child(j)))->getType());
+
+		_rootItem->removeChildren(0, 1);
+	}
+
+	const std::vector<FEMCondition*> conds = _project.getConditions(FiniteElement::INVALID_PROCESS, "", FEMCondition::UNSPECIFIED);
+	if (!conds.empty())
+	{
+		size_t nConds (conds.size());
+		for (size_t i=0; i<nConds; i++)
+			this->addConditionItem(conds[i]);
+	}
+	reset();
+}
+
+void ProcessModel::removeProcess(const FiniteElement::ProcessType type)
+{
+	this->removeFEMConditions(type, "", FEMCondition::UNSPECIFIED);
+	
+	const ProcessItem* processParent = this->getProcessParent(type);
+	if (processParent)
+	{
+		this->_project.removeProcess(type);
+		removeRows(processParent->row(), 1, QModelIndex());
+	}
+	reset();
+}
+
+void ProcessModel::removeAllProcesses()
+{
+	int nProcesses = _rootItem->childCount();
+	for (int i=0; i<nProcesses; i++)
+	{
+		ProcessItem* item = static_cast<ProcessItem*>(_rootItem->child(i));
+		removeProcess(item->getItem()->getProcessType());
+	}
+}
+
+int ProcessModel::getGEOIndex(const std::string &geo_name,
+                                GEOLIB::GEOTYPE type,
+                                const std::string &obj_name) const
+{
+	bool exists(false);
+	size_t idx(0);
+	if (type == GEOLIB::POINT)
+		exists = this->_project.getGEOObjects()->getPointVecObj(geo_name)->getElementIDByName(obj_name, idx);
+	else if (type == GEOLIB::POLYLINE)
+		exists = this->_project.getGEOObjects()->getPolylineVecObj(geo_name)->getElementIDByName(obj_name,idx);
+	else if (type == GEOLIB::SURFACE)
+		exists = this->_project.getGEOObjects()->getSurfaceVecObj(geo_name)->getElementIDByName(obj_name,idx);
+
+	if (exists)
+		return static_cast<int>(idx);
+	return -1;
+}
+
+ProcessItem* ProcessModel::getProcessParent(const FiniteElement::ProcessType type) const
+{
+	int nLists = _rootItem->childCount();
+	for (int i = 0; i < nLists; i++)
+		if (static_cast<ProcessItem*>(_rootItem->child(i))->getItem()->getProcessType() == type)
+			return static_cast<ProcessItem*>(_rootItem->child(i));
+
+	return NULL;
+}
+
+CondObjectListItem* ProcessModel::getCondParent(TreeItem* parent, const FEMCondition::CondType type)
+{
+	int nLists = parent->childCount();
+	for (int i = 0; i < nLists; i++)
+		if (dynamic_cast<CondObjectListItem*>(parent->child(i))->getType() == type)
+			return dynamic_cast<CondObjectListItem*>(parent->child(i));
+	return NULL;
+}
+
+CondObjectListItem* ProcessModel::createCondParent(ProcessItem* parent, const FEMCondition::CondType cond_type, const std::string &geometry_name)
+{
+	QString condType(QString::fromStdString(FEMCondition::condTypeToString(cond_type)));
+	QList<QVariant> condData;
+	condData << condType << "";
+
+	const std::vector<GEOLIB::Point*>* pnts = _project.getGEOObjects()->getPointVec(geometry_name);
+	if (pnts)
+	{
+		CondObjectListItem* cond = new CondObjectListItem(condData, parent, cond_type, pnts);
+		parent->appendChild(cond);
+		emit conditionAdded(this, parent->getItem()->getProcessType(), cond_type);
+		return cond;
+	}
+
+	return NULL;
+}
+
+vtkPolyDataAlgorithm* ProcessModel::vtkSource(const FiniteElement::ProcessType pcs_type, const FEMCondition::CondType cond_type)
+{
+	ProcessItem* processParent = this->getProcessParent(pcs_type);
+	if (processParent)
+	{
+		CondObjectListItem* condParent = this->getCondParent(processParent, cond_type);
+		if (condParent)
+			return condParent->vtkSource();
+	}
+	return NULL;
+}
diff --git a/DataView/ProcessModel.h b/DataView/ProcessModel.h
new file mode 100644
index 0000000000000000000000000000000000000000..0970502eeae70eeacef6686e0014163937a9c191
--- /dev/null
+++ b/DataView/ProcessModel.h
@@ -0,0 +1,87 @@
+/**
+ * \file ProcessModel.h
+ * 18/10/2010 KR Initial implementation
+ */
+
+#ifndef PROCESSMODEL_H
+#define PROCESSMODEL_H
+
+// ** INCLUDES **
+#include "ProjectData.h"
+#include "TreeModel.h"
+
+class FEMCondition;
+class ProcessItem;
+class CondObjectListItem;
+class vtkPolyDataAlgorithm;
+
+namespace GEOLIB
+{
+class GeoObject;
+}
+
+/**
+ * \brief A model implementing a tree structure for process-relevant information such as
+ * process types, FEM-Conditions (BCs, ICs, STs), etc. as a double-linked list.
+ * \sa TreeModel, ProcessView, TreeItem, CondObjectListItem
+ */
+class ProcessModel : public TreeModel
+{
+	Q_OBJECT
+
+public:
+	ProcessModel(ProjectData &project, QObject* parent = 0);
+	~ProcessModel();
+
+	int columnCount(const QModelIndex& parent = QModelIndex()) const;
+	/// Returns the vtk source object for the specified subtree of a process with the given name.
+	vtkPolyDataAlgorithm* vtkSource(const FiniteElement::ProcessType pcs_type, const FEMCondition::CondType cond_type);
+
+public slots:
+	/// Adds a vector of FEM Conditions to the model. Objects in the vector can consist of BCs, ICs or STs in any combination and sequence.
+	void addConditions(std::vector<FEMCondition*> &conditions);
+
+	/// Adds a single FEM Conditions to the model
+	void addCondition(FEMCondition* condition);
+
+	/// Adds a process to the model
+	ProcessItem* addProcess(ProcessInfo* pcs);
+
+	/// Removes FEMConditions from the the model. Conditions can be specified by process type, geometry name or condition type or a combination of the three.
+	void removeFEMConditions(const FiniteElement::ProcessType pcs_type, const std::string &geometry_name, const FEMCondition::CondType cond_type);
+
+	/// Removes a process from the model
+	void removeProcess(const FiniteElement::ProcessType type);
+
+	/// Removes all processes from the model
+	void removeAllProcesses();
+
+private:
+	/// Adds a new FEM condition to the condition tree model.
+	void addConditionItem(FEMCondition* condition);
+
+	/// Removes the FEM condition with the given index.
+	//bool removeConditionItem(const QModelIndex &idx);
+
+	/// Creates the TreeItem for one of the condition subtrees.
+	CondObjectListItem* createCondParent(ProcessItem* parent, const FEMCondition::CondType type, const std::string &geometry_name);
+
+	/// Returns the subtree-item for a given type of condtion.
+	CondObjectListItem* getCondParent(TreeItem* parent, const FEMCondition::CondType type) ;
+
+	/// Returns the subtree item for a process with the given name. If create_item is true, this item will be created if it doesn't exist yet.
+	ProcessItem* getProcessParent(const FiniteElement::ProcessType type) const;
+
+	/// Returns the index of a geometric item of the given name and type for the associated geometry.
+	int getGEOIndex(const std::string &geo_name,
+	                GEOLIB::GEOTYPE type,
+	                const std::string &obj_name) const;
+
+	ProjectData& _project;
+
+signals:
+	void conditionAdded(ProcessModel*, const FiniteElement::ProcessType, const FEMCondition::CondType);
+	void conditionsRemoved(ProcessModel*, const FiniteElement::ProcessType, const FEMCondition::CondType);
+};
+
+#endif // PROCESSMODEL_H
diff --git a/DataView/ProcessView.cpp b/DataView/ProcessView.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..d71ef1beab4d350321bc79ee7145bbe9673f2c88
--- /dev/null
+++ b/DataView/ProcessView.cpp
@@ -0,0 +1,88 @@
+/**
+ * \file ProcessView.cpp
+ * 2010/12/13 KR Initial implementation
+ */
+
+#include <QMenu>
+#include <QFileDialog>
+
+#include "ProcessItem.h"
+#include "CondObjectListItem.h"
+#include "ProcessModel.h"
+#include "ProcessView.h"
+
+
+ProcessView::ProcessView(QWidget* parent) : QTreeView(parent)
+{
+}
+
+void ProcessView::updateView()
+{
+	setAlternatingRowColors(true);
+	resizeColumnToContents(0);
+	setColumnWidth(1,50);
+	setColumnWidth(2,50);
+}
+
+void ProcessView::on_Clicked(QModelIndex idx)
+{
+	qDebug("%d, %d",idx.parent().row(), idx.row());
+}
+
+void ProcessView::selectionChanged( const QItemSelection &selected,
+                                      const QItemSelection &deselected )
+{
+	emit itemSelectionChanged(selected, deselected);
+	return QTreeView::selectionChanged(selected, deselected);
+}
+
+void ProcessView::contextMenuEvent( QContextMenuEvent* event )
+{
+	Q_UNUSED(event);
+
+	ProcessItem* pcs_item = dynamic_cast<ProcessItem*>(static_cast<ProcessModel*>(this->model())->
+	                                          getItem(this->selectionModel()->currentIndex()));
+	CondObjectListItem* cond_item =
+	        dynamic_cast<CondObjectListItem*>(static_cast<ProcessModel*>(this->model())->
+	                                          getItem(this->selectionModel()->currentIndex()));
+
+	if (pcs_item || cond_item)
+	{
+		QMenu menu;
+		if (cond_item)
+		{
+			QAction* removeCondAction    = menu.addAction("Remove conditions");
+			connect(removeCondAction, SIGNAL(triggered()), this, SLOT(removeCondition()));
+		}
+
+		if (pcs_item)
+		{
+			QAction* removePCSAction    = menu.addAction("Remove process");
+			connect(removePCSAction, SIGNAL(triggered()), this, SLOT(removeProcess()));
+		}
+		menu.exec(event->globalPos());
+	}
+}
+
+void ProcessView::removeCondition()
+{
+	CondObjectListItem* item = dynamic_cast<CondObjectListItem*>(static_cast<ProcessModel*>(this->model())->getItem(this->selectionModel()->currentIndex()));
+	
+	if (item)
+	{
+		const FiniteElement::ProcessType pcs_type = static_cast<ProcessItem*>(item->parentItem())->getItem()->getProcessType();
+		const FEMCondition::CondType cond_type = item->getType();
+		emit conditionsRemoved(pcs_type, "", cond_type);
+	}
+}
+
+void ProcessView::removeProcess()
+{
+	ProcessItem* item = dynamic_cast<ProcessItem*>(static_cast<ProcessModel*>(this->model())->getItem(this->selectionModel()->currentIndex()));
+	
+	if (item)
+	{
+		const FiniteElement::ProcessType pcs_type = item->getItem()->getProcessType();
+		emit processRemoved(pcs_type);
+	}
+}
diff --git a/DataView/ConditionView.h b/DataView/ProcessView.h
similarity index 66%
rename from DataView/ConditionView.h
rename to DataView/ProcessView.h
index 619da4366aa65c969e1ddab9b2521f281c11e5aa..d868fa21c75b9063f9be5e368bb6f93a3b126e94 100644
--- a/DataView/ConditionView.h
+++ b/DataView/ProcessView.h
@@ -1,10 +1,10 @@
 /**
- * \file ConditionView.h
+ * \file ProcessView.h
  * 2010/12/13 KR Initial implementation
  */
 
-#ifndef CONDITIONVIEW_H
-#define CONDITIONVIEW_H
+#ifndef PROCESSVIEW_H
+#define PROCESSVIEW_H
 
 #include <QContextMenuEvent>
 #include <QTreeView>
@@ -18,13 +18,13 @@ class ConditionModel;
  * information such as Process Type, Distribution, etc.
  * \sa ConditionModel, CondItem
  */
-class ConditionView : public QTreeView
+class ProcessView : public QTreeView
 {
 	Q_OBJECT
 
 public:
 	/// Constructor
-	ConditionView(QWidget* parent = 0);
+	ProcessView(QWidget* parent = 0);
 
 	/// Update the view to visualise changes made to the underlying data
 	void updateView();
@@ -40,12 +40,12 @@ private:
 private slots:
 	void on_Clicked(QModelIndex idx);
 	void removeCondition();
-	//void removeAllConditions();
+	void removeProcess();
 
 signals:
-	void itemSelectionChanged(const QItemSelection & selected,
-	                          const QItemSelection & deselected);
-	void conditionsRemoved(QString, FEMCondition::CondType);
+	void conditionsRemoved(const FiniteElement::ProcessType, const std::string&, const FEMCondition::CondType);
+	void itemSelectionChanged(const QItemSelection & selected, const QItemSelection & deselected);
+	void processRemoved(const FiniteElement::ProcessType);
 };
 
-#endif //CONDITIONVIEW_H
+#endif //PROCESSVIEW_H
diff --git a/DataView/QueryResultsDialog.h b/DataView/QueryResultsDialog.h
index fa6dc45a947e7da325609d0ee5e6806455a6e4dc..2e374b32784d479e8d506f55a33e93c81264e0ff 100644
--- a/DataView/QueryResultsDialog.h
+++ b/DataView/QueryResultsDialog.h
@@ -8,7 +8,7 @@
 
 #include "ui_DatabaseResultView.h"
 #include <QSqlQueryModel>
-#include <QtGui/QMainWindow>
+#include <QDialog>
 
 /**
  * \brief A Dialog for displaying the results of a database query in a table.
diff --git a/DataView/SHPImportDialog.h b/DataView/SHPImportDialog.h
index 82813e3dae2a39db9f95a12ed417a20ff0dd25e2..59e834978cc167263911853391a29a2a6f51b02c 100644
--- a/DataView/SHPImportDialog.h
+++ b/DataView/SHPImportDialog.h
@@ -7,7 +7,6 @@
 #define SHPIMPORTDIALOG_H
 
 #include <QDialog>
-#include <QtGui/QMainWindow>
 
 class SHPInterface;
 class GEOModels;
diff --git a/DataView/SetNameDialog.cpp b/DataView/SetNameDialog.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..2f0ffb19468f4f9c3afa3fb3f01fe957ee116c94
--- /dev/null
+++ b/DataView/SetNameDialog.cpp
@@ -0,0 +1,57 @@
+/**
+ * \file SetNameDialog.cpp
+ * 2011/10/26 KR Initial implementation
+ */
+
+#include "SetNameDialog.h"
+
+#include <QDialogButtonBox>
+#include <QDialogButtonBox>
+#include <QLabel>
+#include <QLineEdit>
+#include <QVBoxLayout>
+
+SetNameDialog::SetNameDialog(const std::string &parent_name, const std::string &object_type_name, size_t id, const std::string &old_name = "", QDialog* parent) :
+	QDialog(parent), _parent_name(parent_name), _object_type_name(object_type_name), _id(id)
+{
+	setupDialog(old_name);
+	show();
+}
+
+SetNameDialog::~SetNameDialog()
+{
+	delete _buttonBox;
+	delete _layout;
+	delete _new_name;
+	delete _txt_label;
+}
+
+void SetNameDialog::setupDialog(const std::string &old_name)
+{
+	_layout = new QVBoxLayout(this);
+	QString dialog_text("Please enter a name for " + QString::fromStdString(_object_type_name) + " #" + QString::number(_id));
+	_txt_label = new QLabel(this);
+	_txt_label->setText(dialog_text);
+	_new_name = new QLineEdit(QString::fromStdString(old_name));
+
+	setWindowTitle("Set name...");
+	_layout->addWidget( _txt_label );
+	_layout->addWidget( _new_name );
+	_buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
+	connect(_buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
+	connect(_buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
+	_layout->addWidget( _buttonBox );
+
+	setLayout(_layout);
+}
+
+void SetNameDialog::accept()
+{
+	emit requestNameChange(_parent_name, GEOLIB::convertGeoType(_object_type_name), _id, _new_name->text().toStdString());
+	this->done(QDialog::Accepted);
+}
+
+void SetNameDialog::reject()
+{
+	this->done(QDialog::Rejected);
+}
diff --git a/DataView/SetNameDialog.h b/DataView/SetNameDialog.h
new file mode 100644
index 0000000000000000000000000000000000000000..9b95132d410c92958f867ed2f7409a6431578deb
--- /dev/null
+++ b/DataView/SetNameDialog.h
@@ -0,0 +1,59 @@
+/**
+ * \file SetNameDialog.h
+ * 2011/10/26 KR Initial implementation
+ */
+
+#ifndef SETNAMEDIALOG_H
+#define SETNAMEDIALOG_H
+
+#include "GeoType.h"
+
+#include <QDialog>
+
+class QDialogButtonBox;
+class QLabel;
+class QLineEdit;
+class QVBoxLayout;
+
+/**
+ * \brief Small dialog for setting a name for an object.
+ */
+class SetNameDialog : public QDialog
+{
+	Q_OBJECT
+
+public:
+	/// Constructor
+	SetNameDialog(const std::string &parent_name, 
+				  const std::string &object_type_name, 
+				  size_t id, 
+				  const std::string &old_name, 
+				  QDialog* parent = 0);
+	~SetNameDialog();
+
+	QDialogButtonBox* _buttonBox; /// The buttons used in this dialog.
+
+private:
+	/// Constructs a dialog window
+	void setupDialog(const std::string &old_name);
+
+	QLabel* _txt_label;
+	QLineEdit* _new_name;
+	QVBoxLayout* _layout;
+
+	std::string _parent_name;
+	std::string _object_type_name;
+	size_t _id;
+
+private slots:
+	/// Instructions if the OK-Button has been pressed.
+	void accept();
+
+	/// Instructions if the Cancel-Button has been pressed.
+	void reject();
+
+signals:
+	void requestNameChange(const std::string&, const GEOLIB::GEOTYPE, size_t, std::string);
+};
+
+#endif //SETNAMEDIALOG_H
diff --git a/Gui/CMakeLists.txt b/Gui/CMakeLists.txt
index 3fa240d092085509ddddb2bb69ffb47a8fcd0f58..7c5479c8ad52fcbb33e4db658a0fe06bd5d262ab 100644
--- a/Gui/CMakeLists.txt
+++ b/Gui/CMakeLists.txt
@@ -93,9 +93,13 @@ IF (Shapelib_FOUND)
 	TARGET_LINK_LIBRARIES( ogs-gui ${Shapelib_LIBRARIES} )
 ENDIF () # Shapelib_FOUND
 
-IF (libtiff_FOUND AND libgeotiff_FOUND)
-	TARGET_LINK_LIBRARIES( ogs-gui ${libtiff_LIBRARIES} ${libgeotiff_LIBRARIES} )
-ENDIF () # libtiff_FOUND AND libgeotiff_FOUND
+IF (libgeotiff_FOUND)
+	TARGET_LINK_LIBRARIES( ogs-gui ${libgeotiff_LIBRARIES} )
+ENDIF () # libgeotiff_FOUND
+
+IF (libtiff_FOUND)
+	TARGET_LINK_LIBRARIES( ogs-gui ${libtiff_LIBRARIES} )
+ENDIF () # libtiff_FOUND
 
 ADD_DEPENDENCIES ( ogs-gui VtkVis OGSProject )
 
@@ -104,6 +108,10 @@ IF(MSVC)
 	SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:MSVCRT")
 ENDIF(MSVC)
 
+IF(OGS_BUILD_INFO)
+	ADD_DEFINITIONS(-DOGS_BUILD_INFO)
+ENDIF() # OGS_BUILD_INFO
+
 ### OpenSG support ###
 IF (OGS_USE_OPENSG)
 	USE_OPENSG(ogs-gui)
diff --git a/Gui/mainwindow.cpp b/Gui/mainwindow.cpp
index c7dca3b5073398d0398c70c83f95812dbbc57270..58028f7a1b26bc0821c75bb14f4636729903a818 100644
--- a/Gui/mainwindow.cpp
+++ b/Gui/mainwindow.cpp
@@ -7,7 +7,7 @@
 #include "mainwindow.h"
 
 // models
-#include "ConditionModel.h"
+#include "ProcessModel.h"
 #include "ElementTreeModel.h"
 #include "GEOModels.h"
 #include "GeoTreeModel.h"
@@ -17,10 +17,13 @@
 //dialogs
 #include "DBConnectionDialog.h"
 #include "DiagramPrefsDialog.h"
+#include "FEMConditionSetupDialog.h"
 #include "GMSHPrefsDialog.h"
 #include "LineEditDialog.h"
 #include "ListPropertiesDialog.h"
 #include "MshQualitySelectionDialog.h"
+#include "NewProcessDialog.h"
+#include "SetNameDialog.h"
 #include "VisPrefsDialog.h"
 #include "VtkAddFilterDialog.h"
 
@@ -47,7 +50,6 @@
 #include "rf_bc_new.h"
 #include "rf_ic_new.h"
 #include "rf_st_new.h"
-#include "wait.h"
 
 // FileIO includes
 #include "FEFLOWInterface.h"
@@ -60,7 +62,10 @@
 #include "OGSIOVer4.h"
 #include "PetrelInterface.h"
 #include "StationIO.h"
-#include "XMLInterface.h"
+#include "XmlIO/XmlCndInterface.h"
+#include "XmlIO/XmlGmlInterface.h"
+#include "XmlIO/XmlGspInterface.h"
+#include "XmlIO/XmlStnInterface.h"
 
 #include "StringTools.h"
 
@@ -74,6 +79,7 @@
 #include <QDesktopWidget>
 #include <QFileDialog>
 #include <QMessageBox>
+#include <QObject>
 #include <QSettings>
 
 // VTK includes
@@ -93,6 +99,15 @@
 #include "VtkTrackedCamera.h"
 #endif // OGS_USE_VRPN
 
+#ifdef OGS_BUILD_INFO
+#include "BuildInfo.h"
+#endif // OGS_BUILD_INFO
+
+//// test only
+//#include "rf_mmp_new.h"
+//#include "rf_msp_new.h"
+//#include "rf_mfp_new.h"
+
 /// FEM. 11.03.2010. WW
 #include "problem.h"
 Problem* aproblem = NULL;
@@ -109,29 +124,25 @@ MainWindow::MainWindow(QWidget* parent /* = 0*/)
 	_project.setGEOObjects(_geoModels);
 	_meshModels = new MshModel(_project);
 	_elementModel = new ElementTreeModel();
-	_conditionModel = new ConditionModel(_project);
+	_processModel = new ProcessModel(_project);
 
 	geoTabWidget->treeView->setModel(_geoModels->getGeoModel());
 	stationTabWidget->treeView->setModel(_geoModels->getStationModel());
 	mshTabWidget->treeView->setModel(_meshModels);
 	mshTabWidget->elementView->setModel(_elementModel);
-	conditionTabWidget->treeView->setModel(_conditionModel);
+	modellingTabWidget->treeView->setModel(_processModel);
 
 	// vtk visualization pipeline
 	_vtkVisPipeline = new VtkVisPipeline(visualizationWidget->renderer());
 
 	// station model connects
-	connect(stationTabWidget->treeView,
-	        SIGNAL(stationListExportRequested(std::string, std::string)),
+	connect(stationTabWidget->treeView, SIGNAL(stationListExportRequested(std::string, std::string)),
 	        this, SLOT(exportBoreholesToGMS(std::string, std::string))); // export Stationlist to GMS
-	connect(stationTabWidget->treeView,
-	        SIGNAL(stationListRemoved(std::string)), _geoModels,
+	connect(stationTabWidget->treeView, SIGNAL(stationListRemoved(std::string)), _geoModels,
 	        SLOT(removeStationVec(std::string))); // update model when stations are removed
-	connect(stationTabWidget->treeView,
-	        SIGNAL(stationListSaved(QString, QString)), this,
+	connect(stationTabWidget->treeView, SIGNAL(stationListSaved(QString, QString)), this,
 	        SLOT(writeStationListToFile(QString, QString))); // save Stationlist to File
-	connect(_geoModels,
-	        SIGNAL(stationVectorRemoved(StationTreeModel *, std::string)),
+	connect(_geoModels, SIGNAL(stationVectorRemoved(StationTreeModel *, std::string)),
 	        this, SLOT(updateDataViews())); // update data view when stations are removed
 	connect(stationTabWidget->treeView, SIGNAL(diagramRequested(QModelIndex &)),
 	        this, SLOT(showDiagramPrefsDialog(QModelIndex &))); // connect treeview to diagramview
@@ -143,14 +154,23 @@ MainWindow::MainWindow(QWidget* parent /* = 0*/)
 	        this, SLOT(writeGeometryToFile(QString, QString))); // save geometry to file
 	connect(geoTabWidget->treeView, SIGNAL(requestLineEditDialog(const std::string &)),
 	        this, SLOT(showLineEditDialog(const std::string &))); // open line edit dialog
+	connect(geoTabWidget->treeView, SIGNAL(requestNameChangeDialog(const std::string&, const GEOLIB::GEOTYPE, size_t)),
+			this, SLOT(showGeoNameDialog(const std::string&, const GEOLIB::GEOTYPE, size_t)));
+	connect(geoTabWidget->treeView, SIGNAL(requestCondSetupDialog(const std::string&, const GEOLIB::GEOTYPE, size_t)),
+			this, SLOT(showCondSetupDialog(const std::string&, const GEOLIB::GEOTYPE, size_t)));
 	connect(geoTabWidget->treeView, SIGNAL(loadFEMCondFileRequested(std::string)),
-	        this, SLOT(loadFEMConditionsFromFile(std::string))); // add FEM Conditions
+	        this, SLOT(loadFEMConditions(std::string))); // add FEM Conditions
+	connect(geoTabWidget->treeView, SIGNAL(saveFEMConditionsRequested(QString, QString)),
+	        this, SLOT(writeFEMConditionsToFile(QString, QString)));
 	connect(_geoModels, SIGNAL(geoDataAdded(GeoTreeModel *, std::string, GEOLIB::GEOTYPE)),
 	        this, SLOT(updateDataViews()));
 	connect(_geoModels, SIGNAL(geoDataRemoved(GeoTreeModel *, std::string, GEOLIB::GEOTYPE)),
 	        this, SLOT(updateDataViews()));
-	//connect(_geoModels, SIGNAL(geoDataRemoved(GeoTreeModel*, std::string, GEOLIB::GEOTYPE)),
-	//	_conditionModel, SLOT(removeFEMConditions(std::string, GEOLIB::GEOTYPE)));
+	connect(geoTabWidget->treeView, SIGNAL(geoItemSelected(const vtkPolyDataAlgorithm*, int)),
+		    _vtkVisPipeline, SLOT(highlightGeoObject(const vtkPolyDataAlgorithm*, int)));
+	connect(geoTabWidget->treeView, SIGNAL(removeGeoItemSelection()),
+		    _vtkVisPipeline, SLOT(removeHighlightedGeoObject()));
+
 
 	// Setup connections for mesh models to GUI
 	connect(mshTabWidget->treeView, SIGNAL(requestMeshRemoval(const QModelIndex &)),
@@ -159,14 +179,16 @@ MainWindow::MainWindow(QWidget* parent /* = 0*/)
 	        _elementModel, SLOT(clearView()));
 	connect(mshTabWidget->treeView, SIGNAL(qualityCheckRequested(VtkMeshSource*)),
 	        this, SLOT(showMshQualitySelectionDialog(VtkMeshSource*)));
-	connect(mshTabWidget->treeView,
-	        SIGNAL(requestDIRECTSourceTerms(const std::vector<GEOLIB::Point*>*)),
+	connect(mshTabWidget->treeView, SIGNAL(requestDIRECTSourceTerms(const std::vector<GEOLIB::Point*>*)),
 	        this, SLOT(loadDIRECTSourceTerms(const std::vector<GEOLIB::Point*>*)));
 
-	// Setup connections for condition model to GUI
-	connect(conditionTabWidget->treeView,
-	        SIGNAL(conditionsRemoved(QString, FEMCondition::CondType)),
-	        _conditionModel, SLOT(removeFEMConditions(QString, FEMCondition::CondType)));
+	// Setup connections for process model to GUI
+	connect(modellingTabWidget->treeView, SIGNAL(conditionsRemoved(const FiniteElement::ProcessType, const std::string&, const FEMCondition::CondType)),
+	        _processModel, SLOT(removeFEMConditions(const FiniteElement::ProcessType, const std::string&, const FEMCondition::CondType)));
+	connect(modellingTabWidget->treeView, SIGNAL(processRemoved(const FiniteElement::ProcessType)),
+	        _processModel, SLOT(removeProcess(const FiniteElement::ProcessType)));
+	connect(modellingTabWidget, SIGNAL(requestNewProcess()),
+		    this, SLOT(showNewProcessDialog()));
 
 	// VisPipeline Connects
 	connect(_geoModels, SIGNAL(geoDataAdded(GeoTreeModel *, std::string, GEOLIB::GEOTYPE)),
@@ -174,14 +196,10 @@ MainWindow::MainWindow(QWidget* parent /* = 0*/)
 	connect(_geoModels, SIGNAL(geoDataRemoved(GeoTreeModel *, std::string, GEOLIB::GEOTYPE)),
 	        _vtkVisPipeline, SLOT(removeSourceItem(GeoTreeModel *, std::string, GEOLIB::GEOTYPE)));
 
-	connect(_conditionModel,
-	        SIGNAL(conditionAdded(ConditionModel *, std::string, FEMCondition::CondType)),
-	        _vtkVisPipeline,
-	        SLOT(addPipelineItem(ConditionModel *, std::string, FEMCondition::CondType)));
-	connect(_conditionModel,
-	        SIGNAL(conditionsRemoved(ConditionModel *, std::string, FEMCondition::CondType)),
-	        _vtkVisPipeline,
-	        SLOT(removeSourceItem(ConditionModel *, std::string, FEMCondition::CondType)));
+	connect(_processModel, SIGNAL(conditionAdded(ProcessModel *,  const FiniteElement::ProcessType, const FEMCondition::CondType)),
+	        _vtkVisPipeline, SLOT(addPipelineItem(ProcessModel *,  const FiniteElement::ProcessType, const FEMCondition::CondType)));
+	connect(_processModel, SIGNAL(conditionsRemoved(ProcessModel *, const FiniteElement::ProcessType, const FEMCondition::CondType)),
+	        _vtkVisPipeline, SLOT(removeSourceItem(ProcessModel *, const FiniteElement::ProcessType, const FEMCondition::CondType)));
 
 	connect(_geoModels, SIGNAL(stationVectorAdded(StationTreeModel *, std::string)),
 	        _vtkVisPipeline, SLOT(addPipelineItem(StationTreeModel *, std::string)));
@@ -237,8 +255,8 @@ MainWindow::MainWindow(QWidget* parent /* = 0*/)
 
 	// Stack the data dock widgets together
 	tabifyDockWidget(geoDock, mshDock);
-	tabifyDockWidget(mshDock, conditionDock);
-	tabifyDockWidget(conditionDock, stationDock);
+	tabifyDockWidget(mshDock, modellingDock);
+	tabifyDockWidget(modellingDock, stationDock);
 
 	// Restore window geometry
 	readSettings();
@@ -283,9 +301,9 @@ MainWindow::MainWindow(QWidget* parent /* = 0*/)
 	        SLOT(showMshDockWidget(bool)));
 	menuWindows->addAction(showMshDockAction);
 
-	QAction* showCondDockAction = conditionDock->toggleViewAction();
-	showCondDockAction->setStatusTip(tr("Shows / hides the FEM conditions view"));
-	connect(showCondDockAction, SIGNAL(triggered(bool)), this,
+	QAction* showModellingDockAction = modellingDock->toggleViewAction();
+	showModellingDockAction->setStatusTip(tr("Shows / hides the Process view"));
+	connect(showModellingDockAction, SIGNAL(triggered(bool)), this,
 	        SLOT(showMshDockWidget(bool)));
 	menuWindows->addAction(showMshDockAction);
 
@@ -341,6 +359,9 @@ MainWindow::MainWindow(QWidget* parent /* = 0*/)
 	//	std::cout << "size of CBoundaryCondition: " << sizeof (CBoundaryCondition) << std::endl;
 
 	//	std::cout << "size of CElement: " << sizeof (FiniteElement::CElement) << std::endl;
+//		std::cout << "size of CMediumProperties: " << sizeof(CMediumProperties) << std::endl;
+//		std::cout << "size of CSolidProperties: " << sizeof(SolidProp::CSolidProperties) << std::endl;
+//		std::cout << "size of CFluidProperties: " << sizeof(CFluidProperties) << std::endl;
 	//	std::cout << "size of CRFProcess: " << sizeof (CRFProcess) << std::endl;
 	//	std::cout << "size of CFEMesh: " << sizeof (MeshLib::CFEMesh) << std::endl;
 }
@@ -350,7 +371,7 @@ MainWindow::~MainWindow()
 	delete _db;
 	delete _vtkVisPipeline;
 	delete _meshModels;
-	delete _conditionModel;
+	delete _processModel;
 	//delete _visPrefsDialog;
 	//delete _geoModels;
 
@@ -392,9 +413,9 @@ void MainWindow::showMshDockWidget(bool show)
 void MainWindow::showConditionDockWidget(bool show)
 {
 	if (show)
-		conditionDock->show();
+		modellingDock->show();
 	else
-		conditionDock->hide();
+		modellingDock->hide();
 }
 
 void MainWindow::showVisDockWidget(bool show)
@@ -408,11 +429,8 @@ void MainWindow::showVisDockWidget(bool show)
 void MainWindow::open()
 {
 	QSettings settings("UFZ", "OpenGeoSys-5");
-	QString fileName = QFileDialog::getOpenFileName( this, "Select data file to open",
-	                                                 settings.value(
-	                                                         "lastOpenedFileDirectory").
-	                                                 toString(),
-	                                                 "Geosys files (*.gsp *.gli *.gml *.msh *.stn);;Project files (*.gsp);;GLI files (*.gli);;MSH files (*.msh);;STN files (*.stn);;All files (* *.*)");
+	QString fileName = QFileDialog::getOpenFileName( this, "Select data file to open",settings.value("lastOpenedFileDirectory").toString(),
+	                                                 "Geosys files (*.gsp *.gli *.gml *.msh *.stn);;Project files (*.gsp);;GeoSys FEM Conditions (*.cnd *.bc *.ic *.st);;GLI files (*.gli);;MSH files (*.msh);;STN files (*.stn);;All files (* *.*)");
 	if (!fileName.isEmpty())
 	{
 		QDir dir = QDir(fileName);
@@ -473,20 +491,15 @@ void MainWindow::save()
 		if (fi.suffix().toLower() == "gsp")
 		{
 			std::string schemaName(_fileFinder.getPath("OpenGeoSysProject.xsd"));
-			XMLInterface xml(&_project, schemaName);
-			xml.writeProjectFile(fileName);
-			/*
-			   } else if (fi.suffix().toLower() == "gml") {
-			    std::string schemaName(_fileFinder.getPath("OpenGeoSysGLI.xsd"));
-			    XMLInterface xml(_geoModels, schemaName);
-			    xml.writeGLIFile(fileName, gliName);
-			 */
+			XmlGspInterface xml(&_project, schemaName);
+			xml.writeFile(fileName);
 		}
 		else if (fi.suffix().toLower() == "geo")
 		{
 			// it works like this (none of it is particularily fast or optimised or anything):
 			// 1. merge all geometries that are currently loaded, all of these will be integrated into the mesh
 			// 2. if "useStationsAsConstraints"-parameter is true, GMSH-Interface will also integrate all stations that are currently loaded
+			//    if "useSteinerPoints"-parameter is true, additional points will be inserted in large areas without information
 			// 3. after the geo-file is created the merged geometry is deleted again as it is no longer needed
 			GMSHInterface gmsh_io(fileName.toStdString());
 			std::vector<std::string> names;
@@ -494,7 +507,7 @@ void MainWindow::save()
 			std::string merge_name("MergedGeometry");
 			_geoModels->mergeGeometries (names, merge_name);
 			gmsh_io.writeGMSHInputFile(merge_name,
-			                           *(this->_project.getGEOObjects()), true);
+			                           *(this->_project.getGEOObjects()), true, true);
 			this->_project.getGEOObjects()->removeSurfaceVec(merge_name);
 			this->_project.getGEOObjects()->removePolylineVec(merge_name);
 			this->_project.getGEOObjects()->removePointVec(merge_name);
@@ -518,8 +531,7 @@ void MainWindow::loadFile(const QString &fileName)
 
 	QApplication::setOverrideCursor(Qt::WaitCursor);
 	QFileInfo fi(fileName);
-	std::string
-	        base =
+	std::string base =
 	        fi.absoluteDir().absoluteFilePath(fi.completeBaseName()).toStdString();
 	if (fi.suffix().toLower() == "gli")
 	{
@@ -528,7 +540,8 @@ void MainWindow::loadFile(const QString &fileName)
 		myTimer0.start();
 #endif
 		//      FileIO::readGLIFileV4 (fileName.toStdString(), _geoModels);
-		readGLIFileV4(fileName.toStdString(), _geoModels);
+		std::string unique_name;
+		readGLIFileV4(fileName.toStdString(), _geoModels, unique_name);
 #ifndef NDEBUG
 		std::cout << myTimer0.elapsed() << " ms" << std::endl;
 #endif
@@ -550,8 +563,8 @@ void MainWindow::loadFile(const QString &fileName)
 	else if (fi.suffix().toLower() == "gsp")
 	{
 		std::string schemaName(_fileFinder.getPath("OpenGeoSysProject.xsd"));
-		XMLInterface xml(&_project, schemaName);
-		xml.readProjectFile(fileName);
+		XmlGspInterface xml(&_project, schemaName);
+		xml.readFile(fileName);
 		std::cout << "Adding missing meshes to GUI..." << std::endl;
 		_meshModels->updateModel();
 	}
@@ -562,8 +575,8 @@ void MainWindow::loadFile(const QString &fileName)
 		myTimer0.start();
 #endif
 		std::string schemaName(_fileFinder.getPath("OpenGeoSysGLI.xsd"));
-		XMLInterface xml(&_project, schemaName);
-		xml.readGLIFile(fileName);
+		XmlGmlInterface xml(&_project, schemaName);
+		xml.readFile(fileName);
 #ifndef NDEBUG
 		std::cout << myTimer0.elapsed() << " ms" << std::endl;
 #endif
@@ -572,8 +585,8 @@ void MainWindow::loadFile(const QString &fileName)
 	else if (fi.suffix().toLower() == "stn")
 	{
 		std::string schemaName(_fileFinder.getPath("OpenGeoSysSTN.xsd"));
-		XMLInterface xml(&_project, schemaName);
-		xml.readSTNFile(fileName);
+		XmlStnInterface xml(&_project, schemaName);
+		xml.readFile(fileName);
 	}
 	// OpenGeoSys mesh files
 	else if (fi.suffix().toLower() == "msh")
@@ -585,6 +598,13 @@ void MainWindow::loadFile(const QString &fileName)
 		else
 			OGSError::box("Failed to load a mesh file.");
 	}
+	else if ((fi.suffix().toLower() == "cnd") ||
+		     (fi.suffix().toLower() == "bc") ||
+			 (fi.suffix().toLower() == "ic") ||
+			 (fi.suffix().toLower() == "st"))
+	{
+		this->loadFEMConditionsFromFile(fileName);
+	}
 
 	// GMS borehole files
 	else if (fi.suffix().toLower() == "txt")
@@ -703,9 +723,23 @@ void MainWindow::writeSettings()
 void MainWindow::about()
 {
 	QString ogsVersion = QString(OGS_VERSION);
-	QMessageBox::about(this, tr("About OpenGeoSys-5"), tr(
-	                           "Built on %1\nOGS Version: %2").arg(
-	                           QDate::currentDate().toString()).arg(ogsVersion));
+
+	QString about = tr("Built on %1\nOGS Version: %2\n\n").arg(
+		QDate::currentDate().toString(Qt::ISODate)).arg(ogsVersion);
+#ifdef OGS_BUILD_INFO
+#ifdef SVN_REVISION
+	about.append(QString("Svn commit: %1\n").arg(SVN_REVISION));
+#endif
+#ifdef GIT_COMMIT_INFO
+	QString gitCommit = QString(GIT_COMMIT_INFO);
+	about.append(QString("Git commit: %1\n").arg(gitCommit.mid(7)));
+#endif // GIT_COMMIT_INFO
+#ifdef GIT_BRANCH_INFO
+	QString gitBranch = QString(GIT_BRANCH_INFO);
+	about.append(QString("Git branch: %1\n").arg(gitBranch.mid(2)));
+#endif // GIT_BRANCH_INFO
+#endif // OGS_BUILD_INFO
+	QMessageBox::about(this, "About OpenGeoSys-5", about);
 }
 
 QMenu* MainWindow::createImportFilesMenu()
@@ -716,9 +750,9 @@ QMenu* MainWindow::createImportFilesMenu()
 	QAction* gmsFiles = importFiles->addAction("G&MS Files...");
 	connect(gmsFiles, SIGNAL(triggered()), this, SLOT(importGMS()));
 	QAction* gocadFiles = importFiles->addAction("&Gocad Files...");
+	connect(gocadFiles, SIGNAL(triggered()), this, SLOT(importGoCad()));
 	QAction* netcdfFiles = importFiles->addAction("&NetCDF Files...");
 	connect(netcdfFiles, SIGNAL(triggered()), this, SLOT(importNetcdf()));
-	connect(gocadFiles, SIGNAL(triggered()), this, SLOT(importGoCad()));
 	QAction* petrelFiles = importFiles->addAction("&Petrel Files...");
 	connect(petrelFiles, SIGNAL(triggered()), this, SLOT(importPetrel()));
 	QAction* rasterFiles = importFiles->addAction("&Raster Files...");
@@ -731,6 +765,8 @@ QMenu* MainWindow::createImportFilesMenu()
 	QAction* shapeFiles = importFiles->addAction("&Shape Files...");
 	connect(shapeFiles, SIGNAL(triggered()), this, SLOT(importShape()));
 #endif
+	QAction* tetgenFiles = importFiles->addAction("&TetGen Files...");
+	connect( tetgenFiles, SIGNAL(triggered()), this, SLOT(importTetGen()) );
 	QAction* vtkFiles = importFiles->addAction("&VTK Files...");
 	connect( vtkFiles, SIGNAL(triggered()), this, SLOT(importVtk()) );
 
@@ -776,13 +812,9 @@ void MainWindow::importRaster()
 #else
 	QString geotiffExtension("");
 #endif
-	QString fileName = QFileDialog::getOpenFileName(this,
-	                                                "Select raster file to import",
-	                                                settings.value(
-	                                                        "lastOpenedFileDirectory").toString(),
-	                                                QString(
-	                                                        "Raster files (*.asc *.bmp *.jpg *.png%1);;")
-	                                                .arg(geotiffExtension));
+	QString fileName = QFileDialog::getOpenFileName(this, "Select raster file to import",
+					settings.value("lastOpenedFileDirectory").toString(), QString(
+									"Raster files (*.asc *.bmp *.jpg *.png%1);;") .arg(geotiffExtension));
 
 	if (!fileName.isEmpty())
 	{
@@ -803,13 +835,10 @@ void MainWindow::importRasterAsPoly()
 #else
 	QString geotiffExtension("");
 #endif
-	QString fileName = QFileDialog::getOpenFileName(this,
-	                                                "Select raster file to import",
-	                                                settings.value(
-	                                                        "lastOpenedFileDirectory").toString(),
-	                                                QString(
-	                                                        "Raster files (*.asc *.bmp *.jpg *.png%1);;")
-	                                                .arg(geotiffExtension));
+	QString fileName = QFileDialog::getOpenFileName(this, "Select raster file to import",
+					settings.value("lastOpenedFileDirectory").toString(), QString(
+									"Raster files (*.asc *.bmp *.jpg *.png%1);;") .arg(
+									geotiffExtension));
 
 	if (!fileName.isEmpty())
 	{
@@ -835,10 +864,8 @@ void MainWindow::importRasterAsPoly()
 void MainWindow::importShape()
 {
 	QSettings settings("UFZ", "OpenGeoSys-5");
-	QString fileName = QFileDialog::getOpenFileName(this,
-	                                                "Select shape file to import",
-	                                                settings.value(
-	                                                        "lastOpenedFileDirectory").toString(),
+	QString fileName = QFileDialog::getOpenFileName(this, "Select shape file to import",
+					settings.value("lastOpenedFileDirectory").toString(),
 	                                                "ESRI Shape files (*.shp );;");
 	QFileInfo fi(fileName);
 
@@ -857,15 +884,9 @@ void MainWindow::importPetrel()
 {
 	QSettings settings("UFZ", "OpenGeoSys-5");
 	QStringList sfc_file_names = QFileDialog::getOpenFileNames(
-	        this,
-	        "Select surface data file(s) to import",
-	        "",
-	        "Petrel files (*)");
+	        this, "Select surface data file(s) to import", "", "Petrel files (*)");
 	QStringList well_path_file_names = QFileDialog::getOpenFileNames(
-	        this,
-	        "Select well path data file(s) to import",
-	        "",
-	        "Petrel files (*)");
+	        this, "Select well path data file(s) to import", "", "Petrel files (*)");
 	if (sfc_file_names.size() != 0 || well_path_file_names.size() != 0)
 	{
 		loadPetrelFiles(sfc_file_names, well_path_file_names);
@@ -891,6 +912,28 @@ void MainWindow::importNetcdf()
 	}
 }
 
+void MainWindow::importTetGen()
+{
+	QSettings settings("UFZ", "OpenGeoSys-5");
+	QString node_fname(QFileDialog::getOpenFileName(this, "Select TetGen node file",
+					settings.value("lastOpenedFileDirectory").toString(),
+					"TetGen node files (*.node);;"));
+	QString element_fname(QFileDialog::getOpenFileName(this, "Select TetGen element file",
+					settings.value("lastOpenedFileDirectory").toString(),
+					"TetGen element files (*.ele);;"));
+
+	if (!node_fname.isEmpty() && !element_fname.isEmpty()) {
+		FileIO::TetGenInterface tetgen;
+		MeshLib::CFEMesh* msh (tetgen.readTetGenMesh(node_fname.toStdString(), element_fname.toStdString()));
+		if (msh) {
+			std::string name(node_fname.toStdString());
+			_meshModels->addMesh(msh, name);
+		} else
+			OGSError::box("Failed to load a TetGen mesh.");
+		settings.setValue("lastOpenedFileDirectory", QDir(node_fname).absolutePath());
+	}
+}
+
 void MainWindow::importVtk()
 {
 	QSettings settings("UFZ", "OpenGeoSys-5");
@@ -954,34 +997,47 @@ void MainWindow::showAddPipelineFilterItemDialog(QModelIndex parentIndex)
 	dlg.exec();
 }
 
-void MainWindow::loadFEMConditionsFromFile(std::string geoName)
+
+void MainWindow::loadFEMConditions(std::string geoName)
 {
 	QSettings settings("UFZ", "OpenGeoSys-5");
 	QString fileName = QFileDialog::getOpenFileName( this, "Select data file to open",
-	                                                 settings.value(
-	                                                         "lastOpenedFileDirectory").
-	                                                 toString(),
-	                                                 "Geosys FEM condition files (*.cnd *.bc *.ic *.st);;All files (* *.*)");
-	if (!fileName.isEmpty())
-	{
-		QFileInfo fi(fileName);
-		QDir dir = QDir(fileName);
-		settings.setValue("lastOpenedFileDirectory", dir.absolutePath());
+														settings.value(
+																"lastOpenedFileDirectory").
+														toString(),
+														"Geosys FEM condition files (*.cnd *.bc *.ic *.st);;All files (* *.*)");
+	QDir dir = QDir(fileName);
+	settings.setValue("lastOpenedFileDirectory", dir.absolutePath());
 
-		std::vector<FEMCondition*> conditions;
+	if (!fileName.isEmpty())
+		this->loadFEMConditionsFromFile(fileName, geoName);
+}
 
-		if (fi.suffix().toLower() == "cnd")
+void MainWindow::loadFEMConditionsFromFile(const QString &fileName, std::string geoName)
+{
+	std::vector<FEMCondition*> conditions;
+	QFileInfo fi(fileName);
+	if (fi.suffix().toLower() == "cnd")
+	{
+		std::string schemaName(_fileFinder.getPath("OpenGeoSysCond.xsd"));
+		XmlCndInterface xml(&_project, schemaName);
+		xml.readFile(conditions, fileName);
+	}
+	else
+	{
+		if (geoName.empty())
 		{
-			std::string schemaName(_fileFinder.getPath("OpenGeoSysCond.xsd"));
-			XMLInterface xml(&_project, schemaName);
-			xml.readFEMCondFile(conditions, fileName, QString::fromStdString(geoName));
+			// assume that geoName is identical to filename of the currently loaded file (but with *.gli-extension)
+			QFileInfo fi(fileName);
+			geoName = fi.fileName().toStdString();
+			geoName = geoName.substr(0, geoName.find_last_of(".")).append(".gli");
 		}
-		else if (fi.suffix().toLower() == "bc")
+		if (fi.suffix().toLower() == "bc")
 		{
 			QString name = fi.path() + "/";
 			BCRead((name.append(fi.baseName())).toStdString(), *_geoModels, geoName);
 			for (std::list<CBoundaryCondition*>::iterator it = bc_list.begin();
-			     it != bc_list.end(); ++it)
+					it != bc_list.end(); ++it)
 			{
 				BoundaryCondition* bc = new BoundaryCondition(*(*it), geoName);
 				conditions.push_back(bc);
@@ -992,7 +1048,7 @@ void MainWindow::loadFEMConditionsFromFile(std::string geoName)
 			QString name = fi.path() + "/";
 			ICRead((name.append(fi.baseName())).toStdString(), *_geoModels, geoName);
 			for (std::vector<CInitialCondition*>::iterator it = ic_vector.begin();
-			     it != ic_vector.end(); ++it)
+					it != ic_vector.end(); ++it)
 			{
 				InitialCondition* ic = new InitialCondition(*(*it), geoName);
 				conditions.push_back(ic);
@@ -1003,43 +1059,49 @@ void MainWindow::loadFEMConditionsFromFile(std::string geoName)
 			QString name = fi.path() + "/";
 			STRead((name.append(fi.baseName())).toStdString(), *_geoModels, geoName);
 			for (std::vector<CSourceTerm*>::iterator it = st_vector.begin();
-			     it != st_vector.end(); ++it)
+					it != st_vector.end(); ++it)
 			{
 				SourceTerm* st = new SourceTerm(*(*it), geoName);
 				conditions.push_back(st);
 			}
 		}
-
-		if (!conditions.empty())
-		{
-			this->_conditionModel->addConditions(conditions);
-
-			for (std::list<CBoundaryCondition*>::iterator it = bc_list.begin();
-			     it != bc_list.end(); ++it)
-				delete *it;
-			bc_list.clear();
-			for (size_t i = 0; i < ic_vector.size(); i++)
-				delete ic_vector[i];
-			ic_vector.clear();
-			for (size_t i = 0; i < st_vector.size(); i++)
-				delete st_vector[i];
-			st_vector.clear();
-		}
+	}
+	if (!conditions.empty())
+	{
+		this->_processModel->addConditions(conditions);
+
+		for (std::list<CBoundaryCondition*>::iterator it = bc_list.begin();
+			    it != bc_list.end(); ++it)
+			delete *it;
+		bc_list.clear();
+		for (size_t i = 0; i < ic_vector.size(); i++)
+			delete ic_vector[i];
+		ic_vector.clear();
+		for (size_t i = 0; i < st_vector.size(); i++)
+			delete st_vector[i];
+		st_vector.clear();
 	}
 }
 
+void MainWindow::writeFEMConditionsToFile(QString geoName, QString fileName)
+{
+	std::string schemaName(_fileFinder.getPath("OpenGeoSysCond.xsd"));
+	XmlCndInterface xml(&_project, schemaName);
+	xml.writeFile(fileName, geoName);
+}
+
 void MainWindow::writeGeometryToFile(QString gliName, QString fileName)
 {
 	std::string schemaName(_fileFinder.getPath("OpenGeoSysGLI.xsd"));
-	XMLInterface xml(&_project, schemaName);
-	xml.writeGLIFile(fileName, gliName);
+	XmlGmlInterface xml(&_project, schemaName);
+	xml.writeFile(fileName, gliName);
 }
 
 void MainWindow::writeStationListToFile(QString listName, QString fileName)
 {
 	std::string schemaName(_fileFinder.getPath("OpenGeoSysSTN.xsd"));
-	XMLInterface xml(&_project, schemaName);
-	xml.writeSTNFile(fileName, listName);
+	XmlStnInterface xml(&_project, schemaName);
+	xml.writeFile(fileName, listName);
 }
 
 void MainWindow::exportBoreholesToGMS(std::string listName,
@@ -1154,30 +1216,58 @@ void MainWindow::showDiagramPrefsDialog()
 	}
 }
 
+void MainWindow::showGeoNameDialog(const std::string &geometry_name, const GEOLIB::GEOTYPE object_type, size_t id)
+{
+	std::string old_name = this->_geoModels->getElementNameByID(geometry_name, object_type, id);
+	SetNameDialog dlg(geometry_name, GEOLIB::convertGeoTypeToString(object_type), id, old_name);
+	connect(&dlg, SIGNAL(requestNameChange(const std::string&, const GEOLIB::GEOTYPE, size_t, std::string)),
+		this->_geoModels, SLOT(addNameForElement(const std::string&, const GEOLIB::GEOTYPE, size_t, std::string)));
+	dlg.exec();
+
+	static_cast<GeoTreeModel*>(this->geoTabWidget->treeView->model())->setNameForItem(geometry_name, object_type,
+		id,	this->_geoModels->getElementNameByID(geometry_name, object_type, id));
+}
+
+void MainWindow::showCondSetupDialog(const std::string &geometry_name, const GEOLIB::GEOTYPE object_type, size_t id)
+{
+	std::string geo_name = this->_geoModels->getElementNameByID(geometry_name, object_type, id);
+	if (geo_name.empty())
+	{
+		this->showGeoNameDialog(geometry_name, object_type, id);
+		geo_name = this->_geoModels->getElementNameByID(geometry_name, object_type, id);
+	}
+	// Object should now have a name ... if not, cancel the setup process
+	if (geo_name.empty())
+		OGSError::box("FEM Condition Setup cancelled.");
+	else
+	{
+		FEMConditionSetupDialog dlg(geometry_name, object_type, geo_name, this->_geoModels->getGEOObject(geometry_name, object_type, geo_name));
+		connect(&dlg, SIGNAL(addFEMCondition(FEMCondition*)), this->_processModel, SLOT(addCondition(FEMCondition*)));
+		dlg.exec();
+	}
+}
+
+void MainWindow::showNewProcessDialog()
+{
+	NewProcessDialog dlg;
+	connect(&dlg , SIGNAL(addProcess(ProcessInfo*)),
+	        _processModel, SLOT(addProcess(ProcessInfo*)));
+	dlg.exec();
+}
+
 void MainWindow::showLineEditDialog(const std::string &geoName)
 {
 	LineEditDialog lineEdit(*(_geoModels->getPolylineVecObj(geoName)));
-	connect(&lineEdit,
-	        SIGNAL(connectPolylines(const std::string &, std::vector<size_t>, double,
-	                                std::string, bool,
-	                                bool)),
-	        _geoModels,
-	        SLOT(connectPolylineSegments(const std::string &, std::vector<size_t>, double,
-	                                     std::string,
-	                                     bool, bool)));
+	connect(&lineEdit, SIGNAL(connectPolylines(const std::string &, std::vector<size_t>, double, std::string, bool, bool)),
+	        _geoModels, SLOT(connectPolylineSegments(const std::string &, std::vector<size_t>, double, std::string, bool, bool)));
 	lineEdit.exec();
 }
 
 void MainWindow::showGMSHPrefsDialog()
 {
 	GMSHPrefsDialog dlg(_geoModels);
-	connect(
-	        &dlg,
-	        SIGNAL(requestMeshing(std::vector<std::string> const &, size_t, double, double,
-	                              double, bool)),
-	        this,
-	        SLOT(callGMSH(std::vector<std::string> const &, size_t, double, double, double,
-	                      bool)));
+	connect(&dlg, SIGNAL(requestMeshing(std::vector<std::string> const &, size_t, double, double, double, bool)),
+	        this, SLOT(callGMSH(std::vector<std::string> const &, size_t, double, double, double, bool)));
 	dlg.exec();
 }
 
@@ -1196,6 +1286,9 @@ void MainWindow::showVisalizationPrefsDialog()
 
 void MainWindow::FEMTestStart()
 {
+	//FEMConditionSetupDialog* dlg = new FEMConditionSetupDialog(this->_project);
+	//dlg->exec();
+
 	// *** begin test TetGen read mesh
 	const std::string path ("/home/fischeth/Desktop/data/Ketzin/PSglobal/Tom/MSH/");
 	std::string mesh_name ("ClosedSurface");
@@ -1208,340 +1301,7 @@ void MainWindow::FEMTestStart()
 	if (mesh)
 		_meshModels->addMesh(mesh, mesh_name);
 	else
-		OGSError::box("Failed to load TetGen mesh file.");
-
-	// *** end test TetGen read mesh
-
-//	// *** begin creating closed surface mesh
-//	{
-//		std::string path("/home/fischeth/Desktop/data/Ketzin/PSglobal/Tom/");
-//		std::string fname(path+"ClosedSurface.geo");
-//		FileIO::GMSHInterface gmsh_io(fname);
-//
-//		std::vector<std::string> geometries;
-//		double param4(0);
-//
-//		// all geos for top surface
-//		geometries.push_back("Boreholes Ketzin Top");
-//		geometries.push_back("CoarseGridPointsAsStationsTop");
-//		geometries.push_back("MiddleGridPointsAsStationsTop");
-//		geometries.push_back("FineGridPointsAsStationsTop");
-//		geometries.push_back("KetzinPolygonTop");
-//		gmsh_io.writeAllDataToGMSHInputFile(*_geoModels,
-//				geometries, param4);
-//
-//		geometries.clear();
-//		// all geos for bottom surface
-//		geometries.push_back("Boreholes Ketzin Bottom");
-//		geometries.push_back("CoarseGridPointsAsStationsBottom");
-//		geometries.push_back("MiddleGridPointsAsStationsBottom");
-//		geometries.push_back("FineGridPointsAsStationsBottom");
-//		geometries.push_back("KetzinPolygonBottom");
-//
-//		gmsh_io.writeAllDataToGMSHInputFile(*_geoModels,
-//				geometries, param4);
-//
-//		geometries.clear();
-//		geometries.push_back("KetzinPolygonNorth");
-//		gmsh_io.writeAllDataToGMSHInputFile(*_geoModels,
-//						geometries, param4);
-//		geometries.clear();
-//		geometries.push_back("KetzinPolygonWest");
-//		gmsh_io.writeAllDataToGMSHInputFile(*_geoModels,
-//						geometries, param4);
-//		geometries.clear();
-//		geometries.push_back("KetzinPolygonSouth");
-//		gmsh_io.writeAllDataToGMSHInputFile(*_geoModels,
-//						geometries, param4);
-//		geometries.clear();
-//		geometries.push_back("KetzinPolygonEast");
-//		gmsh_io.writeAllDataToGMSHInputFile(*_geoModels,
-//						geometries, param4);
-//	}
-//	// *** end creating closed surface mesh
-
-//	// *** begin assign z values
-//	{
-//		// get the surface
-//		std::vector<std::string> geo_names;
-//		_geoModels->getGeometryNames (geo_names);
-//		std::vector<GEOLIB::Surface*> const* sfcs (_geoModels->getSurfaceVec(geo_names[0]));
-//		GEOLIB::Surface const* sfc ((*sfcs)[5]);
-//		const size_t n_triangles (sfc->getNTriangles());
-//		size_t k;
-//
-//		std::vector<GEOLIB::Point*> const* pnts (_geoModels->getPointVec(geo_names[1]));
-//
-//		// write Points (inclusive z values) to file
-//		std::ofstream out ("RasterPointsBottom.stn");
-//		if (out) {
-//			// data
-//			for (size_t n(0); n<pnts->size(); n++) {
-//				// search triangle the point is inside
-//				const double test_pnt[3] = { (*(*pnts)[n])[0], (*(*pnts)[n])[1], 0};
-//				for (k=0; k<n_triangles; k++) {
-//					GEOLIB::Triangle const * const tri ((*sfc)[k]);
-//					if (tri->containsPoint2D(test_pnt)) {
-//						// compute coefficients c0, c1, c2 for the plane f(x,y) = c0 x + c1 y + c2
-//						double c[3];
-//						GEOLIB::getPlaneCoefficients(*tri, c);
-//						const double zval (c[0] * test_pnt[0] + c[1] * test_pnt[1] + c[2]);
-//						out << "    <station x=\"" << test_pnt[0] << "\" y=\"" << test_pnt[1] << "\" z=\"" << zval << "\" id=\"" << n << "\">" << std::endl;
-//						out << "      <name>" << n << "</name>" << std::endl;
-//						out << "    </station>" << std::endl;
-//						break;
-//					}
-//				}
-//				if (k==n_triangles) {
-//					out << n << " " << test_pnt[0] << " " << test_pnt[1] << " -9999" << std::endl;
-//				}
-//			}
-//			out.close();
-//		}
-//	}
-//	// *** end assign z values
-
-//	// *** begin create raster test
-//	{
-//		// get the surface
-//		std::vector<std::string> geo_names;
-//		_geoModels->getGeometryNames (geo_names);
-//		std::vector<GEOLIB::Surface*> const* sfcs (_geoModels->getSurfaceVec(geo_names[0]));
-//		GEOLIB::Surface const* sfc ((*sfcs)[4]);
-//
-//		double cell_size(50);
-//		double no_data_val(-9999);
-//		GEOLIB::Raster my_raster (cell_size, no_data_val);
-//		size_t n_rows(0), n_cols(0);
-//		double *raster (my_raster.getRasterFromSurface(*sfc, n_rows, n_cols));
-//		// write raster to testfile
-//		std::ofstream out ("RasterTop-50m-New.asc");
-//		if (out) {
-//			// write header
-//			out << "ncols\t" << n_cols << std::endl;
-//			out << "nrows\t" << n_rows << std::endl;
-//			out << "xllcorner\t" << (sfc->getAABB().getMinPoint())[0] - 0.5 * cell_size << std::endl;
-//			out << "yllcorner\t" << (sfc->getAABB().getMinPoint())[1] - 0.5 * cell_size << std::endl;
-//			out << "cellsize\t" << cell_size << std::endl;
-//			out << "NODATA_value\t" << no_data_val << std::endl;
-//			// data
-//			for (size_t r(0); r<n_rows; r++) {
-//				for (size_t c(0); c<n_cols-1; c++) {
-//					out << raster[r*n_cols+c] << " ";
-//				}
-//				out << raster[(r+1)*n_cols-1] << std::endl;
-//			}
-//			out.close();
-//		}
-//		delete [] raster;
-//	}
-//	// *** end create raster test
-
-//	// *** begin test CFEMesh::GetNODOnSFC ()
-//	{
-//		// get the surface
-//		std::vector<std::string> geo_names;
-//		_geoModels->getGeometryNames (geo_names);
-//		std::vector<GEOLIB::Surface*> const* sfcs (_geoModels->getSurfaceVec(geo_names[0]));
-//		GEOLIB::Surface const* sfc ((*sfcs)[0]);
-//
-//		std::string mesh_name ("/home/fischeth/Desktop/data/TestData/RectangleVictor/rectangle.msh");
-//		MeshLib::CFEMesh const* mesh (_project.getMesh (mesh_name));
-//
-//		std::vector<size_t> mesh_node_ids;
-//		mesh->GetNODOnSFC(sfc, mesh_node_ids);
-//		std::cout << mesh_node_ids.size() << " mesh nodes found" << std::endl;
-//		for (size_t k(0); k<mesh_node_ids.size(); k++) {
-//			std::cout << mesh_node_ids[k] << "\t" << std::flush;
-//		}
-//		std::cout << std::endl;
-//	}
-//	// *** end test CFEMesh::GetNODOnSFC ()
-
-//	// *** begin test merge geometries
-//	std::vector<std::string> geo_names;
-//	_geoModels->getGeometryNames (geo_names);
-//	std::string merge_name("MergedGeometry");
-//	_geoModels->mergeGeometries (geo_names, merge_name);
-//	// *** end test merge geometries
-
-//	std::string fname_mesh ("SurfaceBC.msh");
-//	FileIO::Gmsh2GeoIO::loadMeshAsGeometry(fname_mesh, _geoModels);
-
-//	{
-//		std::ofstream os ("Points5000000.gli");
-//		if (os) {
-//			os << "#POINTS" << std::endl;
-//			for (size_t k(0); k<5000000; k++) {
-//				os << k << " " << (rand()%1000)/1000.0
-//					<< " " << (rand()%1000)/1000.0
-//					<< " " << (rand()%1000)/1000.0 << std::endl;
-//			}
-//			os << "#STOP" << std::endl;
-//		}
-//	}
-
-//	std::vector<std::string> station_names;
-//		_geoModels->getStationNames (station_names);
-//	if (!station_names.empty()) {
-//		size_t resolution(36);
-//		for (std::vector<std::string>::const_iterator it(station_names.begin()); it
-//				!= station_names.end(); it++) {
-//
-//			std::string project_name("Circle");
-//			project_name += *it;
-//
-//			std::vector<GEOLIB::Point*> *pnts(new std::vector<GEOLIB::Point*>);
-//			const std::vector<GEOLIB::Point*>* middle_pnts(
-//					_geoModels->getPointVec(*it));
-//			std::vector<GEOLIB::Polyline*> *plys(new std::vector<
-//					GEOLIB::Polyline*>);
-//			std::map<std::string, size_t> * ply_names(new std::map<std::string,size_t>);
-//
-//			for (size_t k(0); k < middle_pnts->size(); k++) {
-//				GEOLIB::Polygon *polygon(createPolygonFromCircle(
-//						*((*middle_pnts)[k]), 450.0, *pnts, resolution));
-//				plys->push_back(polygon);
-//				std::string station_name("CircleAreaAroundStation");
-//				if (dynamic_cast<GEOLIB::Station*> ((*middle_pnts)[k])) {
-//					station_name
-//							+= (dynamic_cast<GEOLIB::Station*> ((*middle_pnts)[k])->getName());
-//				} else {
-//					station_name += number2str(k);
-//				}
-//				ply_names->insert(std::pair<std::string, size_t>(station_name,k));
-//			}
-//
-//			_geoModels->addPointVec(pnts, project_name);
-//			_geoModels->addPolylineVec(plys, project_name, ply_names);
-//		}
-//	}
-
-//	if (_geoModels) {
-//		std::vector<std::string> geo_names;
-//		_geoModels->getGeometryNames (geo_names);
-//
-//		if (!geo_names.empty()) {
-//			std::vector<GEOLIB::Polyline*> const* plys (_geoModels->getPolylineVec (geo_names[0]));
-//			std::vector<GEOLIB::Polyline*>* polyline_vec (new std::vector<GEOLIB::Polyline*>);
-//			GEOLIB::Polygon* polygon (NULL);
-//
-//			if (!_meshModels) {
-//				std::cout << "no mesh loaded" << std::endl;
-//			} else {
-//				std::string mesh_name ("model25");
-//				MeshLib::CFEMesh const* mesh ((_meshModels->getMesh (mesh_name))->getCFEMesh());
-//
-//				MeshLib::ExtractMeshNodes extract_mesh_nodes (mesh);
-////				std::vector<GEOLIB::Point*> * pnts_vec (const_cast<std::vector<GEOLIB::Point*>*>(_geoModels->getPointVec(geo_names[0])));
-//				extract_mesh_nodes.getPolygonFromPolyline (*((*plys)[19]), _geoModels, geo_names[0], polygon);
-//				if (polygon)
-//					polyline_vec->push_back (polygon);
-////				extract_mesh_nodes.getPolygonFromPolyline (*((*plys)[1]), *(pnts_vec), polygon);
-////				if (polygon)
-////					polyline_vec->push_back (polygon);
-////				extract_mesh_nodes.getPolygonFromPolyline (*((*plys)[2]), *(pnts_vec), polygon);
-////				if (polygon)
-////					polyline_vec->push_back (polygon);
-////				extract_mesh_nodes.getPolygonFromPolyline (*((*plys)[3]), *(pnts_vec), polygon);
-////				if (polygon)
-////					polyline_vec->push_back (polygon);
-//			}
-//
-//			if (!polyline_vec->empty()) {
-//				if (_geoModels->appendPolylineVec (*polyline_vec, geo_names[0]))
-//					std::cout << "added " << polyline_vec->size() << " polygons" << std::endl;
-//				else
-//					std::cout << "failed to add " << polyline_vec->size() << " polygons" << std::endl;
-//
-//				delete polyline_vec;
-//			}
-//		}
-//	}
-//#ifndef NDEBUG
-//	std::cout << "FEM Test here ..." << std::endl;
-//	QSettings settings("UFZ", "OpenGeoSys-5");
-//
-//	QString fileName = QFileDialog::getOpenFileName(this,
-//			"Select matrix file in binary compressed row storage format", settings.value(
-//					"lastOpenedFileDirectory").toString(),
-//			"binary matrix file (*.bin);;");
-//
-//	std::string fname (fileName.toStdString());
-//	// open input stream
-//	std::ifstream in (fname.c_str(), std::ios::binary);
-//
-//	if (in) {
-//		long n(0), *iA(NULL), *jA(NULL);
-//		double *A(NULL), *rhs(NULL);
-//
-//		std::cout << "reading matrix ... " << std::flush;
-//		// read matrix and right hand side (format provided by WW)
-//		FileIO::readCompressedStorageFmt (in, n, iA, jA, A, rhs);
-//		in.close ();
-//		std::cout << "done" << std::endl;
-//
-//		unsigned n_unsigned (n);
-//		unsigned *iA_unsigned (new unsigned[n_unsigned+1]);
-//		for (unsigned k(0); k<n_unsigned+1; k++)
-//			iA_unsigned[k] = iA[k];
-//
-//		unsigned *jA_unsigned (new unsigned[iA_unsigned[n_unsigned]]);
-//		for (unsigned k(0); k<iA_unsigned[n_unsigned]; k++)
-//			jA_unsigned[k] = jA[k];
-//
-//		// some tests
-//        bool valid(true);
-//		for (unsigned i = 0; i < n_unsigned && valid; ++i) {
-//			const unsigned end (iA_unsigned[i+1]);
-//			for (unsigned k (iA_unsigned[i]); k < end; k++)
-//				if (jA_unsigned[k] >= n_unsigned) {
-//					std::cout << "row " << i << " has column entry ";
-//					std::cout << iA_unsigned[k] << " but matrix has dim ";
-//					std::cout << n_unsigned << " x " << n_unsigned << std::endl;
-//					valid = false;
-//				}
-//		}
-//		if (!valid) {
-//			std::cout << "matrix not in valid format" << std::endl;
-//		} else {
-//	        unsigned min (iA_unsigned[1]-iA_unsigned[0]), max(iA_unsigned[1]-iA_unsigned[0]), max_idx(0), min_idx(0);
-//	        for (unsigned k=0; k<n_unsigned; ++k) {
-//	                unsigned deg = iA_unsigned[k+1]-iA_unsigned[k];
-//	                if (deg < min) {min = deg; min_idx = k;}
-//	                if (deg > max) {max = deg; max_idx = k;}
-//	        }
-//	        std::cout << "\taverage deg: " << double (iA_unsigned[n_unsigned]) / n_unsigned << std::endl;
-//	        std::cout << "\trow " << max_idx << " with max deg " << max << std::endl;
-//	        std::cout << "\trow " << min_idx << " with min deg " << min << std::endl;
-//
-//			// write matrix
-//			std::ofstream mat_out ("testmat.bin", std::ios::out|std::ios::binary);
-//			if (mat_out) {
-//				FileIO::writeCompressedStorageFmt (mat_out, n_unsigned, iA_unsigned, jA_unsigned, A);
-//				mat_out.close();
-//			}
-//			// write right hand side
-//			std::ofstream rhs_out ("rhs.dat");
-//			if (rhs_out) {
-//				for (unsigned k(0); k<n_unsigned; k++) {
-//					rhs_out << rhs[k] << std::endl;
-//				}
-//				rhs_out.close();
-//			}
-//		}
-//
-//		delete [] iA;
-//		delete [] jA;
-//		delete [] iA_unsigned;
-//		delete [] jA_unsigned;
-//		delete [] rhs;
-//		delete [] A;
-//	}
-//
-//#else
-	std::cout << "This is test functionality only..." << std::endl;
-//#endif
+		OGSError::box("Failed to load TetGen mesh file.");	std::cout << "This is test functionality only..." << std::endl;
 }
 
 void MainWindow::showTrackingSettingsDialog()
@@ -1798,14 +1558,12 @@ void MainWindow::loadDIRECTSourceTerms(const std::vector<GEOLIB::Point*>* points
 		this->_geoModels->addPointVec(new_points, geo_name, name_pnt_id_map);
 
 		STRead((name.append(fi.baseName())).toStdString(), *_geoModels, geo_name);
-		std::vector<FEMCondition*> conditions = SourceTerm::createDirectSourceTerms(
-		        st_vector,
-		        geo_name);
+		std::vector<FEMCondition*> conditions = SourceTerm::createDirectSourceTerms(st_vector,geo_name);
 
 		// add boundary conditions to model
 		if (!conditions.empty())
 		{
-			this->_conditionModel->addConditions(conditions);
+			this->_processModel->addConditions(conditions);
 			for (size_t i = 0; i < st_vector.size(); i++)
 				delete st_vector[i];
 			st_vector.clear();
diff --git a/Gui/mainwindow.h b/Gui/mainwindow.h
index 04cba75d6f0094791f789795f1b9fbb862543d56..59baa0513839e87ee21d7a9ed47426584c93157e 100644
--- a/Gui/mainwindow.h
+++ b/Gui/mainwindow.h
@@ -15,7 +15,7 @@ class GEOModels;
 class MshModel;
 class ElementTreeModel;
 class StationTreeModel;
-class ConditionModel;
+class ProcessModel;
 class VtkVisPipeline;
 class DatabaseConnection;
 class VisPrefsDialog;
@@ -74,11 +74,17 @@ protected slots:
 	void importNetcdf(); //YW  07.2010
 	void importVtk();
 	void importFeflow();
-	void loadFEMConditionsFromFile(std::string);
+	void importTetGen();
+	void loadFEMConditions(std::string geoName);
 	void openDatabase();
 	void openDatabaseConnection();
 	void openRecentFile();
 	void about();
+	void showAddPipelineFilterItemDialog(QModelIndex parentIndex);
+	/// Call dialog for creating or modifying FEM conditions.
+	void showCondSetupDialog(const std::string &geometry_name, const GEOLIB::GEOTYPE object_type, size_t id);
+	/// Allows setting the name for a geometric object
+	void showGeoNameDialog(const std::string &geometry_name, const GEOLIB::GEOTYPE object_type, size_t id);
 	/// Calls the diagram prefs dialog from the Tools menu.
 	void showDiagramPrefsDialog();
 	/// Calls the diagram prefs dialog from the station list (i.e. for a specific station).
@@ -86,13 +92,14 @@ protected slots:
 	void showLineEditDialog(const std::string &geoName);
 	void showGMSHPrefsDialog();
 	void showMshQualitySelectionDialog(VtkMeshSource* mshSource);
+	void showNewProcessDialog();
 	void showPropertiesDialog(std::string const& name);
 	void showVisalizationPrefsDialog();
 	void showTrackingSettingsDialog();
 	void updateDataViews();
+	void writeFEMConditionsToFile(QString geoName, QString fileName);
 	void writeGeometryToFile(QString listName, QString fileName);
 	void writeStationListToFile(QString listName, QString fileName);
-	void showAddPipelineFilterItemDialog(QModelIndex parentIndex);
 
 	void on_actionExportVTK_triggered(bool checked = false);
 	void on_actionExportVRML2_triggered(bool checked = false);
@@ -108,6 +115,7 @@ protected slots:
 private:
 	QMenu* createImportFilesMenu();
 	void loadFile(const QString &fileName);
+	void loadFEMConditionsFromFile(const QString &fileName, std::string geoName = "");
 	void loadPetrelFiles(const QStringList &sfc_file_names,
 	                     const QStringList &well_path_file_names);
 
@@ -122,7 +130,7 @@ private:
 	GEOModels* _geoModels;
 	MshModel* _meshModels;
 	ElementTreeModel* _elementModel;
-	ConditionModel* _conditionModel;
+	ProcessModel* _processModel;
 	ProjectData _project;
 	VtkVisPipeline* _vtkVisPipeline;
 	QList<QRect> _screenGeometries;
diff --git a/Gui/mainwindow.ui b/Gui/mainwindow.ui
index e777ae1abb8843fd40676c47d9ed99d84df02e73..aad1c105991f62899c39d6c5fe1b2ba399cc67bf 100644
--- a/Gui/mainwindow.ui
+++ b/Gui/mainwindow.ui
@@ -105,6 +105,8 @@
     <addaction name="actionSave_As"/>
     <addaction name="separator"/>
     <addaction name="menuExport"/>
+    <addaction name="separator"/>
+    <addaction name="separator"/>
     <addaction name="action_Exit"/>
    </widget>
    <widget class="QMenu" name="menuWindows">
@@ -128,10 +130,17 @@
     <addaction name="actionDiagram_Viewer"/>
     <addaction name="actionFEM_Test"/>
    </widget>
+   <widget class="QMenu" name="menuHelp">
+    <property name="title">
+     <string>Help</string>
+    </property>
+    <addaction name="actionAbout"/>
+   </widget>
    <addaction name="menu_File"/>
    <addaction name="menuTools"/>
    <addaction name="menuWindows"/>
    <addaction name="menuSettings"/>
+   <addaction name="menuHelp"/>
   </widget>
   <widget class="QToolBar" name="mainToolBar">
    <attribute name="toolBarArea">
@@ -196,9 +205,9 @@
     </layout>
    </widget>
   </widget>
-  <widget class="QDockWidget" name="conditionDock">
+  <widget class="QDockWidget" name="modellingDock">
    <property name="windowTitle">
-    <string>FEM Conditions</string>
+    <string>Modelling</string>
    </property>
    <attribute name="dockWidgetArea">
     <number>1</number>
@@ -209,7 +218,7 @@
       <number>1</number>
      </property>
      <item>
-      <widget class="ConditionTabWidget" name="conditionTabWidget" native="true"/>
+      <widget class="ModellingTabWidget" name="modellingTabWidget" native="true"/>
      </item>
     </layout>
    </widget>
@@ -379,6 +388,11 @@
     <string>Diagram Viewer...</string>
    </property>
   </action>
+  <action name="actionAbout">
+   <property name="text">
+    <string>About</string>
+   </property>
+  </action>
  </widget>
  <layoutdefault spacing="6" margin="11"/>
  <customwidgets>
@@ -407,15 +421,15 @@
    <container>1</container>
   </customwidget>
   <customwidget>
-   <class>ConditionTabWidget</class>
+   <class>GeoTabWidget</class>
    <extends>QWidget</extends>
-   <header>ConditionTabWidget.h</header>
+   <header>GeoTabWidget.h</header>
    <container>1</container>
   </customwidget>
   <customwidget>
-   <class>GeoTabWidget</class>
+   <class>ModellingTabWidget</class>
    <extends>QWidget</extends>
-   <header>GeoTabWidget.h</header>
+   <header location="global">ModellingTabWidget.h</header>
    <container>1</container>
   </customwidget>
  </customwidgets>
@@ -581,6 +595,22 @@
     </hint>
    </hints>
   </connection>
+  <connection>
+   <sender>actionAbout</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindowClass</receiver>
+   <slot>about()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>400</x>
+     <y>372</y>
+    </hint>
+   </hints>
+  </connection>
  </connections>
  <slots>
   <slot>open()</slot>
@@ -593,5 +623,6 @@
   <slot>showGMSHPrefsDialog()</slot>
   <slot>FEMTestStart()</slot>
   <slot>showDiagramPrefsDialog()</slot>
+  <slot>about()</slot>
  </slots>
 </ui>
diff --git a/VtkVis/CMakeLists.txt b/VtkVis/CMakeLists.txt
index 31a585ba9cbd96865a9f00958b2c84abbee38e4d..d98326dac0bd38de0799b7aad48ba2d3d78e6688 100644
--- a/VtkVis/CMakeLists.txt
+++ b/VtkVis/CMakeLists.txt
@@ -1,5 +1,6 @@
 # Source files
 SET( SOURCES
+	MeshFromRasterDialog.cpp
 	QVtkDataSetMapper.cpp
 	VisPrefsDialog.cpp
 	VisualizationWidget.cpp
@@ -15,6 +16,7 @@ SET( SOURCES
 	VtkCompositeColorByHeightFilter.cpp
 	VtkCompositeColormapToImageFilter.cpp
 	VtkCompositeContourFilter.cpp
+	VtkCompositeGeoObjectFilter.cpp
 	VtkCompositeImageToCylindersFilter.cpp
 	VtkCompositeLineToTubeFilter.cpp
 	VtkCompositePointToGlyphFilter.cpp
@@ -45,6 +47,7 @@ SET( SOURCES
 
 # Moc headers
 SET( MOC_HEADERS
+	MeshFromRasterDialog.h
 	QVtkDataSetMapper.h
 	VisPrefsDialog.h
 	VisualizationWidget.h
@@ -69,6 +72,7 @@ SET( HEADERS
 	VtkCompositeColorByHeightFilter.h
 	VtkCompositeColormapToImageFilter.h
 	VtkCompositeContourFilter.h
+	VtkCompositeGeoObjectFilter.h
 	VtkCompositeImageToCylindersFilter.h
 	VtkCompositeLineToTubeFilter.h
 	VtkCompositePointToGlyphFilter.h
@@ -95,6 +99,7 @@ SET( HEADERS
 
 # UI files
 SET ( UIS
+	MeshFromRaster.ui
 	VtkAddFilterDialogBase.ui
 	VtkVisTabWidgetBase.ui
 	VisualizationWidgetBase.ui
diff --git a/VtkVis/MeshFromRaster.ui b/VtkVis/MeshFromRaster.ui
new file mode 100644
index 0000000000000000000000000000000000000000..32c88e9b8e6d2c4bd5cd9e6021fe3e294f22edb3
--- /dev/null
+++ b/VtkVis/MeshFromRaster.ui
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MeshFromRaster</class>
+ <widget class="QDialog" name="MeshFromRaster">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>350</width>
+    <height>220</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Create mesh from raster...</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout">
+   <item row="2" column="1">
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="interpretationGroupBox">
+     <property name="title">
+      <string>Interpret intensities as</string>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayout">
+      <item>
+       <widget class="QRadioButton" name="elevationButton">
+        <property name="text">
+         <string>Elevation</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="materialButton">
+        <property name="text">
+         <string>Materials</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="ignoreButton">
+        <property name="text">
+         <string>Ignore</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="0" column="1">
+    <widget class="QGroupBox" name="elementTypeGroupBox">
+     <property name="title">
+      <string>Represent pixels as</string>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayout_2">
+      <item>
+       <widget class="QRadioButton" name="triButton">
+        <property name="text">
+         <string>sets of two triangles</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="quadButton">
+        <property name="text">
+         <string>rectangles</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="hexButton">
+        <property name="enabled">
+         <bool>false</bool>
+        </property>
+        <property name="text">
+         <string>hexahedra</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="2" column="0">
+    <spacer name="horizontalSpacer">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>40</width>
+       <height>20</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="1" column="0">
+    <widget class="QLabel" name="mshNameLabel">
+     <property name="layoutDirection">
+      <enum>Qt::LeftToRight</enum>
+     </property>
+     <property name="text">
+      <string>    Name of mesh:</string>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="1">
+    <widget class="QLineEdit" name="mshNameEdit"/>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>MeshFromRaster</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>MeshFromRaster</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/VtkVis/MeshFromRasterDialog.cpp b/VtkVis/MeshFromRasterDialog.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..597a83ca1fbe6e61df516662bab42bf164c95866
--- /dev/null
+++ b/VtkVis/MeshFromRasterDialog.cpp
@@ -0,0 +1,43 @@
+/**
+ * \file MeshFromRasterDialog.cpp
+ * 2011/11/17 KR Initial implementation
+ */
+
+#include "MeshFromRasterDialog.h"
+#include "OGSError.h"
+
+MeshFromRasterDialog::MeshFromRasterDialog(QDialog* parent)
+: QDialog(parent)
+{
+	setupUi(this);
+
+	this->elevationButton->setChecked(true);
+	this->triButton->setChecked(true);
+	this->mshNameEdit->setText("NewMesh");
+}
+
+
+MeshFromRasterDialog::~MeshFromRasterDialog()
+{
+}
+
+
+void MeshFromRasterDialog::accept()
+{
+	UseIntensityAs::type i_type(UseIntensityAs::ELEVATION);
+	if (this->materialButton->isChecked()) i_type = UseIntensityAs::MATERIAL;
+	else if (this->ignoreButton->isChecked()) i_type = UseIntensityAs::NONE;
+
+	MshElemType::type e_type(MshElemType::TRIANGLE);
+	if (this->quadButton->isChecked()) e_type = MshElemType::QUAD;
+	else if (this->hexButton->isChecked()) e_type = MshElemType::HEXAHEDRON;
+
+	emit setMeshParameters(this->mshNameEdit->text(), e_type, i_type);
+	this->done(QDialog::Accepted);
+}
+
+void MeshFromRasterDialog::reject()
+{
+	this->done(QDialog::Rejected);
+}
+
diff --git a/VtkVis/MeshFromRasterDialog.h b/VtkVis/MeshFromRasterDialog.h
new file mode 100644
index 0000000000000000000000000000000000000000..944c4cd2dc480cac5a754c926b8441adda4937a7
--- /dev/null
+++ b/VtkVis/MeshFromRasterDialog.h
@@ -0,0 +1,40 @@
+/**
+ * \file MeshFromRasterDialog.h
+ * 2011/11/17 KR Initial implementation
+ */
+
+#ifndef MSHFROMRASTERDIALOG_H
+#define MSHFROMRASTERDIALOG_H
+
+#include "ui_MeshFromRaster.h"
+#include "VtkMeshConverter.h"
+
+#include <QtGui/QDialog>
+
+
+/**
+ * \brief A dialog for specifying the parameters to construct a mesh based on a raster
+ */
+class MeshFromRasterDialog : public QDialog, private Ui_MeshFromRaster
+{
+	Q_OBJECT
+
+public:
+	/// Constructor
+	MeshFromRasterDialog(QDialog* parent = 0);
+
+	~MeshFromRasterDialog(void);
+
+private slots:
+	/// Instructions if the OK-Button has been pressed.
+	void accept();
+
+	/// Instructions if the Cancel-Button has been pressed.
+	void reject();
+
+signals:
+	void setMeshParameters(QString, MshElemType::type, UseIntensityAs::type);
+
+};
+
+#endif //MSHFROMRASTERDIALOG_H
diff --git a/VtkVis/VtkCompositeContourFilter.cpp b/VtkVis/VtkCompositeContourFilter.cpp
index 0e7ef3bcebb13904096dbf869e081ea97bdc6911..2aeba6dbc7bc19bd464ec1b44fc0484b9bde4843 100644
--- a/VtkVis/VtkCompositeContourFilter.cpp
+++ b/VtkVis/VtkCompositeContourFilter.cpp
@@ -42,7 +42,7 @@ void VtkCompositeContourFilter::init()
 	// Put that list in the property map
 	(*_algorithmUserVectorProperties)["Range"] = contourRangeList;
 
-	// Make a new entry in the property map for the SelectedComponent property
+	// Make a new entry in the property map for the "Number of Values" property
 	(*_algorithmUserProperties)["Number of Contours"] = 10;
 
 	// The threshold filter is last one and so it is also the _outputAlgorithm
diff --git a/VtkVis/VtkCompositeGeoObjectFilter.cpp b/VtkVis/VtkCompositeGeoObjectFilter.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..ea99f754fe8abbec99786942d47a1da6d468d353
--- /dev/null
+++ b/VtkVis/VtkCompositeGeoObjectFilter.cpp
@@ -0,0 +1,97 @@
+/**
+ * \file VtkCompositeGeoObjectFilter.cpp
+ * 2011/12/02 KR Initial implementation
+ *
+ * Implementation of VtkCompositeGeoObjectFilter class
+ */
+
+// ** INCLUDES **
+#include "VtkCompositeGeoObjectFilter.h"
+
+#include <vtkDataSetSurfaceFilter.h>
+#include <vtkSmartPointer.h>
+#include <vtkThreshold.h>
+#include <vtkAlgorithmOutput.h>
+
+#include "VtkPolylinesSource.h"
+#include "VtkSurfacesSource.h"
+#include "VtkCompositePointToGlyphFilter.h"
+#include "VtkCompositeLineToTubeFilter.h"
+
+#include <vtkPointData.h>
+
+VtkCompositeGeoObjectFilter::VtkCompositeGeoObjectFilter( vtkAlgorithm* inputAlgorithm )
+	: VtkCompositeFilter(inputAlgorithm), _type(GEOLIB::POINT), _threshold(vtkThreshold::New())
+{
+	if (inputAlgorithm->GetNumberOfInputPorts() && inputAlgorithm->GetNumberOfInputConnections(0))
+	{
+	  vtkAlgorithmOutput* ao = inputAlgorithm->GetInputConnection(0,0);
+
+	  if (ao)
+	  {
+		vtkAlgorithm* parentAlg = ao->GetProducer();
+
+	  if (dynamic_cast<VtkPolylinesSource*>(parentAlg) != NULL) 
+		_type = GEOLIB::POLYLINE;
+	  else if (dynamic_cast<VtkSurfacesSource*>(parentAlg) != NULL) 
+		_type = GEOLIB::SURFACE;
+	  }
+
+	}
+
+	this->init();
+}
+
+VtkCompositeGeoObjectFilter::~VtkCompositeGeoObjectFilter()
+{
+}
+
+void VtkCompositeGeoObjectFilter::init()
+{
+	this->_inputDataObjectType = VTK_POLY_DATA;
+	this->_outputDataObjectType = VTK_POLY_DATA;
+
+	_threshold->SetInputConnection(_inputAlgorithm->GetOutputPort());
+	_threshold->SetSelectedComponent(0);
+	_threshold->ThresholdBetween(0,0);
+
+	vtkDataSetSurfaceFilter* surface = vtkDataSetSurfaceFilter::New();
+	surface->SetInputConnection(_threshold->GetOutputPort());
+
+	VtkCompositeFilter* composite;
+	if (_type == GEOLIB::POINT)
+	{
+		composite = new VtkCompositePointToGlyphFilter(surface);
+		composite->SetUserProperty("Radius", this->GetInitialRadius());
+		_outputAlgorithm = composite->GetOutputAlgorithm();
+	}
+	else if (_type == GEOLIB::POLYLINE)
+	{
+		composite = new VtkCompositeLineToTubeFilter(surface);
+		composite->SetUserProperty("Radius", this->GetInitialRadius());
+		_outputAlgorithm = composite->GetOutputAlgorithm();
+
+	}
+	else
+		_outputAlgorithm = surface;
+
+}
+
+void VtkCompositeGeoObjectFilter::SetIndex(size_t idx) 
+{
+	_threshold->ThresholdBetween(idx, idx);
+}
+
+float VtkCompositeGeoObjectFilter::GetInitialRadius() const
+{
+	double bounding_box[6];
+	static_cast<vtkPolyData*>(this->_inputAlgorithm->GetOutputDataObject(0))->GetBounds(bounding_box);
+	double x_diff = abs(bounding_box[0]-bounding_box[1]);
+	double y_diff = abs(bounding_box[2]-bounding_box[3]);
+	double z_diff = abs(bounding_box[5]-bounding_box[5]);
+
+	double max = (x_diff > y_diff) ? x_diff : y_diff;
+	max = (max > z_diff) ? max : z_diff;
+
+	return max/200.0;
+}
diff --git a/VtkVis/VtkCompositeGeoObjectFilter.h b/VtkVis/VtkCompositeGeoObjectFilter.h
new file mode 100644
index 0000000000000000000000000000000000000000..0ab513e3f04022a14569f7c4016c278762b60858
--- /dev/null
+++ b/VtkVis/VtkCompositeGeoObjectFilter.h
@@ -0,0 +1,39 @@
+/**
+ * \file VtkCompositeGeoObjectFilter.h
+ * 2011/12/02 KR Initial implementation
+ */
+
+#ifndef VTKCOMPOSITEGEOOBJECTFILTER_H
+#define VTKCOMPOSITEGEOOBJECTFILTER_H
+
+#include "VtkCompositeFilter.h"
+#include "GeoType.h"
+
+class vtkThreshold;
+
+/// @brief Hightlights a single GeoObject
+class VtkCompositeGeoObjectFilter : public VtkCompositeFilter
+{
+public:
+	VtkCompositeGeoObjectFilter(vtkAlgorithm* inputAlgorithm);
+	virtual ~VtkCompositeGeoObjectFilter();
+
+	virtual void init();
+
+	/// @brief Sets user properties.
+	void SetUserProperty(QString name, QVariant value)
+	{
+		Q_UNUSED(name);
+		Q_UNUSED(value);
+	}
+
+	void SetIndex(size_t idx);
+
+private:
+	float GetInitialRadius() const;
+
+	GEOLIB::GEOTYPE _type;
+	vtkThreshold* _threshold;
+};
+
+#endif // VTKCOMPOSITEGEOOBJECTFILTER_H
diff --git a/VtkVis/VtkCompositeLineToTubeFilter.cpp b/VtkVis/VtkCompositeLineToTubeFilter.cpp
index 23f1cc51a9c330109c30924f05674d043182b3ad..e61192f494793516359e6d217a23af353d1d1efd 100644
--- a/VtkVis/VtkCompositeLineToTubeFilter.cpp
+++ b/VtkVis/VtkCompositeLineToTubeFilter.cpp
@@ -33,16 +33,18 @@ void VtkCompositeLineToTubeFilter::init()
 	mergePoints->SetTolerance(0.0);
 	mergePoints->ConvertLinesToPointsOn();
 
+	double default_radius(GetInitialRadius());
+	int default_number_of_sides(8);
 	vtkTubeFilter* tubes = vtkTubeFilter::New();
 	tubes->SetInputConnection(0, mergePoints->GetOutputPort(0));
 	tubes->SetInputArrayToProcess(1,0,0,vtkDataObject::FIELD_ASSOCIATION_CELLS,"Stratigraphies");
-	tubes->SetRadius(150);
-	tubes->SetNumberOfSides(10);
+	tubes->SetRadius(default_radius);
+	tubes->SetNumberOfSides(default_number_of_sides);
 	tubes->SetCapping(1);
 	//tubes->SetVaryRadiusToVaryRadiusByScalar(); // KR radius changes with scalar
 
-	(*_algorithmUserProperties)["Radius"] = 150.0;
-	(*_algorithmUserProperties)["NumberOfSides"] = 6;
+	(*_algorithmUserProperties)["Radius"] = default_radius;
+	(*_algorithmUserProperties)["NumberOfSides"] = default_number_of_sides;
 	(*_algorithmUserProperties)["Capping"] = true;
 
 	_outputAlgorithm = tubes;
@@ -59,3 +61,17 @@ void VtkCompositeLineToTubeFilter::SetUserProperty( QString name, QVariant value
 	else if (name.compare("Capping") == 0)
 		static_cast<vtkTubeFilter*>(_outputAlgorithm)->SetCapping(value.toBool());
 }
+
+float VtkCompositeLineToTubeFilter::GetInitialRadius() const
+{
+	double bounding_box[6];
+	static_cast<vtkPolyData*>(this->_inputAlgorithm->GetOutputDataObject(0))->GetBounds(bounding_box);
+	double x_diff = abs(bounding_box[0]-bounding_box[1]);
+	double y_diff = abs(bounding_box[2]-bounding_box[3]);
+	double z_diff = abs(bounding_box[5]-bounding_box[5]);
+
+	double max = (x_diff > y_diff) ? x_diff : y_diff;
+	max = (max > z_diff) ? max : z_diff;
+
+	return max/200.0;
+}
diff --git a/VtkVis/VtkCompositeLineToTubeFilter.h b/VtkVis/VtkCompositeLineToTubeFilter.h
index b91ec023216429e81428fa7b5c86b846345f5892..10b6b6603e32f193be16fa205adcf5a62519647e 100644
--- a/VtkVis/VtkCompositeLineToTubeFilter.h
+++ b/VtkVis/VtkCompositeLineToTubeFilter.h
@@ -20,6 +20,7 @@ public:
 	virtual void SetUserProperty(QString name, QVariant value);
 
 private:
+	float GetInitialRadius() const;
 };
 
 #endif // VTKCOMPOSITELINETOTUBEFILTER_H
diff --git a/VtkVis/VtkCompositePointToGlyphFilter.cpp b/VtkVis/VtkCompositePointToGlyphFilter.cpp
index eccd50978c08ececf634dd23990b8da945bf49cd..1ecabcc33a7f77f3193dab4acc7a78f3a075d951 100644
--- a/VtkVis/VtkCompositePointToGlyphFilter.cpp
+++ b/VtkVis/VtkCompositePointToGlyphFilter.cpp
@@ -29,7 +29,7 @@ void VtkCompositePointToGlyphFilter::init()
 	this->_inputDataObjectType = VTK_DATA_SET;
 	this->_outputDataObjectType = VTK_POLY_DATA;
 
-	int default_radius(150);
+	double default_radius(GetInitialRadius());
 	_glyphSource = vtkSphereSource::New();
 	_glyphSource->SetRadius(default_radius);
 	_glyphSource->SetPhiResolution(10);
@@ -86,3 +86,17 @@ void VtkCompositePointToGlyphFilter::SetUserProperty( QString name, QVariant val
 	else if (name.compare("Orient") == 0)
 		static_cast<vtkGlyph3D*>(_outputAlgorithm)->SetOrient(value.toBool());
 }
+
+float VtkCompositePointToGlyphFilter::GetInitialRadius() const
+{
+	double bounding_box[6];
+	static_cast<vtkPolyData*>(this->_inputAlgorithm->GetOutputDataObject(0))->GetBounds(bounding_box);
+	double x_diff = abs(bounding_box[0]-bounding_box[1]);
+	double y_diff = abs(bounding_box[2]-bounding_box[3]);
+	double z_diff = abs(bounding_box[5]-bounding_box[5]);
+
+	double max = (x_diff > y_diff) ? x_diff : y_diff;
+	max = (max > z_diff) ? max : z_diff;
+
+	return max/100.0;
+}
diff --git a/VtkVis/VtkCompositePointToGlyphFilter.h b/VtkVis/VtkCompositePointToGlyphFilter.h
index 5d6956defe94c2b55db038c8b7ed0ad18134b2e8..dedd0a438550e48943f7dbed442a4ccfb1dc7438 100644
--- a/VtkVis/VtkCompositePointToGlyphFilter.h
+++ b/VtkVis/VtkCompositePointToGlyphFilter.h
@@ -22,6 +22,8 @@ public:
 	virtual void SetUserProperty(QString name, QVariant value);
 
 private:
+	float GetInitialRadius() const;
+
 	vtkSphereSource* _glyphSource;
 };
 
diff --git a/VtkVis/VtkCompositeTextureOnSurfaceFilter.cpp b/VtkVis/VtkCompositeTextureOnSurfaceFilter.cpp
index e2647f58855ba3d1e56388f637bb41b998759730..44d27b7537dafe0ec3e28563e76d6eb891d0dc03 100644
--- a/VtkVis/VtkCompositeTextureOnSurfaceFilter.cpp
+++ b/VtkVis/VtkCompositeTextureOnSurfaceFilter.cpp
@@ -50,8 +50,7 @@ void VtkCompositeTextureOnSurfaceFilter::init()
 	QSettings settings("UFZ", "OpenGeoSys-5");
 	QString fileName = QFileDialog::getOpenFileName(parent,
 	                                                "Select raster file to apply as texture",
-	                                                settings.value(
-	                                                        "lastOpenedTextureFileDirectory").
+	                                                settings.value("lastOpenedTextureFileDirectory").
 	                                                toString(),
 	                                                "Raster files (*.asc *.bmp *.jpg *.png *.tif);;");
 	QFileInfo fi(fileName);
diff --git a/VtkVis/VtkConditionSource.cpp b/VtkVis/VtkConditionSource.cpp
index 806cf644a295da3c28c5e7d539807b64a6cd460d..78f149a591f5513f534e1adebd8d1f03c508545c 100644
--- a/VtkVis/VtkConditionSource.cpp
+++ b/VtkVis/VtkConditionSource.cpp
@@ -80,6 +80,10 @@ int VtkConditionSource::RequestData( vtkInformation* request,
 	vtkSmartPointer<vtkPolyData> output =
 	        vtkPolyData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT()));
 
+	vtkSmartPointer<vtkIdTypeArray> distypes = vtkSmartPointer<vtkIdTypeArray>::New();
+	distypes->SetNumberOfComponents(1);
+	distypes->SetName("DisTypes");
+
 	vtkSmartPointer<vtkDoubleArray> scalars = vtkSmartPointer<vtkDoubleArray>::New();
 	scalars->SetNumberOfComponents(1);
 	scalars->SetName("Scalars");
@@ -94,18 +98,17 @@ int VtkConditionSource::RequestData( vtkInformation* request,
 
 	size_t n_pnts = _points->size();
 	double value(-9999);
-	/*
-	   if (!_cond_vec->empty())
-	   {
-	    const std::vector<double> dv = (*_cond_vec)[0]->getDisValue();
-	    value = dv[dv.size()-1]; // get an existing value for the distribution so scaling on point data will be correct during rendering process!
-	   }
-	 */
+	if (!_cond_vec->empty())
+	{
+		const std::vector<double> dv = (*_cond_vec)[0]->getDisValue();
+		value = dv[dv.size()-1]; // get an existing value for the distribution so scaling on point data will be correct during rendering process!
+	}
 
 	for (size_t i = 0; i < n_pnts; i++)
 	{
 		double coords[3] = {(*(*_points)[i])[0], (*(*_points)[i])[1], (*(*_points)[i])[2]};
 		newPoints->InsertNextPoint(coords);
+		distypes->InsertNextValue(0);
 		scalars->InsertNextValue(value);
 	}
 
@@ -115,6 +118,15 @@ int VtkConditionSource::RequestData( vtkInformation* request,
 		FiniteElement::DistributionType type = (*_cond_vec)[n]->getProcessDistributionType();
 		const std::vector<double> dis_values = (*_cond_vec)[n]->getDisValue();
 
+		vtkIdType dis_type_value(0);
+		std::map<FiniteElement::DistributionType, vtkIdType>::const_iterator it(_dis_type_map.find(type));
+		if (it == _dis_type_map.end()) 
+		{
+			dis_type_value = static_cast<vtkIdType>(_dis_type_map.size());
+			_dis_type_map.insert(std::pair<FiniteElement::DistributionType, size_t>(type, dis_type_value));
+		}
+		else dis_type_value = it->second;
+
 		if ((*_cond_vec)[n]->getGeoType() == GEOLIB::POINT)
 		{
 			size_t nPoints = _points->size();
@@ -129,6 +141,7 @@ int VtkConditionSource::RequestData( vtkInformation* request,
 					newVerts->InsertNextCell(1, &vtk_id);
 					if (type == FiniteElement::CONSTANT)
 						scalars->SetValue(id, dis_values[0]);
+					distypes->SetValue(id, dis_type_value);
 					break;
 				}
 			if (id == -1)
@@ -146,6 +159,7 @@ int VtkConditionSource::RequestData( vtkInformation* request,
 			{
 				size_t pnt_id = ply->getPointID(i); //this->getIndex(ply->getPointID(i), newPoints, scalars, idx_map);
 				newLines->InsertCellPoint(pnt_id);
+				distypes->SetValue(pnt_id, dis_type_value);
 
 				if (type == FiniteElement::CONSTANT)
 					scalars->SetValue(pnt_id, dis_values[0]);
@@ -178,6 +192,7 @@ int VtkConditionSource::RequestData( vtkInformation* request,
 				{
 					size_t pnt_id = (*triangle)[j]; //this->getIndex((*triangle)[j], newPoints, scalars, idx_map);
 					aPolygon->GetPointIds()->SetId(j, pnt_id);
+					distypes->SetValue(pnt_id, dis_type_value);
 
 					if (type == FiniteElement::CONSTANT)
 						scalars->SetValue(pnt_id, dis_values[0]);
@@ -188,8 +203,7 @@ int VtkConditionSource::RequestData( vtkInformation* request,
 							    pnt_id)
 							//if (this->getIndex(static_cast<size_t>(dis_values[j]), newPoints, scalars, idx_map) == pnt_id)
 							{
-								scalars->SetValue(pnt_id,
-								                  dis_values[j + 1]);
+								scalars->SetValue(pnt_id,dis_values[j + 1]);
 								break;
 							}
 					}
@@ -215,6 +229,7 @@ int VtkConditionSource::RequestData( vtkInformation* request,
 				double coords[3] =
 				{box[i % 2][0], box[(i >> 1) % 2][1], box[i >> 2][2]};
 				newPoints->InsertNextPoint(coords);
+				distypes->InsertNextValue(dis_type_value);
 				scalars->InsertNextValue(0.0);
 				//idx_map.insert( std::pair<size_t,size_t>(pnt_idx+i, nPoints+i));
 			}
@@ -223,12 +238,7 @@ int VtkConditionSource::RequestData( vtkInformation* request,
 			{
 				vtkIdType a[2] = {nPoints + i, nPoints + i + 4};
 				vtkIdType b[2] = {nPoints + (i * 2), nPoints + (i * 2 + 1)};
-				vtkIdType c[2] =
-				{nPoints +
-				(static_cast<int>(i /
-					          2) * 4 +
-					(i %
-					2)), nPoints + (static_cast<int>(i / 2) * 4 + (i % 2) + 2)};
+				vtkIdType c[2] = {nPoints + (static_cast<int>(i / 2) * 4 + (i % 2)), nPoints + (static_cast<int>(i / 2) * 4 + (i % 2) + 2)};
 				newLines->InsertNextCell(2, &a[0]);
 				newLines->InsertNextCell(2, &b[0]);
 				newLines->InsertNextCell(2, &c[0]);
@@ -237,6 +247,7 @@ int VtkConditionSource::RequestData( vtkInformation* request,
 	}
 
 	output->SetPoints(newPoints);
+	output->GetPointData()->AddArray(distypes);
 	output->GetPointData()->AddArray(scalars);
 	output->GetPointData()->SetActiveScalars("Scalars");
 	output->SetVerts(newVerts);
diff --git a/VtkVis/VtkConditionSource.h b/VtkVis/VtkConditionSource.h
index 75cdd5065eb71e943a5c0a513119f968a0e9ee72..04c15eba7bdf496fe4778a61f78698c8dae88bfb 100644
--- a/VtkVis/VtkConditionSource.h
+++ b/VtkVis/VtkConditionSource.h
@@ -57,6 +57,7 @@ private:
 
 	const std::vector<GEOLIB::Point*>* _points;
 	const std::vector<FEMCondition*>* _cond_vec;
+	std::map<FiniteElement::DistributionType, vtkIdType> _dis_type_map;
 };
 
 #endif // VTKCONDITIONSOURCE_H
diff --git a/VtkVis/VtkFilterFactory.cpp b/VtkVis/VtkFilterFactory.cpp
index bcd9c656da1fd0b9fa9eb9ed4966e00c9b13f56d..e3d22317ad63d97445c027913df5226263d7b205 100644
--- a/VtkVis/VtkFilterFactory.cpp
+++ b/VtkVis/VtkFilterFactory.cpp
@@ -11,6 +11,7 @@
 #include "VtkCompositeColorByHeightFilter.h"
 #include "VtkCompositeColormapToImageFilter.h"
 #include "VtkCompositeContourFilter.h"
+#include "VtkCompositeGeoObjectFilter.h"
 #include "VtkCompositeImageToCylindersFilter.h"
 #include "VtkCompositeLineToTubeFilter.h"
 #include "VtkCompositePointToGlyphFilter.h"
@@ -118,6 +119,8 @@ VtkCompositeFilter* VtkFilterFactory::CreateCompositeFilter( QString type,
 		return new VtkCompositeSelectionFilter(inputAlgorithm);
 	else if (type.compare(QString("VtkCompositeContourFilter")) == 0)
 		return new VtkCompositeContourFilter(inputAlgorithm);
+	else if (type.compare(QString("VtkCompositeGeoObjectFilter")) == 0)
+		return new VtkCompositeGeoObjectFilter(inputAlgorithm);
 
 	else
 		return NULL;
diff --git a/VtkVis/VtkGeoImageSource.cpp b/VtkVis/VtkGeoImageSource.cpp
index 22fa8a204615e0920a3059361dade43b26f3cc78..a2481baecab40ef3aee824d64cff971fec40dc48 100644
--- a/VtkVis/VtkGeoImageSource.cpp
+++ b/VtkVis/VtkGeoImageSource.cpp
@@ -80,11 +80,10 @@ void VtkGeoImageSource::setImageFilename(QString filename)
 	QPointF origin;
 	double spacing;
 	OGSRaster::loadImage(filename, *raster, origin, spacing);
-	//int imgwidth = raster->width();
-	//int imgheight = raster->height();
 	this->setImage(*raster);
 	delete raster;
-	this->setOrigin(origin);
+	// correct raster position by half a pixel for correct visualisation 
+	this->setOrigin(origin.x()+(spacing/2.0), origin.y()+(spacing/2.0), -10.0);
 	this->setSpacing(spacing);
 	this->SetName(filename);
 }
@@ -113,9 +112,9 @@ void VtkGeoImageSource::setImage(QImage& image)
 	_imageSource->Update(); // crashes otherwise
 }
 
-void VtkGeoImageSource::setOrigin(QPointF origin)
+void VtkGeoImageSource::setOrigin(double x, double y, double z)
 {
-	_imageInfo->SetOutputOrigin(origin.x(), origin.y(), -10.0);
+	_imageInfo->SetOutputOrigin(x, y, z);
 }
 
 void VtkGeoImageSource::setSpacing(double spacing)
diff --git a/VtkVis/VtkGeoImageSource.h b/VtkVis/VtkGeoImageSource.h
index 1338488a92f1069c9c4187bff50658f054a41368..c21e175c6c7599f5cdaa56e7687043698fcb485b 100644
--- a/VtkVis/VtkGeoImageSource.h
+++ b/VtkVis/VtkGeoImageSource.h
@@ -38,7 +38,7 @@ public:
 
 	void setImage(QImage& image);
 
-	void setOrigin(QPointF origin);
+	void setOrigin(double x, double y, double z);
 
 	void setSpacing(double spacing);
 
diff --git a/VtkVis/VtkMeshConverter.cpp b/VtkVis/VtkMeshConverter.cpp
index 70e2efe9ce9e9a51d341db1e3c40f6d40b1905d3..5c837312146b6a90301e7ebe74ec8fb6e852ad47 100644
--- a/VtkVis/VtkMeshConverter.cpp
+++ b/VtkVis/VtkMeshConverter.cpp
@@ -19,66 +19,139 @@
 #include <vtkCellData.h>
 #include <vtkUnstructuredGrid.h>
 
+#include <QTime>
+
 MeshLib::CFEMesh* VtkMeshConverter::convertImgToMesh(vtkImageData* img,
                                                      const std::pair<double,double> &origin,
-                                                     const double &scalingFactor)
+                                                     const double &scalingFactor,
+													 MshElemType::type elem_type,
+													 UseIntensityAs::type intensity_type)
 {
+	if ((elem_type != MshElemType::TRIANGLE) && (elem_type != MshElemType::QUAD))
+	{
+		std::cout << "Error in VtkMeshConverter::convertImgToMesh() - Invalid Mesh Element Type..." << std::endl;
+		return NULL;
+	}
+
 	vtkSmartPointer<vtkUnsignedCharArray> pixelData = vtkSmartPointer<vtkUnsignedCharArray>(
 	        vtkUnsignedCharArray::SafeDownCast(img->GetPointData()->GetScalars()));
 	int* dims = img->GetDimensions();
 
-	MeshLib::CFEMesh* mesh(new MeshLib::CFEMesh());
-	size_t imgHeight = dims[0];
-	size_t imgWidth  = dims[1];
-	std::vector<size_t> visNodes(imgWidth * imgHeight);
+	const size_t imgHeight = dims[0];
+	const size_t imgWidth  = dims[1];
+	const size_t incHeight = imgHeight+1;
+	const size_t incWidth  = imgWidth+1;
+	double* pixVal (new double[incHeight * incWidth]);
+	bool* visNodes(new bool[incWidth * incHeight]);
+	int* node_idx_map(new int[incWidth * incHeight]);
 
+	for (size_t j = 0; j < incWidth; j++)
+	{
+		pixVal[j]=0;
+		visNodes[j]=false;
+		node_idx_map[j]=-1;
+	}
 	for (size_t i = 0; i < imgWidth; i++)
+	{
 		for (size_t j = 0; j < imgHeight; j++)
 		{
-			size_t index = i * imgHeight + j;
-			const double* colour = pixelData->GetTuple4(index);
-			double pixcol = 0.3 * colour[0] + 0.6 * colour[1] + 0.1 * colour[2];
-			double coords[3] =
-			{ origin.first + (scalingFactor * j), origin.second + (scalingFactor * i),
-			  pixcol };
+			const size_t img_idx = i * imgHeight + j;
+			const size_t index = (i+1) * incHeight + j;
+			const double* colour = pixelData->GetTuple4(img_idx);
+			pixVal[index] = 0.3 * colour[0] + 0.6 * colour[1] + 0.1 * colour[2];
 			visNodes[index] = (colour[3] > 0);
+			node_idx_map[index]=-1;
+		}
+		pixVal[(i+2)*incHeight-1]=0;
+		visNodes[(i+2)*incHeight-1]=false;
+		node_idx_map[(i+2)*incHeight-1]=-1;
+	}
 
-			MeshLib::CNode* node(new MeshLib::CNode(index));
-			node->SetCoordinates(coords);
-			mesh->nod_vector.push_back(node);
+	MeshLib::CFEMesh* mesh(new MeshLib::CFEMesh());
+	size_t node_idx_count(0);
+	const double x_offset(origin.first - scalingFactor/2.0);
+	const double y_offset(origin.second - scalingFactor/2.0);
+
+	for (size_t i = 0; i < incWidth; i++)
+		for (size_t j = 0; j < incHeight; j++)
+		{
+			const size_t index = i * incHeight + j;
+
+			bool set_node (false);
+			if (j==0 && i==imgWidth) set_node = visNodes[index];
+			else if (j==0)			 set_node = (visNodes[index] || visNodes[index+incHeight]);
+			else if (i==imgWidth)	 set_node = (visNodes[index] || visNodes[index-1]);
+			else					 set_node = (visNodes[index] || visNodes[index-1] || visNodes[index+incHeight] || visNodes[index+incHeight-1]);
+
+			if (set_node)
+			{
+				double zValue = (intensity_type == UseIntensityAs::ELEVATION) ? pixVal[index] : 0.0;
+				const double coords[3] = { x_offset + (scalingFactor * j),
+									       y_offset + (scalingFactor * i),
+									       zValue };
+
+				MeshLib::CNode* node(new MeshLib::CNode(node_idx_count));
+				node->SetCoordinates(coords);
+				mesh->nod_vector.push_back(node);
+				node_idx_map[index] = node_idx_count;
+				node_idx_count++;
+			}
 		}
 
+		QTime myTimer0;
+		myTimer0.start();
 	// set mesh elements
-	for (size_t i = 0; i < imgWidth - 1; i++)
-		for (size_t j = 0; j < imgHeight - 1; j++)
+	for (size_t i = 0; i < imgWidth; i++)
+		for (size_t j = 0; j < imgHeight; j++)
 		{
-			int index = i * imgHeight + j;
-
-			// if node is visible
-			if (visNodes[index])
+			const int index = i * incHeight + j;
+			if ((node_idx_map[index]!=-1) && (node_idx_map[index+1]!=-1) && (node_idx_map[index+incHeight]!=-1) && (node_idx_map[index+incHeight+1]!=-1) && (visNodes[index+incHeight]))
 			{
-				mesh->ele_vector.push_back(createElement(index, index + 1, index +
-				                                         imgHeight));       // upper left triangle
-				mesh->ele_vector.push_back(createElement(index + 1, index +
-				                                         imgHeight + 1, index +
-				                                         imgHeight));                   // lower right triangle
+				const int mat = (intensity_type != UseIntensityAs::MATERIAL) ? 0 : static_cast<int>(pixVal[index+incHeight]);
+				if (elem_type == MshElemType::TRIANGLE)
+				{
+					mesh->ele_vector.push_back(createElement(elem_type, mat, node_idx_map[index], node_idx_map[index + 1],
+															 node_idx_map[index + incHeight]));       // upper left triangle
+					mesh->ele_vector.push_back(createElement(elem_type, mat, node_idx_map[index + 1],
+															 node_idx_map[index + incHeight + 1],
+															 node_idx_map[index + incHeight]));                   // lower right triangle
+				}
+				if (elem_type == MshElemType::QUAD)
+				{
+					mesh->ele_vector.push_back(createElement(elem_type, mat, node_idx_map[index], node_idx_map[index + 1],
+															 node_idx_map[index + incHeight + 1],
+															 node_idx_map[index + incHeight]));
+				}
 			}
 		}
+
+		std::cout << myTimer0.elapsed() << " ms" << std::endl;
 	mesh->ConstructGrid();
+	delete [] pixVal;
+	delete [] visNodes;
+	delete [] node_idx_map;
 	return mesh;
 }
 
-MeshLib::CElem* VtkMeshConverter::createElement(size_t node1, size_t node2, size_t node3)
+MeshLib::CElem* VtkMeshConverter::createElement(MshElemType::type t, int mat, size_t node1, size_t node2, size_t node3, size_t node4)
 {
-	MeshLib::CElem* elem(new MeshLib::CElem());
-	elem->setElementProperties(MshElemType::TRIANGLE);
-	elem->SetPatchIndex(1);
-	elem->SetNodesNumber(3);
+	MeshLib::CElem* elem(new MeshLib::CElem);
+	elem->setElementProperties(t);
 	elem->SetNodeIndex(0, node1);
 	elem->SetNodeIndex(1, node2);
 	elem->SetNodeIndex(2, node3);
+	if (t ==  MshElemType::QUAD)
+		elem->SetNodeIndex(3, node4);
+	elem->SetPatchIndex(mat);
 	elem->InitializeMembers();
 	return elem;
+/*
+	if (t == MshElemType::QUAD) {
+		return new MeshLib::CElem (t, node1, node2, node3, node4, mat);
+	} else {
+		return new MeshLib::CElem (t, node1, node2, node3, mat);
+	}
+*/
 }
 
 MeshLib::CFEMesh* VtkMeshConverter::convertUnstructuredGrid(vtkUnstructuredGrid* grid)
@@ -88,8 +161,8 @@ MeshLib::CFEMesh* VtkMeshConverter::convertUnstructuredGrid(vtkUnstructuredGrid*
 
 	MeshLib::CFEMesh* mesh(new MeshLib::CFEMesh());
 
-	size_t nNodes = grid->GetPoints()->GetNumberOfPoints();
-	size_t nElems = grid->GetNumberOfCells();
+	const size_t nNodes = grid->GetPoints()->GetNumberOfPoints();
+	const size_t nElems = grid->GetNumberOfCells();
 
 	// set mesh nodes
 	double* coords = NULL;
@@ -142,7 +215,7 @@ MeshLib::CFEMesh* VtkMeshConverter::convertUnstructuredGrid(vtkUnstructuredGrid*
 		cell = grid->GetCell(i);
 		size_t nElemNodes = cell->GetNumberOfPoints();
 		elem->SetNodesNumber(nElemNodes);
-		elem->nodes_index.resize(nElemNodes);
+		elem->getNodeIndices().resize(nElemNodes);
 
 		for (size_t j = 0; j < nElemNodes; j++)
 			elem->SetNodeIndex(j, cell->GetPointId(j));
diff --git a/VtkVis/VtkMeshConverter.h b/VtkVis/VtkMeshConverter.h
index f76ac4f5e435a8b66f87a8ae31d7526f038e77af..af780637a3e6ed5cbdf714c215dc839b1fcd5a63 100644
--- a/VtkVis/VtkMeshConverter.h
+++ b/VtkVis/VtkMeshConverter.h
@@ -19,22 +19,40 @@ class CFEMesh;
 class CNode;
 }
 
+/// Selection of possible interpretations for intensities
+struct UseIntensityAs
+{
+	enum type {
+		ELEVATION,
+		MATERIAL,
+		NONE
+	};
+};
+
 /**
  * \brief Adapter class to convert FEM Mesh to a representation more suited for visualisation purposes
  */
 class VtkMeshConverter
 {
 public:
-	/// Converts greyscale image to quad mesh
+	/**
+	 * Converts greyscale image to a mesh
+	 * \parelem_type defines if elements of the new mesh should be triangles or quads (or hexes for 3D)
+	 * \param intensity_type defines how image intensities are interpreted
+	 */
 	static MeshLib::CFEMesh* convertImgToMesh(vtkImageData* img,
 	                                          const std::pair<double,double> &origin,
-	                                          const double &scalingFactor);
+	                                          const double &scalingFactor,
+											  MshElemType::type elem_type,
+											  UseIntensityAs::type intensity_type);
 
 	/// Converts a vtkUnstructuredGrid object to a CFEMesh
 	static MeshLib::CFEMesh* convertUnstructuredGrid(vtkUnstructuredGrid* grid);
 
 private:
-	static MeshLib::CElem* createElement(size_t node1, size_t node2, size_t node3);
+	static MeshLib::CElem* createElement(MshElemType::type t, int mat,
+		                                 size_t node1, size_t node2, 
+										 size_t node3, size_t node4 = 0);
 };
 
 #endif // VTKMESHCONVERTER_H
diff --git a/VtkVis/VtkPointsSource.cpp b/VtkVis/VtkPointsSource.cpp
index 2528d2eb00615d35cdf7241bceaf0069a3d60856..7f108aa8d21bb26a6f74ed2cfa45955bc696b98b 100644
--- a/VtkVis/VtkPointsSource.cpp
+++ b/VtkVis/VtkPointsSource.cpp
@@ -17,6 +17,7 @@
 #include <vtkPolyData.h>
 #include <vtkSmartPointer.h>
 #include <vtkStreamingDemandDrivenPipeline.h>
+#include <vtkCellData.h>
 
 vtkStandardNewMacro(VtkPointsSource);
 vtkCxxRevisionMacro(VtkPointsSource, "$Revision$");
@@ -75,21 +76,31 @@ int VtkPointsSource::RequestData( vtkInformation* request,
 	vtkSmartPointer<vtkCellArray> newVerts = vtkSmartPointer<vtkCellArray>::New();
 	newPoints->Allocate(numPoints);
 	newVerts->Allocate(numPoints);
+	
+	vtkSmartPointer<vtkIntArray> pointIDs = vtkSmartPointer<vtkIntArray>::New();
+	pointIDs->SetNumberOfComponents(1);
+	pointIDs->SetName("PointIDs");
 
 	if (outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER()) > 0)
 		return 1;
 
 	// Generate points and vertices
+	int i = 0;
 	for (std::vector<GEOLIB::Point*>::const_iterator it = _points->begin();
 	     it != _points->end(); ++it)
 	{
 		double coords[3] = {(*(*it))[0], (*(*it))[1], (*(*it))[2]};
 		vtkIdType pid = newPoints->InsertNextPoint(coords);
 		newVerts->InsertNextCell(1, &pid);
+		
+		pointIDs->InsertNextValue(i);
+		i++;
 	}
 
 	output->SetPoints(newPoints);
 	output->SetVerts(newVerts);
+	output->GetCellData()->AddArray(pointIDs);
+	output->GetCellData()->SetActiveAttribute("PointIDs", vtkDataSetAttributes::SCALARS);
 
 	return 1;
 }
diff --git a/VtkVis/VtkStationSource.cpp b/VtkVis/VtkStationSource.cpp
index 62075c54982d20bed01f822765da308834ec704a..3af0866f47c6c4a570fd52832c9b10f27853df3b 100644
--- a/VtkVis/VtkStationSource.cpp
+++ b/VtkVis/VtkStationSource.cpp
@@ -72,7 +72,7 @@ int VtkStationSource::RequestData( vtkInformation* request,
 
 	if (!_stations)
 		return 0;
-	int nStations = _stations->size();
+	size_t nStations = _stations->size();
 	if (nStations == 0)
 		return 0;
 
diff --git a/VtkVis/VtkVisImageItem.cpp b/VtkVis/VtkVisImageItem.cpp
index 2a896458b1c5329134a06cf084c628a6470b6796..6add66825ebbff651b121a673d4ccd9a604e6ee2 100644
--- a/VtkVis/VtkVisImageItem.cpp
+++ b/VtkVis/VtkVisImageItem.cpp
@@ -7,45 +7,47 @@
 #include "VtkAlgorithmProperties.h"
 #include "VtkVisImageItem.h"
 
-#include "QVtkDataSetMapper.h"
 #include <vtkActor.h>
 #include <vtkDataSetMapper.h>
 #include <vtkImageAlgorithm.h>
+#include <vtkImageChangeInformation.h>
 #include <vtkRenderer.h>
 #include <vtkSmartPointer.h>
 
-// export test
+// export
 #include <vtkImageActor.h>
 #include <vtkXMLImageDataWriter.h>
 
 VtkVisImageItem::VtkVisImageItem(
         vtkAlgorithm* algorithm, TreeItem* parentItem,
         const QList<QVariant> data /*= QList<QVariant>()*/)
-	: VtkVisPipelineItem(algorithm, parentItem, data)
+	: VtkVisPipelineItem(algorithm, parentItem, data), _transformFilter(NULL)
 {
 }
 
 VtkVisImageItem::VtkVisImageItem(
         VtkCompositeFilter* compositeFilter, TreeItem* parentItem,
         const QList<QVariant> data /*= QList<QVariant>()*/)
-	: VtkVisPipelineItem(compositeFilter, parentItem, data)
+	: VtkVisPipelineItem(compositeFilter, parentItem, data), _transformFilter(NULL)
 {
 }
 
 VtkVisImageItem::~VtkVisImageItem()
 {
+	_transformFilter->Delete();
 }
 
 void VtkVisImageItem::Initialize(vtkRenderer* renderer)
 {
+	_transformFilter = vtkImageChangeInformation::New();
+	_transformFilter->SetInputConnection(_algorithm->GetOutputPort());
+	_transformFilter->Update();
+
 	_renderer = renderer;
-	_mapper = QVtkDataSetMapper::New();
-	_mapper->InterpolateScalarsBeforeMappingOff();
 
 	// Use a special vtkImageActor instead of vtkActor
-	vtkImageAlgorithm* imageAlg = static_cast<vtkImageAlgorithm*>(_algorithm);
 	vtkImageActor* imageActor = vtkImageActor::New();
-	imageActor->SetInput(imageAlg->GetOutput());
+	imageActor->SetInput(_transformFilter->GetOutput());
 	_actor = imageActor;
 	_renderer->AddActor(_actor);
 
@@ -53,11 +55,7 @@ void VtkVisImageItem::Initialize(vtkRenderer* renderer)
 	VtkAlgorithmProperties* vtkProps = dynamic_cast<VtkAlgorithmProperties*>(_algorithm);
 	if (vtkProps)
 		setVtkProperties(vtkProps);
-/*
-    // Copy properties from parent
-    else
-    {
- */
+
 	VtkVisPipelineItem* parentItem = dynamic_cast<VtkVisPipelineItem*>(this->parentItem());
 	while (parentItem)
 	{
@@ -75,7 +73,6 @@ void VtkVisImageItem::Initialize(vtkRenderer* renderer)
 		else
 			parentItem = dynamic_cast<VtkVisPipelineItem*>(parentItem->parentItem());
 	}
-//	}
 
 	// Set active scalar to the desired one from VtkAlgorithmProperties
 	// or to match those of the parent.
@@ -117,3 +114,13 @@ int VtkVisImageItem::callVTKWriter(vtkAlgorithm* algorithm, const std::string &f
 	std::cout << "VtkVisPipelineItem::writeToFile() - Unknown data type..." << std::endl;
 	return 0;
 }
+
+void VtkVisImageItem::setTranslation(double x, double y, double z) const
+{
+	_transformFilter->SetOriginTranslation(x,y,z);
+}
+
+vtkAlgorithm* VtkVisImageItem::transformFilter() const
+{ 
+	return _transformFilter; 
+}
\ No newline at end of file
diff --git a/VtkVis/VtkVisImageItem.h b/VtkVis/VtkVisImageItem.h
index 481bc91f36c101a021550460724c2e3920a3b079..827d87a3d37e9d9f90c49c97b83d9d5778f52b05 100644
--- a/VtkVis/VtkVisImageItem.h
+++ b/VtkVis/VtkVisImageItem.h
@@ -11,19 +11,22 @@
 #include "VtkVisPipelineItem.h"
 
 class vtkAlgorithm;
+class vtkImageChangeInformation;
 class vtkPointSet;
-class QVtkDataSetMapper;
 class vtkProp3D;
 class vtkRenderer;
-class VtkAlgorithmProperties;
+
 class vtkOsgActor;
+
+class VtkAlgorithmProperties;
 class VtkCompositeFilter;
 
 /**
- * \brief An item in the VtkVisPipeline containing a graphic object to be visualized.
+ * \brief An item in the VtkVisPipeline containing an image to be visualized.
  *
- * Any VTK-object (source-items, filter-items, etc.) need to be put into a VtkPipelineItem
- * to be assigned a mapper, an actor and its visualization properties (colour, etc.).
+ * Any vtkImageAlgorithm object is represented by a VtkVisImageItem to be assigned a mapper, 
+ * an actor and its visualization properties.
+ * \sa VtkVisPipelineItem
  */
 class VtkVisImageItem : public VtkVisPipelineItem
 {
@@ -43,11 +46,17 @@ public:
 	/// the item and sets the item's properties.
 	void Initialize(vtkRenderer* renderer);
 
+	void setTranslation(double x, double y, double z) const;
+
+	vtkAlgorithm* transformFilter() const;
+
 protected:
+	/// Selects the appropriate VTK-Writer object and writes the object to a file with the given name.
 	virtual int callVTKWriter(vtkAlgorithm* algorithm, const std::string &filename) const;
 	void setVtkProperties(VtkAlgorithmProperties* vtkProps);
 
 private:
+	vtkImageChangeInformation* _transformFilter;
 };
 
 #endif // VTKVISIMAGEITEM_H
diff --git a/VtkVis/VtkVisPipeline.cpp b/VtkVis/VtkVisPipeline.cpp
index 0c12e4878ffaee64637ec4088829273489d4e67e..6ed962d5d940f25f9368bf6c035052c8c9987346 100644
--- a/VtkVis/VtkVisPipeline.cpp
+++ b/VtkVis/VtkVisPipeline.cpp
@@ -9,7 +9,7 @@
 #include "VtkVisPipeline.h"
 
 //#include "Model.h"
-#include "ConditionModel.h"
+#include "ProcessModel.h"
 #include "GeoTreeModel.h"
 #include "MeshQualityEquiAngleSkew.h"
 #include "MeshQualityNormalisedArea.h"
@@ -21,6 +21,7 @@
 #include "TreeModel.h"
 #include "VtkAlgorithmProperties.h"
 #include "VtkCompositeSelectionFilter.h"
+#include "VtkCompositeGeoObjectFilter.h"
 #include "VtkFilterFactory.h"
 #include "VtkMeshSource.h"
 #include "VtkTrackedCamera.h"
@@ -56,7 +57,7 @@
 #include <QTime>
 
 VtkVisPipeline::VtkVisPipeline( vtkRenderer* renderer, QObject* parent /*= 0*/ )
-	: TreeModel(parent), _renderer(renderer)
+	: TreeModel(parent), _renderer(renderer), _highlighted_geo_index(QModelIndex())
 {
 	QList<QVariant> rootData;
 	rootData << "Object name" << "Visible";
@@ -251,11 +252,9 @@ void VtkVisPipeline::addPipelineItem(StationTreeModel* model, const std::string
 	addPipelineItem(model->vtkSource(name));
 }
 
-void VtkVisPipeline::addPipelineItem(ConditionModel* model,
-                                     const std::string &name,
-                                     FEMCondition::CondType type)
+void VtkVisPipeline::addPipelineItem(ProcessModel* model, const FiniteElement::ProcessType pcs_type, const FEMCondition::CondType cond_type)
 {
-	addPipelineItem(model->vtkSource(name, type));
+	addPipelineItem(model->vtkSource(pcs_type, cond_type));
 }
 
 void VtkVisPipeline::addPipelineItem(MshModel* model, const QModelIndex &idx)
@@ -263,7 +262,7 @@ void VtkVisPipeline::addPipelineItem(MshModel* model, const QModelIndex &idx)
 	addPipelineItem(static_cast<MshItem*>(model->getItem(idx))->vtkSource());
 }
 
-void VtkVisPipeline::addPipelineItem(VtkVisPipelineItem* item, const QModelIndex &parent)
+QModelIndex VtkVisPipeline::addPipelineItem(VtkVisPipelineItem* item, const QModelIndex &parent)
 {
 	item->Initialize(_renderer);
 	TreeItem* parentItem = item->parentItem();
@@ -273,8 +272,7 @@ void VtkVisPipeline::addPipelineItem(VtkVisPipelineItem* item, const QModelIndex
 	{
 		QSettings settings("UFZ, OpenGeoSys-5");
 		if (dynamic_cast<vtkImageAlgorithm*>(item->algorithm()) == NULL) // if not an image
-			item->setScale(1.0, 1.0, settings.value("globalSuperelevation",
-			                                        1.0).toDouble());
+			item->setScale(1.0, 1.0, settings.value("globalSuperelevation", 1.0).toDouble());
 	}
 
 	int parentChildCount = parentItem->childCount();
@@ -292,9 +290,11 @@ void VtkVisPipeline::addPipelineItem(VtkVisPipelineItem* item, const QModelIndex
 
 	reset();
 	emit vtkVisPipelineChanged();
+
+	return newIndex;
 }
 
-void VtkVisPipeline::addPipelineItem( vtkAlgorithm* source,
+QModelIndex VtkVisPipeline::addPipelineItem( vtkAlgorithm* source,
                                       QModelIndex parent /* = QModelindex() */)
 {
 	TreeItem* parentItem = getItem(parent);
@@ -339,7 +339,7 @@ void VtkVisPipeline::addPipelineItem( vtkAlgorithm* source,
 		item = new VtkVisImageItem(source, parentItem, itemData);
 	else
 		item = new VtkVisPointSetItem(source, parentItem, itemData);
-	this->addPipelineItem(item, parent);
+	return this->addPipelineItem(item, parent);
 }
 
 void VtkVisPipeline::removeSourceItem(GeoTreeModel* model,
@@ -357,14 +357,12 @@ void VtkVisPipeline::removeSourceItem(GeoTreeModel* model,
 	}
 }
 
-void VtkVisPipeline::removeSourceItem(ConditionModel* model,
-                                      const std::string &name,
-                                      FEMCondition::CondType type)
+void VtkVisPipeline::removeSourceItem(ProcessModel* model, const FiniteElement::ProcessType pcs_type, const FEMCondition::CondType cond_type)
 {
 	for (int i = 0; i < _rootItem->childCount(); i++)
 	{
 		VtkVisPipelineItem* item = static_cast<VtkVisPipelineItem*>(getItem(index(i, 0)));
-		if (item->algorithm() == model->vtkSource(name, type))
+		if (item->algorithm() == model->vtkSource(pcs_type, cond_type))
 		{
 			removePipelineItem(index(i, 0));
 			return;
@@ -492,6 +490,7 @@ void VtkVisPipeline::checkMeshQuality(VtkMeshSource* source, MshQualityType::typ
 				                                                  parentItem,
 				                                                  itemData);
 				this->addPipelineItem(item, this->createIndex(i, 0, item));
+				break;
 			}
 		}
 
@@ -514,3 +513,36 @@ void VtkVisPipeline::checkMeshQuality(VtkMeshSource* source, MshQualityType::typ
 		delete checker;
 	}
 }
+
+void VtkVisPipeline::highlightGeoObject(const vtkPolyDataAlgorithm* source, int index)
+{
+	this->removeHighlightedGeoObject();
+	int nSources = this->_rootItem->childCount();
+	for (int i = 0; i < nSources; i++)
+	{
+		VtkVisPipelineItem* parentItem = static_cast<VtkVisPipelineItem*>(_rootItem->child(i));
+		if (parentItem->algorithm() == source)
+		{
+			QList<QVariant> itemData;
+			itemData << "Selected GeoObject" << true;
+
+			VtkCompositeFilter* filter = VtkFilterFactory::CreateCompositeFilter(
+															"VtkCompositeGeoObjectFilter",
+															parentItem->transformFilter());
+			static_cast<VtkCompositeGeoObjectFilter*>(filter)->SetIndex(index);
+			VtkVisPointSetItem* item = new VtkVisPointSetItem(filter, parentItem, itemData);
+			QModelIndex parent_index = static_cast<TreeModel*>(this)->index(i, 0, QModelIndex());
+			_highlighted_geo_index = this->addPipelineItem(item, parent_index);
+			break;
+		}
+	}
+}
+
+void VtkVisPipeline::removeHighlightedGeoObject()
+{
+	if (_highlighted_geo_index != QModelIndex())
+	{
+		this->removePipelineItem(_highlighted_geo_index);
+		_highlighted_geo_index = QModelIndex();
+	}
+}
diff --git a/VtkVis/VtkVisPipeline.h b/VtkVis/VtkVisPipeline.h
index 6218aca0798aa5f804f4f90147c787b299aeab30..8fbefb0d561894b0b00c10515ed6307c1d4c440f 100644
--- a/VtkVis/VtkVisPipeline.h
+++ b/VtkVis/VtkVisPipeline.h
@@ -23,12 +23,13 @@ class vtkAlgorithm;
 class vtkDataSet;
 class vtkLight;
 class vtkPointSet;
+class vtkPolyDataAlgorithm;
 class vtkRenderer;
 class vtkProp3D;
 class QModelIndex;
 class QString;
 class GeoTreeModel;
-class ConditionModel;
+class ProcessModel;
 class MshModel;
 class StationTreeModel;
 class TreeModel;
@@ -85,21 +86,17 @@ public slots:
 	/// \brief Adds the given Model to the pipeline.
 	void addPipelineItem(MshModel* model, const QModelIndex &idx);
 	void addPipelineItem(GeoTreeModel* model, const std::string &name, GEOLIB::GEOTYPE type);
-	void addPipelineItem(ConditionModel* model,
-	                     const std::string &name,
-	                     FEMCondition::CondType type);
+	void addPipelineItem(ProcessModel* model, const FiniteElement::ProcessType pcs_type, FEMCondition::CondType cond_type);
 	void addPipelineItem(StationTreeModel* model, const std::string &name);
-	void addPipelineItem(VtkVisPipelineItem* item, const QModelIndex &parent);
+	QModelIndex addPipelineItem(VtkVisPipelineItem* item, const QModelIndex &parent);
 
 	/// \brief Inserts the vtkAlgorithm as a child of the given QModelIndex to the pipeline.
-	void addPipelineItem(vtkAlgorithm* source, QModelIndex parent = QModelIndex());
+	QModelIndex addPipelineItem(vtkAlgorithm* source, QModelIndex parent = QModelIndex());
 
 	/// \brief Removes the given Model (and all attached vtkAlgorithms) from the pipeline.
 	void removeSourceItem(MshModel* model, const QModelIndex &idx);
 	void removeSourceItem(GeoTreeModel* model, const std::string &name, GEOLIB::GEOTYPE type);
-	void removeSourceItem(ConditionModel* model,
-	                      const std::string &name,
-	                      FEMCondition::CondType type);
+	void removeSourceItem(ProcessModel* model, const FiniteElement::ProcessType pcs_type, FEMCondition::CondType cond_type);
 	void removeSourceItem(StationTreeModel* model, const std::string &name);
 
 	/// \brief Removes the vtkAlgorithm at the given QModelIndex (and all attached
@@ -109,6 +106,9 @@ public slots:
 	/// Checks the quality of a mesh and cal a filter to highlight deformed elements.
 	void checkMeshQuality(VtkMeshSource* mesh, MshQualityType::type t);
 
+	void highlightGeoObject(const vtkPolyDataAlgorithm* source, int index);
+	void removeHighlightedGeoObject();
+
 private:
 	void listArrays(vtkDataSet* dataSet);
 
@@ -118,6 +118,9 @@ private:
 	QMap<vtkProp3D*, QModelIndex> _actorMap;
 	bool _resetCameraOnAddOrRemove;
 
+	QModelIndex _highlighted_geo_index;
+
+
 signals:
 	/// \brief Is emitted when a pipeline item was added or removed.
 	void vtkVisPipelineChanged() const;
diff --git a/VtkVis/VtkVisPipelineItem.cpp b/VtkVis/VtkVisPipelineItem.cpp
index 2e889ef8878cb436644974d04b1c4b0b8a83852b..cc2fe2cb975855ddcfe74f61f6d30c051d3d66e5 100644
--- a/VtkVis/VtkVisPipelineItem.cpp
+++ b/VtkVis/VtkVisPipelineItem.cpp
@@ -36,10 +36,8 @@
 VtkVisPipelineItem::VtkVisPipelineItem(
         vtkAlgorithm* algorithm, TreeItem* parentItem,
         const QList<QVariant> data /*= QList<QVariant>()*/)
-	: TreeItem(data,
-	           parentItem),   _actor(NULL), _algorithm(algorithm), _mapper(NULL),
-	  _renderer(NULL),
-	  _compositeFilter(NULL)
+	: TreeItem(data, parentItem),   _actor(NULL), _algorithm(algorithm),
+	  _renderer(NULL),_compositeFilter(NULL)
 {
 	VtkVisPipelineItem* visParentItem = dynamic_cast<VtkVisPipelineItem*>(parentItem);
 	if (parentItem->parentItem())
@@ -49,8 +47,7 @@ VtkVisPipelineItem::VtkVisPipelineItem(
 VtkVisPipelineItem::VtkVisPipelineItem(
         VtkCompositeFilter* compositeFilter, TreeItem* parentItem,
         const QList<QVariant> data /*= QList<QVariant>()*/)
-	: TreeItem(data, parentItem),   _actor(NULL), _mapper(NULL), _renderer(NULL),
-	  _compositeFilter(compositeFilter)
+	: TreeItem(data, parentItem), _actor(NULL), _renderer(NULL), _compositeFilter(compositeFilter)
 {
 	_algorithm = _compositeFilter->GetOutputAlgorithm();
 }
@@ -58,7 +55,6 @@ VtkVisPipelineItem::VtkVisPipelineItem(
 VtkVisPipelineItem::~VtkVisPipelineItem()
 {
 	_renderer->RemoveActor(_actor);
-	_mapper->Delete();
 	_actor->Delete();
 	delete _compositeFilter;
 }
@@ -140,11 +136,6 @@ vtkProp3D* VtkVisPipelineItem::actor() const
 	return _actor;
 }
 
-void VtkVisPipelineItem::SetScalarVisibility( bool on )
-{
-	_mapper->SetScalarVisibility(on);
-}
-
 void VtkVisPipelineItem::setScale(double x, double y, double z) const
 {
 	(void)x;
diff --git a/VtkVis/VtkVisPipelineItem.h b/VtkVis/VtkVisPipelineItem.h
index 9067eccebeb9633090cbc909a6f31a0df552dd4e..9c07af2e58b15a0cb94a1b14f4adbe60b2e9740e 100644
--- a/VtkVis/VtkVisPipelineItem.h
+++ b/VtkVis/VtkVisPipelineItem.h
@@ -18,15 +18,17 @@
 #include <QVariant>
 
 class vtkAlgorithm;
+class vtkDataSetAttributes;
 class vtkPointSet;
-class QVtkDataSetMapper;
 class vtkProp3D;
 class vtkRenderer;
-class VtkAlgorithmProperties;
+class vtkTransformFilter;
+class QVtkDataSetMapper;
+
 class vtkOsgActor;
+
+class VtkAlgorithmProperties;
 class VtkCompositeFilter;
-class vtkTransformFilter;
-class vtkDataSetAttributes;
 
 /**
  * \brief An item in the VtkVisPipeline containing a graphic object to be visualized.
@@ -72,9 +74,6 @@ public:
 	// Dummy for implementation in derived classes
 	virtual void SetActiveAttribute(const QString& str) { (void)str; }
 
-	/// @brief Returns the mapper
-	QVtkDataSetMapper* mapper() const { return _mapper; }
-
 	/// @brief Returns the composite filter
 	VtkCompositeFilter* compositeFilter() const { return _compositeFilter; }
 
@@ -87,14 +86,24 @@ public:
 	/// @brief Writes this algorithm's vtkDataSet (i.e. vtkPolyData or vtkUnstructuredGrid) to a vtk-file.
 	int writeToFile(const std::string &filename) const;
 
-	/// @brief Sets the geometry and data scaling.
+	/** 
+ 	 * @brief Scales the data in visualisation-space.
+     * This function is empty and needs to be implemented by derived classes.
+     */
 	virtual void setScale(double x, double y, double z) const;
 
-	/// @brief Translates the item in vis-space.
+	/** 
+ 	 * @brief Translates the item in visualisation-space.
+     * This function is empty and needs to be implemented by derived classes.
+     */
 	virtual void setTranslation(double x, double y, double z) const;
 
-	// Dummy for implementation in derived classes
-	virtual vtkTransformFilter* transformFilter() const { return NULL; }
+	/** 
+ 	 * Returns the transform filter for the object.
+     * This function needs to be implemented by derived classes.
+     */
+	virtual vtkAlgorithm* transformFilter() const = 0;
+
 	/// @brief Sets the geometry and date scaling recursively on all children of
 	/// this item.
 	void setScaleOnChildren(double x, double y, double z) const;
@@ -102,14 +111,15 @@ public:
 protected:
 	vtkProp3D* _actor;
 	vtkAlgorithm* _algorithm;
-	QVtkDataSetMapper* _mapper;
 	vtkRenderer* _renderer;
 	VtkCompositeFilter* _compositeFilter;
 
+	/** 
+	 * Selects the appropriate VTK-Writer object and writes the object to a file with the given name.
+     * This function is empty and needs to be implemented by derived classes.
+	 */
 	virtual int callVTKWriter(vtkAlgorithm* algorithm, const std::string &filename) const;
 
-	void SetScalarVisibility(bool on);
-
 private:
 };
 
diff --git a/VtkVis/VtkVisPipelineView.cpp b/VtkVis/VtkVisPipelineView.cpp
index e55ab82370671bd3824dd77a55d88b6ba8375b87..32aae875e0935c94c1f97b6da42c214606b3fd22 100644
--- a/VtkVis/VtkVisPipelineView.cpp
+++ b/VtkVis/VtkVisPipelineView.cpp
@@ -24,7 +24,7 @@
 
 //image to mesh conversion
 #include "VtkGeoImageSource.h"
-#include "VtkMeshConverter.h"
+#include "MeshFromRasterDialog.h"
 #include <vtkDataObject.h>
 #include <vtkImageData.h>
 #include <vtkSmartPointer.h>
@@ -82,7 +82,7 @@ void VtkVisPipelineView::contextMenuEvent( QContextMenuEvent* event )
 			isSourceItem = false; // this exception is needed as image object are only displayed in the vis-pipeline
 			addMeshingAction = menu.addAction("Convert Image to Mesh...");
 			connect(addMeshingAction, SIGNAL(triggered()), this,
-			        SLOT(convertImageToMesh()));
+			        SLOT(showImageToMeshConversionDialog()));
 		}
 		else
 		{
@@ -123,9 +123,8 @@ void VtkVisPipelineView::exportSelectedPipelineItemAsVtk()
 	QSettings settings("UFZ", "OpenGeoSys-5");
 	QModelIndex idx = this->selectionModel()->currentIndex();
 	QString filename = QFileDialog::getSaveFileName(this, "Export object to vtk-file",
-	                                                settings.value(
-	                                                        "lastExportedFileDirectory").
-	                                                toString(),"(*.*)");
+	                                settings.value("lastExportedFileDirectory").toString(),
+									"All files (* *.*)");
 	if (!filename.isEmpty())
 	{
 		static_cast<VtkVisPipelineItem*>(static_cast<VtkVisPipeline*>(this->model())->
@@ -140,8 +139,7 @@ void VtkVisPipelineView::exportSelectedPipelineItemAsOsg()
 	QSettings settings("UFZ", "OpenGeoSys-5");
 	QModelIndex idx = this->selectionModel()->currentIndex();
 	QString filename = QFileDialog::getSaveFileName(this, "Export object to OpenSG file",
-	                                                settings.value(
-	                                                        "lastExportedFileDirectory").
+	                                                settings.value("lastExportedFileDirectory").
 	                                                toString(), "OpenSG file (*.osb)");
 	if (!filename.isEmpty())
 	{
@@ -162,32 +160,35 @@ void VtkVisPipelineView::addPipelineFilterItem()
 	emit requestAddPipelineFilterItem(selectionModel()->currentIndex());
 }
 
-void VtkVisPipelineView::convertImageToMesh()
+void VtkVisPipelineView::showImageToMeshConversionDialog()
+{
+	MeshFromRasterDialog* dlg = new MeshFromRasterDialog();
+	connect(dlg, SIGNAL(setMeshParameters(QString, MshElemType::type, UseIntensityAs::type)),
+		    this, SLOT(constructMeshFromImage(QString, MshElemType::type, UseIntensityAs::type)));
+	dlg->exec();
+}
+
+void VtkVisPipelineView::constructMeshFromImage(QString msh_name, MshElemType::type element_type, UseIntensityAs::type intensity_type)
 {
 	vtkSmartPointer<vtkAlgorithm> algorithm =
 	        static_cast<VtkVisPipelineItem*>(static_cast<VtkVisPipeline*>(this->model())->
-	                                         getItem(this->
-	                                                 selectionModel()
-	                                                 ->currentIndex()))->algorithm();
+	                                         getItem(this->selectionModel()->currentIndex()))->algorithm();
 
 	vtkSmartPointer<VtkGeoImageSource> imageSource = VtkGeoImageSource::SafeDownCast(algorithm);
 	vtkSmartPointer<vtkImageData> image = imageSource->GetOutput();
-
-	MeshLib::CFEMesh* mesh = VtkMeshConverter::convertImgToMesh(image,
-	                                                            imageSource->getOrigin(),
-	                                                            imageSource->getSpacing());
-	// now do something with the mesh (save, display, whatever... )
-	std::string msh_name("NewMesh");
-	emit meshAdded(mesh, msh_name);
+	
+	MeshLib::CFEMesh* mesh = VtkMeshConverter::convertImgToMesh(image, imageSource->getOrigin(),
+																imageSource->getSpacing(), 
+																element_type, intensity_type);
+	std::string new_mesh_name(msh_name.toStdString());
+	emit meshAdded(mesh, new_mesh_name);
 }
 
 void VtkVisPipelineView::convertVTKToOGSMesh()
 {
 	vtkSmartPointer<vtkAlgorithm> algorithm =
-	        static_cast<VtkVisPipelineItem*>(static_cast<VtkVisPipeline*>(this->model())->
-	                                         getItem(this->
-	                                                 selectionModel()
-	                                                 ->currentIndex()))->algorithm();
+	        static_cast<VtkVisPipelineItem*>(static_cast<VtkVisPipeline*>(this->model())->getItem(
+												this->selectionModel()->currentIndex()))->algorithm();
 
 	vtkUnstructuredGrid* grid(NULL);
 	vtkUnstructuredGridAlgorithm* ugAlg = vtkUnstructuredGridAlgorithm::SafeDownCast(algorithm);
@@ -195,14 +196,14 @@ void VtkVisPipelineView::convertVTKToOGSMesh()
 		grid = ugAlg->GetOutput();
 	else
 	{
-		vtkGenericDataObjectReader* dataReader = vtkGenericDataObjectReader::SafeDownCast(
-		        algorithm);                                                                   // for old filetypes
+		// for old filetypes
+		vtkGenericDataObjectReader* dataReader = vtkGenericDataObjectReader::SafeDownCast(algorithm);
 		if (dataReader)
 			grid = vtkUnstructuredGrid::SafeDownCast(dataReader->GetOutput());
 		else
 		{
-			vtkXMLUnstructuredGridReader* xmlReader =
-			        vtkXMLUnstructuredGridReader::SafeDownCast(algorithm);                       // for new filetypes
+			// for new filetypes
+			vtkXMLUnstructuredGridReader* xmlReader = vtkXMLUnstructuredGridReader::SafeDownCast(algorithm);
 			grid = vtkUnstructuredGrid::SafeDownCast(xmlReader->GetOutput());
 		}
 	}
diff --git a/VtkVis/VtkVisPipelineView.h b/VtkVis/VtkVisPipelineView.h
index 67590b282e52789d177b2f949cbf66a1715d0dca..e2d28ae33abe760bfb9f5d4e1ceb9f75bb959381 100644
--- a/VtkVis/VtkVisPipelineView.h
+++ b/VtkVis/VtkVisPipelineView.h
@@ -9,6 +9,7 @@
 
 // ** INCLUDES **
 #include <QTreeView>
+#include "VtkMeshConverter.h"
 
 class QItemSelection;
 class QAbstractItemModel;
@@ -62,7 +63,10 @@ private slots:
 	void addPipelineFilterItem();
 
 	/// Calls the conversion method for creating an OGS Mesh from a vtkImageData object.
-	void convertImageToMesh();
+	void constructMeshFromImage(QString msh_name, MshElemType::type element_type, UseIntensityAs::type intensity_type);
+
+	/// Calls the dialog to 
+	void showImageToMeshConversionDialog();
 
 	/// Calls the conversion method for making a vtk grid an ogs mesh.
 	void convertVTKToOGSMesh();
diff --git a/VtkVis/VtkVisPointSetItem.cpp b/VtkVis/VtkVisPointSetItem.cpp
index b01c5ee15c98798aecd9173ddbb72c791826a637..64c68ebaf05cb5a6a8365f79ac96c5d82e9c7e0e 100644
--- a/VtkVis/VtkVisPointSetItem.cpp
+++ b/VtkVis/VtkVisPointSetItem.cpp
@@ -7,6 +7,8 @@
 #include "VtkAlgorithmProperties.h"
 #include "VtkVisPointSetItem.h"
 
+#include <limits>
+
 #include "QVtkDataSetMapper.h"
 #include <vtkActor.h>
 #include <vtkCellData.h>
@@ -34,12 +36,13 @@
 VtkVisPointSetItem::VtkVisPointSetItem(
         vtkAlgorithm* algorithm, TreeItem* parentItem,
         const QList<QVariant> data /*= QList<QVariant>()*/)
-	: VtkVisPipelineItem(algorithm, parentItem,
-	                     data), _transformFilter(NULL), _activeAttribute("")
+	: VtkVisPipelineItem(algorithm, parentItem, data), _mapper(NULL),
+	_transformFilter(NULL), _activeAttribute("")
 {
 	VtkVisPipelineItem* visParentItem = dynamic_cast<VtkVisPipelineItem*>(parentItem);
 	if (parentItem->parentItem())
 	{
+		// special case if parent is image but child is not (e.g. Image2BarChartFilter)
 		if (dynamic_cast<vtkImageAlgorithm*>(visParentItem->algorithm()))
 			_algorithm->SetInputConnection(visParentItem->algorithm()->GetOutputPort());
 		else
@@ -56,14 +59,15 @@ VtkVisPointSetItem::VtkVisPointSetItem(
 VtkVisPointSetItem::VtkVisPointSetItem(
         VtkCompositeFilter* compositeFilter, TreeItem* parentItem,
         const QList<QVariant> data /*= QList<QVariant>()*/)
-	: VtkVisPipelineItem(compositeFilter, parentItem,
-	                     data), _transformFilter(NULL), _activeAttribute("")
+	: VtkVisPipelineItem(compositeFilter, parentItem, data), _mapper(NULL),
+	_transformFilter(NULL), _activeAttribute("")
 {
 }
 
 VtkVisPointSetItem::~VtkVisPointSetItem()
 {
 	_transformFilter->Delete();
+	_mapper->Delete();
 }
 
 void VtkVisPointSetItem::Initialize(vtkRenderer* renderer)
@@ -81,7 +85,6 @@ void VtkVisPointSetItem::Initialize(vtkRenderer* renderer)
 	_mapper = QVtkDataSetMapper::New();
 	_mapper->InterpolateScalarsBeforeMappingOff();
 
-	// Use a special vtkImageActor instead of vtkActor
 	_mapper->SetInputConnection(_transformFilter->GetOutputPort());
 	_actor = vtkActor::New();
 	static_cast<vtkActor*>(_actor)->SetMapper(_mapper);
@@ -110,8 +113,7 @@ void VtkVisPointSetItem::Initialize(vtkRenderer* renderer)
 				parentItem = NULL;
 			}
 			else
-				parentItem =
-				        dynamic_cast<VtkVisPipelineItem*>(parentItem->parentItem());
+				parentItem = dynamic_cast<VtkVisPipelineItem*>(parentItem->parentItem());
 		}
 	}
 
@@ -133,6 +135,11 @@ void VtkVisPointSetItem::Initialize(vtkRenderer* renderer)
 	}
 }
 
+void VtkVisPointSetItem::SetScalarVisibility( bool on )
+{
+	_mapper->SetScalarVisibility(on);
+}
+
 void VtkVisPointSetItem::setVtkProperties(VtkAlgorithmProperties* vtkProps)
 {
 	QObject::connect(vtkProps, SIGNAL(ScalarVisibilityChanged(bool)),
@@ -222,15 +229,9 @@ void VtkVisPointSetItem::SetActiveAttribute( const QString& name )
 			vtkPointData* pointData = dataSet->GetPointData();
 			if(pointData)
 			{
-				if(setActiveAttributeOnData(pointData, strippedName))
+				if(activeAttributeExists(pointData, strippedName))
 				{
-					_algorithm->SetInputArrayToProcess(
-					        0,
-					        0,
-					        0,
-					        vtkDataObject::
-					        FIELD_ASSOCIATION_POINTS,
-					        charName);
+					_algorithm->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_POINTS, charName);
 					_mapper->SetScalarModeToUsePointData();
 				}
 				else
@@ -246,15 +247,9 @@ void VtkVisPointSetItem::SetActiveAttribute( const QString& name )
 			vtkCellData* cellData = dataSet->GetCellData();
 			if(cellData)
 			{
-				if(setActiveAttributeOnData(cellData, strippedName))
+				if(activeAttributeExists(cellData, strippedName))
 				{
-					_algorithm->SetInputArrayToProcess(
-					        0,
-					        0,
-					        0,
-					        vtkDataObject::
-					        FIELD_ASSOCIATION_CELLS,
-					        charName);
+					_algorithm->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_CELLS, charName);
 					_mapper->SetScalarModeToUseCellData();
 				}
 				else
@@ -266,15 +261,16 @@ void VtkVisPointSetItem::SetActiveAttribute( const QString& name )
 			}
 		}
 
+		_activeAttribute = name;
 		_mapper->SetScalarRange(dataSet->GetScalarRange());
 		this->setLookupTableForActiveScalar();
 		_mapper->ScalarVisibilityOn();
+
 		//_mapper->Update();	// KR: TODO - this is incredibly slow ... WHY???
-		_activeAttribute = name;
 	}
 }
 
-bool VtkVisPointSetItem::setActiveAttributeOnData(vtkDataSetAttributes* data, std::string& name)
+bool VtkVisPointSetItem::activeAttributeExists(vtkDataSetAttributes* data, std::string& name)
 {
 	bool arrayFound = false;
 	for (int i = 0; i < data->GetNumberOfArrays() && !arrayFound; i++)
@@ -306,12 +302,11 @@ void VtkVisPointSetItem::setLookupTableForActiveScalar()
 				vtkProps->SetLookUpTable(GetActiveAttribute(), lut);
 			}
 			else // specific color table
+				_mapper->SetLookupTable(vtkProps->GetLookupTable(this->GetActiveAttribute()));
 
-				_mapper->SetLookupTable(vtkProps->GetLookupTable(this->
-				                                                 GetActiveAttribute()));
-
-			_mapper->SetScalarRange(_transformFilter->GetOutput()->GetScalarRange());
-			//_mapper->Update();  KR: not necessary?!
+			//_mapper->SetScalarRange(this->_transformFilter->GetOutput()->GetScalarRange());
+			_mapper->SetScalarRange(vtkDataSet::SafeDownCast(this->_algorithm->GetOutputDataObject(0))->GetScalarRange());
+			//_mapper->Update();  //KR: not necessary?!
 		}
 	}
 }
@@ -327,7 +322,7 @@ void VtkVisPointSetItem::setScale(double x, double y, double z) const
 	if (this->transformFilter())
 	{
 		vtkTransform* transform =
-		        static_cast<vtkTransform*>(this->transformFilter()->GetTransform());
+		        static_cast<vtkTransform*>(this->_transformFilter->GetTransform());
 		double* trans = transform->GetPosition();
 		transform->Identity();
 		transform->Scale(x, y, z);
@@ -341,7 +336,7 @@ void VtkVisPointSetItem::setTranslation(double x, double y, double z) const
 	if (this->transformFilter())
 	{
 		vtkTransform* transform =
-		        static_cast<vtkTransform*>(this->transformFilter()->GetTransform());
+		        static_cast<vtkTransform*>(this->_transformFilter->GetTransform());
 		double* scale = transform->GetScale();
 		transform->Identity();
 		transform->Scale(scale);
@@ -350,3 +345,7 @@ void VtkVisPointSetItem::setTranslation(double x, double y, double z) const
 	}
 }
 
+vtkAlgorithm* VtkVisPointSetItem::transformFilter() const 
+{ 
+	return _transformFilter; 
+}
\ No newline at end of file
diff --git a/VtkVis/VtkVisPointSetItem.h b/VtkVis/VtkVisPointSetItem.h
index 843bf61bf9aee031c5a2cdcf1501d3fd593d8440..90298eca855637e891b3e007bbf015850503db73 100644
--- a/VtkVis/VtkVisPointSetItem.h
+++ b/VtkVis/VtkVisPointSetItem.h
@@ -11,25 +11,28 @@
 #include "VtkVisPipelineItem.h"
 
 class vtkAlgorithm;
+class vtkDataSetAttributes;
 class vtkPointSet;
-class QVtkDataSetMapper;
 class vtkProp3D;
 class vtkRenderer;
-class VtkAlgorithmProperties;
+class vtkTransformFilter;
+class QVtkDataSetMapper;
+
 class vtkOsgActor;
+
+class VtkAlgorithmProperties;
 class VtkCompositeFilter;
-class vtkTransformFilter;
-class vtkDataSetAttributes;
 
 /**
- * \brief An item in the VtkVisPipeline containing a graphic object to be visualized.
+ * \brief An item in the VtkVisPipeline containing a point set object to be visualized.
  *
- * Any VTK-object (source-items, filter-items, etc.) need to be put into a VtkPipelineItem
- * to be assigned a mapper, an actor and its visualization properties (colour, etc.).
+ * Any VTK point set object (i.e. vtkUnstructuredGrid- and vtkPolyDataAlgorithm-objects) 
+ * are represented by a VtkVisPointSetItem to be assigned a mapper, an actor and its 
+ * visualization properties (colour, scalar values, etc.).
+ * \sa VtkVisPipelineItem
  */
 class VtkVisPointSetItem : public VtkVisPipelineItem
 {
-//	Q_OBJECT
 
 public:
 	/// @brief Constructor for a source/filter object.
@@ -50,34 +53,39 @@ public:
 	/// the item and sets the item's properties.
 	void Initialize(vtkRenderer* renderer);
 
-	vtkTransformFilter* transformFilter() const { return _transformFilter; }
+	vtkAlgorithm* transformFilter() const;
 
 	/// @brief Sets the selected attribute array for the visualisation of the data set.
 	void SetActiveAttribute(const QString& name);
 
+	/// @brief Sets the scalar range for the selected data array
 	void SetScalarRange(double min, double max);
 
-	/// @brief Sets the geometry and data scaling.
+	/// @brief Scales the data in visualisation-space.
 	void setScale(double x, double y, double z) const;
 
-	/// @brief Translates the item in vis-space.
+	/// @brief Translates the item in visualisation-space.
 	void setTranslation(double x, double y, double z) const;
 
 protected:
+	QVtkDataSetMapper* _mapper;
 	vtkTransformFilter* _transformFilter;
 	QString _activeAttribute;
 
+	/// Selects the appropriate VTK-Writer object and writes the object to a file with the given name.
 	virtual int callVTKWriter(vtkAlgorithm* algorithm, const std::string &filename) const;
 
 	/// Sets a color lookup table for the current scalar array.
 	void setLookupTableForActiveScalar();
 
+	void SetScalarVisibility(bool on);
+
 	/// @brief Sets pre-set properties on vtkActor and on vtkMapper
 	void setVtkProperties(VtkAlgorithmProperties* vtkProps);
 
 private:
-	/// @see SetActiveAttribute()
-	bool setActiveAttributeOnData(vtkDataSetAttributes* data, std::string& name);
+	/// Checks if the selected attribute actually exists for the data set
+	bool activeAttributeExists(vtkDataSetAttributes* data, std::string& name);
 };
 
 #endif // VTKVISPOINTSETITEM_H
diff --git a/VtkVis/VtkVisTabWidget.cpp b/VtkVis/VtkVisTabWidget.cpp
index 5b6fac538e28a9f290335e2b24c48f7a6ea76761..880fca04054105049c58a0fec5ae647b8a53ecde 100644
--- a/VtkVis/VtkVisTabWidget.cpp
+++ b/VtkVis/VtkVisTabWidget.cpp
@@ -9,9 +9,11 @@
 #include "VtkColorByHeightFilter.h"
 #include "VtkCompositeColorByHeightFilter.h"
 #include "VtkVisPipelineItem.h"
+#include "VtkVisImageItem.h"
 #include "VtkVisTabWidget.h"
 
 #include <vtkActor.h>
+#include <vtkImageChangeInformation.h>
 #include <vtkProperty.h>
 #include <vtkTransform.h>
 #include <vtkTransformFilter.h>
@@ -54,20 +56,20 @@ void VtkVisTabWidget::setActiveItem( VtkVisPipelineItem* item )
 	if (item)
 	{
 		_item = item;
+		transformTabWidget->setEnabled(true);
 
-		vtkActor* actor = dynamic_cast<vtkActor*>(_item->actor());
-		if (actor)
+		vtkTransformFilter* transform_filter = dynamic_cast<vtkTransformFilter*>(_item->transformFilter());
+		if (transform_filter) // if data set
 		{
 			actorPropertiesGroupBox->setEnabled(true);
-			transformTabWidget->setEnabled(true);
-			vtkProperty* vtkProps = actor->GetProperty();
+			vtkProperty* vtkProps = static_cast<vtkActor*>(_item->actor())->GetProperty();
 			diffuseColorPickerButton->setColor(vtkProps->GetDiffuseColor());
 			visibleEdgesCheckBox->setChecked(vtkProps->GetEdgeVisibility());
 			edgeColorPickerButton->setColor(vtkProps->GetEdgeColor());
 			opacitySlider->setValue((int)(vtkProps->GetOpacity() * 100.0));
 
 			vtkTransform* transform =
-			        static_cast<vtkTransform*>(_item->transformFilter()->GetTransform());
+			        static_cast<vtkTransform*>(transform_filter->GetTransform());
 			if (transform)
 			{
 				double scale[3];
@@ -105,10 +107,22 @@ void VtkVisTabWidget::setActiveItem( VtkVisPipelineItem* item )
 					}
 				}
 		}
-		else
+		else // if image
 		{
+			const VtkVisImageItem* img = static_cast<VtkVisImageItem*>(_item);
 			actorPropertiesGroupBox->setEnabled(false);
-			transformTabWidget->setEnabled(false);
+			vtkImageChangeInformation* transform = static_cast<vtkImageChangeInformation*>(img->transformFilter());
+			double trans[3];
+			transform->GetOriginTranslation(trans);
+			this->transX->blockSignals(true);
+			this->transY->blockSignals(true);
+			this->transZ->blockSignals(true);
+			this->transX->setText(QString::number(trans[0]));
+			this->transY->setText(QString::number(trans[1]));
+			this->transZ->setText(QString::number(trans[2]));
+			this->transX->blockSignals(false);
+			this->transY->blockSignals(false);
+			this->transZ->blockSignals(false);
 		}
 
 		this->buildProportiesDialog(item);