diff --git a/Modules/FiberDissection/CMakeLists.txt b/Modules/FiberDissection/CMakeLists.txt
index 14605b9..9b030ee 100644
--- a/Modules/FiberDissection/CMakeLists.txt
+++ b/Modules/FiberDissection/CMakeLists.txt
@@ -1,5 +1,5 @@
 MITK_CREATE_MODULE(
   SUBPROJECTS MITK-Diffusion
-  INCLUDE_DIRS Interactor ${CMAKE_CURRENT_BINARY_DIR}
+  INCLUDE_DIRS Interactor MachineLearning ${CMAKE_CURRENT_BINARY_DIR}
   DEPENDS MitkDiffusionCore
 )
diff --git a/Modules/FiberDissection/Interactor/mitkStreamlineInteractor.cpp b/Modules/FiberDissection/Interactor/mitkStreamlineInteractor.cpp
index abc7696..32f2de0 100644
--- a/Modules/FiberDissection/Interactor/mitkStreamlineInteractor.cpp
+++ b/Modules/FiberDissection/Interactor/mitkStreamlineInteractor.cpp
@@ -1,344 +1,344 @@
 /*============================================================================
 
 The Medical Imaging Interaction Toolkit (MITK)
 
 Copyright (c) German Cancer Research Center (DKFZ)
 All rights reserved.
 
 Use of this source code is governed by a 3-clause BSD license that can be
 found in the LICENSE file.
 
 ============================================================================*/
 
 #include "mitkStreamlineInteractor.h"
 //#include "mitkStreamlineMapper2D.h"
 
 // MITK includes
 #include <mitkInteractionConst.h>
 #include <mitkInteractionPositionEvent.h>
 #include <mitkInternalEvent.h>
 #include <mitkLookupTableProperty.h>
 #include <mitkOperationEvent.h>
 #include <mitkRotationOperation.h>
 #include <mitkScaleOperation.h>
 #include <mitkSurface.h>
 #include <mitkUndoController.h>
 #include <mitkVtkMapper.h>
 
 // VTK includes
 #include <vtkCamera.h>
 #include <vtkInteractorObserver.h>
 #include <vtkInteractorStyle.h>
 #include <vtkMath.h>
 #include <vtkPointData.h>
 #include <vtkPolyData.h>
 #include <vtkRenderWindowInteractor.h>
 #include <vtkVector.h>
 #include <vtkPolyLine.h>
 #include <vtkVectorOperators.h>
 
 mitk::StreamlineInteractor::StreamlineInteractor()
 {
     m_ColorForHighlight[0] = 1.0;
     m_ColorForHighlight[1] = 0.5;
     m_ColorForHighlight[2] = 0.0;
     m_ColorForHighlight[3] = 1.0;
 
     // TODO if we want to get this configurable, the this is the recipe:
     // - make the 2D mapper add corresponding properties to control "enabled" and "color"
     // - make the interactor evaluate those properties
     // - in an ideal world, modify the state machine on the fly and skip mouse move handling
 }
 
 mitk::StreamlineInteractor::~StreamlineInteractor()
 {
 }
 
 void mitk::StreamlineInteractor::ConnectActionsAndFunctions()
 {
 //  CONNECT_CONDITION("isoverstreamline", HasPickedHandle);
   CONNECT_FUNCTION("addnegstreamline", AddStreamlineNegBundle);
   CONNECT_FUNCTION("addposstreamline", AddStreamlinePosBundle);
 //  CONNECT_FUNCTION("FeedUndoStack", FeedUndoStack);
 }
 
 void mitk::StreamlineInteractor::SetNegativeNode(DataNode *node)
 {
 
   DataInteractor::SetDataNode(node);
-  m_NegStreamline= dynamic_cast<mitk::FiberBundle *>(node->GetData());
 
+  m_NegStreamline= dynamic_cast<mitk::FiberBundle *>(node->GetData());
   MITK_INFO << "Negative Node added";
 }
 
 void mitk::StreamlineInteractor::SetToLabelNode(DataNode *node)
 {
     DataInteractor::SetDataNode(node);
 
   if (node && node->GetData())
   {
     m_manStreamline = dynamic_cast<mitk::FiberBundle *>(node->GetData());
     MITK_INFO << "Label node added";
   }
 }
 
 void mitk::StreamlineInteractor::SetPositiveNode(DataNode *node)
 {
 
     DataInteractor::SetDataNode(node);
     m_PosStreamline= dynamic_cast<mitk::FiberBundle *>(node->GetData());
 
 
     MITK_INFO << "Positive Node added";
   }
 
 void mitk::StreamlineInteractor::AddStreamlinePosBundle(StateMachineAction *, InteractionEvent *interactionEvent)
 {
     MITK_INFO << "PositiveBundle clicked";
 //     auto positionEvent = dynamic_cast<const InteractionPositionEvent *>(interactionEvent);
 //     if (positionEvent == nullptr)
 //     {
 //       return;
 //     }
 //    return true;
     auto positionEvent = dynamic_cast<const InteractionPositionEvent *>(interactionEvent);
     if (positionEvent == nullptr)
     {
         MITK_INFO << "no position";
     }
 
     if (interactionEvent->GetSender()->GetMapperID() == BaseRenderer::Standard2D)
     {
 //      m_PickedHandle = PickFrom2D(positionEvent);
         MITK_INFO << "2D";
     }
     else
     {
         BaseRenderer *renderer = positionEvent->GetSender();
 
         auto &picker = m_Picker[renderer];
         if (picker == nullptr)
         {
 
 
           picker = vtkSmartPointer<vtkCellPicker>::New();
           picker->SetTolerance(0.01);
           auto mapper = GetDataNode()->GetMapper(BaseRenderer::Standard3D);
 
 
           auto vtk_mapper = dynamic_cast<VtkMapper *>(mapper);
           if (vtk_mapper)
           { // doing this each time is bizarre
             picker->AddPickList(vtk_mapper->GetVtkProp(renderer));
             picker->PickFromListOn();
           }
         }
 
         auto displayPosition = positionEvent->GetPointerPositionOnScreen();
 //        MITK_INFO << displayPosition;
         picker->Pick(displayPosition[0], displayPosition[1], 0, positionEvent->GetSender()->GetVtkRenderer());
 
         vtkIdType pickedCellID = picker->GetCellId();
 
         MITK_INFO << picker->GetCellId();
         MITK_INFO << "Number of Cells";
 //        MITK_INFO << m_PosStreamline->GetFiberPolyData()->GetNumberOfCells();
 
 
 
         if (picker->GetCellId()==-1)
         {
             MITK_INFO << "Nothing picked";
         }
         else {
 
 
             vtkSmartPointer<vtkPolyData> vNewPolyData = vtkSmartPointer<vtkPolyData>::New();
             MITK_INFO << vNewPolyData->GetNumberOfLines ();
             vtkSmartPointer<vtkCellArray> vNewLines = vtkSmartPointer<vtkCellArray>::New();
             vtkSmartPointer<vtkPoints> vNewPoints = vtkSmartPointer<vtkPoints>::New();
 
             unsigned int counter = 0;
             for ( int i=0; i<m_PosStreamline->GetFiberPolyData()->GetNumberOfCells(); i++)
             {
               vtkCell* cell = m_PosStreamline->GetFiberPolyData()->GetCell(i);
               auto numPoints = cell->GetNumberOfPoints();
               vtkPoints* points = cell->GetPoints();
 
               vtkSmartPointer<vtkPolyLine> container = vtkSmartPointer<vtkPolyLine>::New();
               for (unsigned int j=0; j<numPoints; j++)
               {
                 double p[3];
                 points->GetPoint(j, p);
 
                 vtkIdType id = vNewPoints->InsertNextPoint(p);
                 container->GetPointIds()->InsertNextId(id);
               }
           //    weights->InsertValue(counter, fib->GetFiberWeight(i));
               vNewLines->InsertNextCell(container);
               counter++;
 
             }
 
 
 
             vtkCell* cell = m_manStreamline->GetFiberPolyData()->GetCell(pickedCellID);
             auto numPoints = cell->GetNumberOfPoints();
             vtkPoints* points = cell->GetPoints();
 
             vtkSmartPointer<vtkPolyLine> container = vtkSmartPointer<vtkPolyLine>::New();
             for (unsigned int j=0; j<numPoints; j++)
             {
               double p[3];
               points->GetPoint(j, p);
 
               vtkIdType id = vNewPoints->InsertNextPoint(p);
               container->GetPointIds()->InsertNextId(id);
             }
             vNewLines->InsertNextCell(container);
 
             vNewPolyData->SetPoints(vNewPoints);
             vNewPolyData->SetLines(vNewLines);
 
     //        m_PosStreamline = mitk::FiberBundle::New(vNewPolyData);
             m_PosStreamline->GetFiberPolyData()->SetPoints(vNewPoints);
             m_PosStreamline->GetFiberPolyData()->SetLines(vNewLines);
             m_PosStreamline->SetFiberColors(0, 255, 0);
 
             m_manStreamline->GetFiberPolyData()->DeleteCell(pickedCellID);
             m_manStreamline->GetFiberPolyData()->RemoveDeletedCells();
 
             MITK_INFO << m_manStreamline->GetFiberPolyData()->GetNumberOfCells();
             MITK_INFO << m_PosStreamline->GetFiberPolyData()->GetNumberOfCells();
         }
     }
   }
 
 void mitk::StreamlineInteractor::AddStreamlineNegBundle(StateMachineAction *, InteractionEvent *interactionEvent)
 {
     MITK_INFO << "NegativeBundle clicked";
 //     auto positionEvent = dynamic_cast<const InteractionPositionEvent *>(interactionEvent);
 //     if (positionEvent == nullptr)
 //     {
 //       return;
 //     }
 //    return true;
     auto positionEvent = dynamic_cast<const InteractionPositionEvent *>(interactionEvent);
     if (positionEvent == nullptr)
     {
         MITK_INFO << "no position";
     }
 
     if (interactionEvent->GetSender()->GetMapperID() == BaseRenderer::Standard2D)
     {
 //      m_PickedHandle = PickFrom2D(positionEvent);
         MITK_INFO << "2D";
     }
     else
     {
         BaseRenderer *renderer = positionEvent->GetSender();
 
         auto &picker = m_Picker[renderer];
         if (picker == nullptr)
         {
 
 
           picker = vtkSmartPointer<vtkCellPicker>::New();
           picker->SetTolerance(0.01);
           auto mapper = GetDataNode()->GetMapper(BaseRenderer::Standard3D);
 
 
           auto vtk_mapper = dynamic_cast<VtkMapper *>(mapper);
           if (vtk_mapper)
           { // doing this each time is bizarre
             picker->AddPickList(vtk_mapper->GetVtkProp(renderer));
             picker->PickFromListOn();
           }
         }
 
         auto displayPosition = positionEvent->GetPointerPositionOnScreen();
 //        MITK_INFO << displayPosition;
         picker->Pick(displayPosition[0], displayPosition[1], 0, positionEvent->GetSender()->GetVtkRenderer());
 
         vtkIdType pickedCellID = picker->GetCellId();
 
         MITK_INFO << picker->GetCellId();
 
         if (picker->GetCellId()==-1)
         {
             MITK_INFO << "Nothing picked";
         }
         else
         {
             vtkSmartPointer<vtkPolyData> vNewPolyData = vtkSmartPointer<vtkPolyData>::New();
             MITK_INFO << vNewPolyData->GetNumberOfLines ();
             vtkSmartPointer<vtkCellArray> vNewLines = vtkSmartPointer<vtkCellArray>::New();
             vtkSmartPointer<vtkPoints> vNewPoints = vtkSmartPointer<vtkPoints>::New();
 
             unsigned int counter = 0;
             for ( int i=0; i<m_NegStreamline->GetFiberPolyData()->GetNumberOfCells(); i++)
             {
               vtkCell* cell = m_NegStreamline->GetFiberPolyData()->GetCell(i);
               auto numPoints = cell->GetNumberOfPoints();
               vtkPoints* points = cell->GetPoints();
 
               vtkSmartPointer<vtkPolyLine> container = vtkSmartPointer<vtkPolyLine>::New();
               for (unsigned int j=0; j<numPoints; j++)
               {
                 double p[3];
                 points->GetPoint(j, p);
 
                 vtkIdType id = vNewPoints->InsertNextPoint(p);
                 container->GetPointIds()->InsertNextId(id);
               }
           //    weights->InsertValue(counter, fib->GetFiberWeight(i));
               vNewLines->InsertNextCell(container);
               counter++;
 
             }
 
 
 
             vtkCell* cell = m_manStreamline->GetFiberPolyData()->GetCell(pickedCellID);
             auto numPoints = cell->GetNumberOfPoints();
             vtkPoints* points = cell->GetPoints();
 
             vtkSmartPointer<vtkPolyLine> container = vtkSmartPointer<vtkPolyLine>::New();
             for (unsigned int j=0; j<numPoints; j++)
             {
               double p[3];
               points->GetPoint(j, p);
 
               vtkIdType id = vNewPoints->InsertNextPoint(p);
               container->GetPointIds()->InsertNextId(id);
             }
             vNewLines->InsertNextCell(container);
 
             vNewPolyData->SetPoints(vNewPoints);
             vNewPolyData->SetLines(vNewLines);
 
     //        m_NegStreamline = mitk::FiberBundle::New(vNewPolyData);
             m_NegStreamline->GetFiberPolyData()->SetPoints(vNewPoints);
             m_NegStreamline->GetFiberPolyData()->SetLines(vNewLines);
             m_NegStreamline->SetFiberColors(255, 0, 0);
 
             m_manStreamline->GetFiberPolyData()->DeleteCell(pickedCellID);
             m_manStreamline->GetFiberPolyData()->RemoveDeletedCells();
 
             MITK_INFO << m_manStreamline->GetFiberPolyData()->GetNumberOfCells();
             MITK_INFO << m_NegStreamline->GetFiberPolyData()->GetNumberOfCells();
         }
 
 
 
 
 
 
 
 
 
     }
 
 
 
   }
diff --git a/Modules/FiberDissection/Interactor/mitkStreamlineInteractor.h b/Modules/FiberDissection/Interactor/mitkStreamlineInteractor.h
index ce9f4fd..3c70b41 100644
--- a/Modules/FiberDissection/Interactor/mitkStreamlineInteractor.h
+++ b/Modules/FiberDissection/Interactor/mitkStreamlineInteractor.h
@@ -1,105 +1,106 @@
 /*============================================================================
 
 The Medical Imaging Interaction Toolkit (MITK)
 
 Copyright (c) German Cancer Research Center (DKFZ)
 All rights reserved.
 
 Use of this source code is governed by a 3-clause BSD license that can be
 found in the LICENSE file.
 
 ============================================================================*/
 
 #ifndef mitkStreamlineInteractor_h
 #define mitkStreamlineInteractor_h
 
 
+#include "MitkFiberDissectionExports.h"
+
 // MITK includes
 #include <mitkDataInteractor.h>
 #include <mitkDataNode.h>
 #include <mitkGeometry3D.h>
 #include <mitkFiberBundle.h>
 
 // VTK includes
 #include <vtkCellPicker.h>
 #include <vtkSmartPointer.h>
 
 // System includes
 #include <memory>
 
-#include "MitkFiberDissectionExports.h"
 
 namespace mitk
 {
   class InteractionPositionEvent;
 
   //! Data interactor to pick streamlines via interaction
   //! with a mitk::Streamline.
   //!
   //!
   //! To determine what parts of the object are clicked during interaction,
   //! the mappers (2D: custom mapper, 3D: regular surface mapper) are asked
   //! for their VTK objects, picking is performed, and the picked point is
   //! forwarded to the Streamline object for interpretation.
   //!
   //! The interactor fills the undo/redo stack with operations on the modified geometry.
   //!
   //! \sa Streamline
   class MITKFIBERDISSECTION_EXPORT StreamlineInteractor : public DataInteractor
   {
   public:
     mitkClassMacro(StreamlineInteractor, DataInteractor);
     itkFactorylessNewMacro(Self);
     itkCloneMacro(Self);
 
       //! The node holding the Fiberbundle for visual feedback.
       //! This is the node that the interactor is primarily working on
       //! (calls DataInteractor::SetDataNode).
 
       void SetNegativeNode(DataNode *node);
       void SetToLabelNode(DataNode *node);
       void SetPositiveNode(DataNode *node);
 
   protected:
 
        void AddStreamlineNegBundle(StateMachineAction *, InteractionEvent *interactionEvent);
 
        void AddStreamlinePosBundle(StateMachineAction *, InteractionEvent *interactionEvent);
 
 
        std::map<BaseRenderer *, vtkSmartPointer<vtkCellPicker>> m_Picker;
 
   private:
     StreamlineInteractor();
     ~StreamlineInteractor() override;
 
     //! Setup the relation between the XML state machine and this object's methods.
     void ConnectActionsAndFunctions() override;
 
     //! State machine condition: successful Streamline picking
     //! \return true when any part of the Streamline has been picked.
 //    bool HasPickedHandle(const InteractionEvent *);
 
 //    void DecideInteraction(StateMachineAction *, InteractionEvent *interactionEvent);
 
 //    //! Pick a Streamline handle from a 2D event (passing by the 2D mapper)
 //    Streamline::HandleType PickFrom2D(const InteractionPositionEvent *positionEvent);
 
 //    //! Pick a Streamline handle from a 3D event
 //    //! (passing by the general surface mapper and the Streamline object)
 //    Streamline::HandleType PickFrom3D(const InteractionPositionEvent *positionEvent);
 
 //    void UpdateHandleHighlight();
 
     //! the Streamline used for visual feedback and picking
     mitk::FiberBundle::Pointer m_NegStreamline;
     mitk::FiberBundle::Pointer m_PosStreamline;
     mitk::FiberBundle::Pointer m_manStreamline;
 
     vtkSmartPointer<vtkPolyData>  m_extracted_streamline;
 
     double m_ColorForHighlight[4];
 
   };
 }
 #endif
diff --git a/Modules/FiberDissection/MachineLearning/mitkStreamlineFeatureExtractor.cpp b/Modules/FiberDissection/MachineLearning/mitkStreamlineFeatureExtractor.cpp
index 4420b63..22d0da8 100644
--- a/Modules/FiberDissection/MachineLearning/mitkStreamlineFeatureExtractor.cpp
+++ b/Modules/FiberDissection/MachineLearning/mitkStreamlineFeatureExtractor.cpp
@@ -1,176 +1,279 @@
 /*===================================================================
 
 The Medical Imaging Interaction Toolkit (MITK)
 
 Copyright (c) German Cancer Research Center.
 
 All rights reserved.
 
 This software is distributed WITHOUT ANY WARRANTY; without
 even the implied warranty of MERCHANTABILITY or FITNESS FOR
 A PARTICULAR PURPOSE.
 
 See LICENSE.txt or http://www.mitk.org for details.
 
 ===================================================================*/
 #include "mitkStreamlineFeatureExtractor.h"
 
 #define _USE_MATH_DEFINES
 #include <math.h>
 #include <boost/progress.hpp>
 #include <vnl/vnl_sparse_matrix.h>
 #include <mitkIOUtil.h>
 
 namespace mitk{
 
 StreamlineFeatureExtractor::StreamlineFeatureExtractor()
-  : m_NumPoints(12)
+  : m_NumPoints(20)
 {
 
 }
 
+StreamlineFeatureExtractor::~StreamlineFeatureExtractor()
+{
+
+}
+
+
 
-void TractClusteringFilter::SetTractogram(const mitk::FiberBundle::Pointer &Tractogram)
+void StreamlineFeatureExtractor::SetTractogram(const mitk::FiberBundle::Pointer &Tractogram)
 {
   m_Tractogram = Tractogram;
 }
 
 
+std::vector<vnl_matrix<float> > StreamlineFeatureExtractor::ResampleFibers(mitk::FiberBundle::Pointer tractogram)
+{
+  mitk::FiberBundle::Pointer temp_fib = tractogram->GetDeepCopy();
+  temp_fib->ResampleToNumPoints(m_NumPoints);
 
-void StreamlineFeatureExtractor::GenerateData()
+  std::vector< vnl_matrix<float> > out_fib;
+
+  for (int i=0; i<temp_fib->GetFiberPolyData()->GetNumberOfCells(); i++)
+  {
+    vtkCell* cell = temp_fib->GetFiberPolyData()->GetCell(i);
+    int numPoints = cell->GetNumberOfPoints();
+    vtkPoints* points = cell->GetPoints();
+
+    vnl_matrix<float> streamline;
+    streamline.set_size(3, m_NumPoints);
+    streamline.fill(0.0);
+
+    for (int j=0; j<numPoints; j++)
+    {
+      double cand[3];
+      points->GetPoint(j, cand);
+
+      vnl_vector_fixed< float, 3 > candV;
+      candV[0]=cand[0]; candV[1]=cand[1]; candV[2]=cand[2];
+      streamline.set_column(j, candV);
+    }
+
+    out_fib.push_back(streamline);
+  }
+
+  return out_fib;
+}
+
+std::vector<vnl_matrix<float> > StreamlineFeatureExtractor::CalculateDmdf(std::vector<vnl_matrix<float> > tractogram, std::vector<vnl_matrix<float> > prototypes)
 {
-  m_OutTractograms.clear();
+    std::vector< vnl_matrix<float> >  dist_vec;
+    MITK_INFO << tractogram.size();
+    MITK_INFO << prototypes.size();
+    MITK_INFO << tractogram.at(0).cols();
+
+
+    for (unsigned int i=0; i<tractogram.size(); i++)
+    {
+
+        vnl_matrix<float> distances;
+        distances.set_size(1, prototypes.size());
+        distances.fill(0.0);
+
+
+        for (unsigned int j=0; j<prototypes.size(); j++)
+        {
+            vnl_matrix<float> single_distances;
+            single_distances.set_size(1, tractogram.at(0).cols());
+            single_distances.fill(0.0);
+            vnl_matrix<float> single_distances_flip;
+            single_distances_flip.set_size(1, tractogram.at(0).cols());
+            single_distances_flip.fill(0.0);
+            for (unsigned int ik=0; ik<tractogram.at(0).cols(); ik++)
+            {
+                double cur_dist;
+                double cur_dist_flip;
+
+                cur_dist = sqrt(pow(tractogram.at(i).get(0,ik) - prototypes.at(j).get(0,ik), 2.0) +
+                                       pow(tractogram.at(i).get(1,ik) - prototypes.at(j).get(1,ik), 2.0) +
+                                       pow(tractogram.at(i).get(2,ik) - prototypes.at(j).get(2,ik), 2.0));
+//                cur_dist_flip = sqrt(pow(tractogram.at(i).get(0,ik) - prototypes.at(j).get(0,ik), 2.0) +
+//                                       pow(tractogram.at(i).get(1,ik) - prototypes.at(j).get(1,ik), 2.0) +
+//                                       pow(tractogram.at(i).get(2,ik) - prototypes.at(j).get(2,ik), 2.0));
+
+                cur_dist_flip = sqrt(pow(tractogram.at(i).get(0,ik) - prototypes.at(j).get(0,prototypes.at(0).cols()-(ik+1)), 2.0) +
+                                       pow(tractogram.at(i).get(1,ik) - prototypes.at(j).get(1,prototypes.at(0).cols()-(ik+1)), 2.0) +
+                                       pow(tractogram.at(i).get(2,ik) - prototypes.at(j).get(2,prototypes.at(0).cols()-(ik+1)), 2.0));
+
+                single_distances.put(0,ik, cur_dist);
+                single_distances_flip.put(0,ik, cur_dist_flip);
+
+            }
+
+            if (single_distances_flip.mean()> single_distances.mean())
+            {
+                distances.put(0,j, single_distances.mean());
+            }
+            else {
+                distances.put(0,j, single_distances_flip.mean());
+            }
+
+
+
+        }
+        dist_vec.push_back(distances);
+    }
+//    MITK_INFO << dist_vec;
+    return dist_vec;
+}
+
 
+void StreamlineFeatureExtractor::GenerateData()
+{
+    MITK_INFO << "Update";
   mitk::FiberBundle::Pointer inputPrototypes = mitk::IOUtil::Load<mitk::FiberBundle>("/home/r948e/E132-Projekte/Projects/2022_Peretzke_Interactive_Fiber_Dissection/mitk_diff/prototypes_599671.trk");
 
-  T_prototypes = ResampleFibers(inputPrototypes);
+  T_Prototypes = ResampleFibers(inputPrototypes);
+  T_Tractogram = ResampleFibers(m_Tractogram);
 
+  m_distances = CalculateDmdf(T_Tractogram, T_Prototypes);
 
+  MITK_INFO << m_distances.at(0);
 
 //  if (m_Metrics.empty())
 //  {
 //    mitkThrow() << "No metric selected!";
 //    return;
 //  }
 
 //  T = ResampleFibers(m_Tractogram);
 //  if (T.empty())
 //  {
 //    MITK_INFO << "No fibers in tractogram!";
 //    return;
 //  }
 
 //  std::vector< unsigned int > f_indices;
 //  for (unsigned int i=0; i<T.size(); ++i)
 //    f_indices.push_back(i);
 //  //  std::random_shuffle(f_indices.begin(), f_indices.end());
 
 //  Cluster no_match;
 //  std::vector< Cluster > clusters;
 //  if (m_InCentroids.IsNull())
 //  {
 //    MITK_INFO << "Clustering fibers";
 //    clusters = ClusterStep(f_indices, m_Distances);
 //    MITK_INFO << "Number of clusters: " << clusters.size();
 //    clusters = MergeDuplicateClusters2(clusters);
 //    std::sort(clusters.begin(),clusters.end());
 //  }
 //  else
 //  {
 //    std::vector<vnl_matrix<float> > centroids = ResampleFibers(m_InCentroids);
 //    if (centroids.empty())
 //    {
 //      MITK_INFO << "No fibers in centroid tractogram!";
 //      return;
 //    }
 //    MITK_INFO << "Clustering with input centroids";
 //    clusters = AddToKnownClusters(f_indices, centroids);
 //    no_match = clusters.back();
 //    clusters.pop_back();
 //    MITK_INFO << "Number of clusters: " << clusters.size();
 //    clusters = MergeDuplicateClusters2(clusters);
 //  }
 
 //  MITK_INFO << "Clustering finished";
 //  int max = clusters.size()-1;
 //  if (m_MaxClusters>0 && clusters.size()-1>m_MaxClusters)
 //    max = m_MaxClusters;
 //  m_DiscardedClusters = 0;
 //  for (int i=clusters.size()-1; i>=0; --i)
 //  {
 //    Cluster c = clusters.at(i);
 //    if ( c.n>=(int)m_MinClusterSize && !(m_MaxClusters>0 && clusters.size()-i>m_MaxClusters) )
 //    {
 //      m_OutClusters.push_back(c);
 
 //      vtkSmartPointer<vtkFloatArray> weights = vtkSmartPointer<vtkFloatArray>::New();
 //      vtkSmartPointer<vtkPolyData> pTmp = m_Tractogram->GeneratePolyDataByIds(c.I, weights);
 //      mitk::FiberBundle::Pointer fib = mitk::FiberBundle::New(pTmp);
 //      if (max>0)
 //        fib->SetFiberWeights((float)i/max);
 //      m_OutTractograms.push_back(fib);
 //      m_OutFiberIndices.push_back(c.I);
 
 //      // create centroid
 //      vtkSmartPointer<vtkPoints> vtkNewPoints = vtkSmartPointer<vtkPoints>::New();
 //      vtkSmartPointer<vtkCellArray> vtkNewCells = vtkSmartPointer<vtkCellArray>::New();
 //      vtkSmartPointer<vtkPolyData> polyData = vtkSmartPointer<vtkPolyData>::New();
 //      vtkSmartPointer<vtkPolyLine> container = vtkSmartPointer<vtkPolyLine>::New();
 //      vnl_matrix<float> centroid_points = c.h / c.n;
 //      for (unsigned int j=0; j<centroid_points.cols(); j++)
 //      {
 //        double p[3];
 //        p[0] = centroid_points.get(0,j);
 //        p[1] = centroid_points.get(1,j);
 //        p[2] = centroid_points.get(2,j);
 
 //        vtkIdType id = vtkNewPoints->InsertNextPoint(p);
 //        container->GetPointIds()->InsertNextId(id);
 //      }
 //      vtkNewCells->InsertNextCell(container);
 //      polyData->SetPoints(vtkNewPoints);
 //      polyData->SetLines(vtkNewCells);
 //      mitk::FiberBundle::Pointer centroid = mitk::FiberBundle::New(polyData);
 //      centroid->SetFiberColors(255, 255, 255);
 //      m_OutCentroids.push_back(centroid);
 //    }
 //    else
 //    {
 //      m_DiscardedClusters++;
 //    }
 //  }
 //  MITK_INFO << "Final number of clusters: " << m_OutTractograms.size() << " (discarded " << m_DiscardedClusters << " clusters)";
 
 //  int w = 0;
 //  for (auto fib : m_OutTractograms)
 //  {
 //    if (m_OutTractograms.size()>1)
 //    {
 //      fib->SetFiberWeights((float)w/(m_OutTractograms.size()-1));
 //      m_OutCentroids.at(w)->SetFiberWeights((float)w/(m_OutTractograms.size()-1));
 //    }
 //    else
 //    {
 //      fib->SetFiberWeights(1);
 //      m_OutCentroids.at(w)->SetFiberWeights(1);
 //    }
 //    fib->ColorFibersByFiberWeights(false, mitk::LookupTable::JET);
 //    ++w;
 //  }
 
 //  if (no_match.n>0)
 //  {
 //    vtkSmartPointer<vtkFloatArray> weights = vtkSmartPointer<vtkFloatArray>::New();
 //    vtkSmartPointer<vtkPolyData> pTmp = m_Tractogram->GeneratePolyDataByIds(no_match.I, weights);
 //    mitk::FiberBundle::Pointer fib = mitk::FiberBundle::New(pTmp);
 //    fib->SetFiberColors(0, 0, 0);
 //    m_OutFiberIndices.push_back(no_match.I);
 //    m_OutTractograms.push_back(fib);
 //  }
-//}
+}
 
 }
 
 
 
 
diff --git a/Modules/FiberDissection/MachineLearning/mitkStreamlineFeatureExtractor.h b/Modules/FiberDissection/MachineLearning/mitkStreamlineFeatureExtractor.h
index f10e744..da20707 100644
--- a/Modules/FiberDissection/MachineLearning/mitkStreamlineFeatureExtractor.h
+++ b/Modules/FiberDissection/MachineLearning/mitkStreamlineFeatureExtractor.h
@@ -1,72 +1,75 @@
 /*===================================================================
 
 The Medical Imaging Interaction Toolkit (MITK)
 
 Copyright (c) German Cancer Research Center.
 
 All rights reserved.
 
 This software is distributed WITHOUT ANY WARRANTY; without
 even the implied warranty of MERCHANTABILITY or FITNESS FOR
 A PARTICULAR PURPOSE.
 
 See LICENSE.txt or http://www.mitk.org for details.
 
 ===================================================================*/
 #ifndef StreamlineFeatureExtractor_h
 #define StreamlineFeatureExtractor_h
 
+
+#include "MitkFiberDissectionExports.h"
 // MITK
-#include <MitkFiberTrackingExports.h>
 #include <mitkPlanarEllipse.h>
 #include <mitkFiberBundle.h>
-#include <mitkClusteringMetric.h>
 
 // ITK
 #include <itkProcessObject.h>
 
 // VTK
 #include <vtkSmartPointer.h>
 #include <vtkPolyData.h>
 #include <vtkCellArray.h>
 #include <vtkPoints.h>
 #include <vtkPolyLine.h>
 
 namespace mitk{
 
 /**
 * \brief    */
 
-class MITKFIBERDISSECTION_EXPORT StreamlineFeatureExtractor
+class MITKFIBERDISSECTION_EXPORT StreamlineFeatureExtractor      
 {
 public:
 
 
   StreamlineFeatureExtractor();
   ~StreamlineFeatureExtractor();
 
   typedef itk::Image< float, 3 >                              FloatImageType;
   typedef itk::Image< unsigned char, 3 >                      UcharImageType;
 
   void Update(){
     this->GenerateData();
   }
 
+  void SetTractogram(const mitk::FiberBundle::Pointer &Tractogram);
 
 
 protected:
 
   void GenerateData();
   std::vector< vnl_matrix<float> > ResampleFibers(FiberBundle::Pointer tractogram);
+  std::vector<vnl_matrix<float> > CalculateDmdf(std::vector<vnl_matrix<float> > tractogram, std::vector<vnl_matrix<float> > prototypes);
 
 
 
   unsigned int                                m_NumPoints;
   mitk::FiberBundle::Pointer                  m_Tractogram;
-  std::vector<vnl_matrix<float> >             T_prototypes;
+  std::vector<vnl_matrix<float> >             T_Prototypes;
   std::vector<vnl_matrix<float> >             T_Tractogram;
+  std::vector<vnl_matrix<float> >             m_distances;
 
 };
 }
 
 #endif
diff --git a/Modules/FiberDissection/files.cmake b/Modules/FiberDissection/files.cmake
index ee910a5..0ccc13a 100644
--- a/Modules/FiberDissection/files.cmake
+++ b/Modules/FiberDissection/files.cmake
@@ -1,13 +1,23 @@
 set(H_FILES
-  Interactor/mitkStreamlineInteractor.h
+
+    #Interactor
+    Interactor/mitkStreamlineInteractor.h
+
+    #MachineLearning
+    MachineLearning/mitkStreamlineFeatureExtractor.h
 )
 
 set(CPP_FILES
-  Interactor/mitkStreamlineInteractor.cpp
+
+    #Interactor
+    Interactor/mitkStreamlineInteractor.cpp
+
+    #MachineLearning
+    MachineLearning/mitkStreamlineFeatureExtractor.cpp
 )
 
 set(RESOURCE_FILES
   # "Interactions" prefix forced by mitk::StateMachine
   Interactions/Streamline3DStates.xml
   Interactions/Streamline3DConfig.xml
 )
diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.fiberprocessing/src/internal/QmitkInteractiveFiberDissectionView.cpp b/Plugins/org.mitk.gui.qt.diffusionimaging.fiberprocessing/src/internal/QmitkInteractiveFiberDissectionView.cpp
index b8fc6b5..abf8884 100644
--- a/Plugins/org.mitk.gui.qt.diffusionimaging.fiberprocessing/src/internal/QmitkInteractiveFiberDissectionView.cpp
+++ b/Plugins/org.mitk.gui.qt.diffusionimaging.fiberprocessing/src/internal/QmitkInteractiveFiberDissectionView.cpp
@@ -1,574 +1,593 @@
 /*===================================================================
 
 The Medical Imaging Interaction Toolkit (MITK)
 
 Copyright (c) German Cancer Research Center.
 
 All rights reserved.
 
 This software is distributed WITHOUT ANY WARRANTY; without
 even the implied warranty of MERCHANTABILITY or FITNESS FOR
 A PARTICULAR PURPOSE.
 
 See LICENSE.txt or http://www.mitk.org for details.
 
 ===================================================================*/
 
 
 
 // Blueberry
 #include <berryISelectionService.h>
 #include <berryIWorkbenchPart.h>
 #include <berryIWorkbenchWindow.h>
 
 // Qmitk
 #include "QmitkInteractiveFiberDissectionView.h"
 #include <QmitkRenderWindow.h> //Pointset
 #include <QmitkPointListWidget.h> //Pointset
 
 #include <QMessageBox>
 
 #include <mitkNodePredicateProperty.h>
 #include <mitkImageCast.h>
 #include <mitkPointSet.h>
 #include <mitkImageAccessByItk.h>
 #include <mitkDataNodeObject.h>
 #include <mitkTensorImage.h>
-
-#include <mitkInteractionConst.h>
-#include "usModuleRegistry.h"
-//#include <itkFiberCurvatureFilter.h>
-
 #include "mitkNodePredicateDataType.h"
 #include <mitkNodePredicateProperty.h>
 #include <mitkNodePredicateAnd.h>
 #include <mitkNodePredicateNot.h>
 #include <mitkNodePredicateOr.h>
+//#include <mitkStreamlineFeatureExtractor.h>
+
+#include <mitkInteractionConst.h>
+#include "usModuleRegistry.h"
+//#include <itkFiberCurvatureFilter.h>
 
 
 #include <itkResampleImageFilter.h>
 #include <itkGaussianInterpolateImageFunction.h>
 #include <itkImageRegionIteratorWithIndex.h>
 #include <itkTractsToFiberEndingsImageFilter.h>
 #include <itkTractDensityImageFilter.h>
 #include <itkImageRegion.h>
 #include <itkTractsToRgbaImageFilter.h>
 #include <itkFiberExtractionFilter.h>
 
 #include <mitkInteractionEventObserver.h>
 #include <vtkCellPicker.h>
 
 #include <boost/algorithm/string.hpp>
 #include <boost/lexical_cast.hpp>
 
 #include <vnl/vnl_sparse_matrix.h>
 
 const std::string QmitkInteractiveFiberDissectionView::VIEW_ID = "org.mitk.views.interactivefiberdissection";
 const std::string id_DataManager = "org.mitk.views.datamanager";
 using namespace mitk;
 
 QmitkInteractiveFiberDissectionView::QmitkInteractiveFiberDissectionView()
   : QmitkAbstractView()
   , m_Controls( 0 )
   , m_IterationCounter(0)
   , m_StreamlineInteractor(nullptr)
 {
 
 }
 
 // Destructor
 QmitkInteractiveFiberDissectionView::~QmitkInteractiveFiberDissectionView()
 {
   //disable interactor
   if (m_StreamlineInteractor != nullptr)
   {
 //    m_StreamlineInteractor->SetStreamlineNode(nullptr);
     m_StreamlineInteractor->EnableInteraction(false);
   }
 }
 
 
 void QmitkInteractiveFiberDissectionView::CreateQtPartControl( QWidget *parent )
 {
   // build up qt view, unless already done
   if ( !m_Controls )
   {
     // create GUI widgets from the Qt Designer's .ui file
     m_Controls = new Ui::QmitkInteractiveFiberDissectionViewControls;
     m_Controls->setupUi( parent );
     m_Controls->m_selectedPointSetWidget->SetDataStorage(GetDataStorage());//pointset
     m_Controls->m_selectedPointSetWidget->SetNodePredicate(mitk::NodePredicateAnd::New(//pointset
       mitk::TNodePredicateDataType<mitk::PointSet>::New(),//pointset
       mitk::NodePredicateNot::New(mitk::NodePredicateOr::New(//pointset
         mitk::NodePredicateProperty::New("helper object"),//pointset
         mitk::NodePredicateProperty::New("hidden object")))));//pointset
 
     m_Controls->m_selectedPointSetWidget->SetSelectionIsOptional(true);//pointset
     m_Controls->m_selectedPointSetWidget->SetAutoSelectNewNodes(true);//pointset
     m_Controls->m_selectedPointSetWidget->SetEmptyInfo(QString("Please select a point set"));//pointset
     m_Controls->m_selectedPointSetWidget->SetPopUpTitel(QString("Select point set"));//pointsett
 
-    connect(m_Controls->m_ErazorButton, SIGNAL( clicked() ), this, SLOT( RemovefromBundle() ) ); //need
+    connect(m_Controls->m_ErazorButton, SIGNAL(toggled(bool)), this, SLOT( RemovefromBundle(bool) ) ); //need
 
     connect(m_Controls->m_StreamlineCreation, SIGNAL( clicked() ), this, SLOT( CreateStreamline()));
 
     connect(m_Controls->m_AddRandomFibers, SIGNAL( clicked() ), this, SLOT( ExtractRandomFibersFromTractogram() ) ); //need
 
     connect(m_Controls->m_TrainClassifier, SIGNAL( clicked() ), this, SLOT( StartAlgorithm( )));
 
 
 
 
     connect(m_Controls->m_addPointSetPushButton, &QPushButton::clicked,//pointset
       this, &QmitkInteractiveFiberDissectionView::OnAddPointSetClicked);//pointset
     connect(m_Controls->m_selectedPointSetWidget, &QmitkSingleNodeSelectionWidget::CurrentSelectionChanged,//pointset
       this, &QmitkInteractiveFiberDissectionView::OnCurrentSelectionChanged);//pointset
 
 
 
 
     auto renderWindowPart = this->GetRenderWindowPart();//pointset
     if (nullptr != renderWindowPart)//pointset
       this->RenderWindowPartActivated(renderWindowPart);//pointset
     this->OnCurrentSelectionChanged(m_Controls->m_selectedPointSetWidget->GetSelectedNodes());//pointset
 
   }
 
   UpdateGui();
 }
 
 
 void QmitkInteractiveFiberDissectionView::SetFocus()
 {
   m_Controls->toolBoxx->setFocus();
   //m_Controls->m_addPointSetPushButton->setFocus();//pointset
 }
 
 void QmitkInteractiveFiberDissectionView::UpdateGui()
 {
   m_Controls->m_FibLabel->setText("<font color='red'>mandatory</font>");
   m_Controls->m_InputData->setTitle("Please Select Input Data");
 
    // disable alle frames
 
+  m_Controls->m_ErazorButton->setCheckable(true);
   m_Controls->m_ErazorButton->setEnabled(false);
 
 
 
   m_Controls->m_addPointSetPushButton->setEnabled(false);
   m_Controls->m_StreamlineCreation->setEnabled(false);
   m_Controls->m_TrainClassifier->setEnabled(false);
   m_Controls->m_CreatePrediction->setEnabled(false);
   m_Controls->m_CreateUncertantyMap->setEnabled(false);
   m_Controls->m_Numtolabel->setEnabled(false);
   m_Controls->m_addPointSetPushButton->setEnabled(false);
   m_Controls->m_AddRandomFibers->setEnabled(false);
   m_Controls->m_AddUncertainFibers->setEnabled(false);
 
   bool fibSelected = !m_SelectedFB.empty();
   bool multipleFibsSelected = (m_SelectedFB.size()>1);
   bool sthSelected = m_SelectedImageNode.IsNotNull();
   bool psSelected = m_SelectedPS.IsNotNull();
-  bool nfibSelected = !m_newfibersSelectedBundles.empty();
-  bool posSelected = !m_positivSelectedBundles.empty();
-  bool negSelected = !m_negativeSelectedBundles.IsNotNull();
+//  bool nfibSelected = !m_newfibersSelectedBundles.empty();
+//  bool posSelected = !m_positivSelectedBundles.empty();
+  bool nfibSelected = m_newfibersSelectedBundles.IsNotNull();
+//  bool posSelected = !m_positivSelectedBundles.IsNotNull();
+//  bool negSelected = !m_negativeSelectedBundles.IsNotNull();
+    bool posSelected = this->GetDataStorage()->Exists(m_positivSelectedBundles);
+    bool negSelected = this->GetDataStorage()->Exists(m_negativeSelectedBundles);
+
+
 
   // toggle visibility of elements according to selected method
 
 
   // are fiber bundles selected?
   if ( fibSelected )
   {
     m_Controls->m_FibLabel->setText(QString(m_SelectedFB.at(0)->GetName().c_str()));
     m_Controls->m_addPointSetPushButton->setEnabled(true);
     m_Controls->m_AddRandomFibers->setEnabled(true);
 
 
 
     // more than two bundles needed to join/subtract
     if (multipleFibsSelected)
     {
       m_Controls->m_FibLabel->setText("multiple bundles selected");
     }
 
 
 
   }
 
 
   // is image selected
   if (sthSelected)
   {
     m_Controls->m_addPointSetPushButton->setEnabled(true);
   }
 
   if (psSelected)
   {
       m_Controls->m_StreamlineCreation->setEnabled(true);
   }
 
   if (nfibSelected)
   {
-
       m_Controls->m_ErazorButton->setEnabled(true);
   }
 
 
   if (posSelected && negSelected)
   {
+      MITK_INFO << "Enable Algortihm";
       m_Controls->m_TrainClassifier->setEnabled(true);
   }
 
 
 }
 
 void QmitkInteractiveFiberDissectionView::OnEndInteraction()
 {
 
 }
 
 void QmitkInteractiveFiberDissectionView::OnAddPointSetClicked()//pointset
 {
   // ask for the name of the point set
   bool ok = false;
   QString name = QInputDialog::getText(QApplication::activeWindow(),
     tr("Add point set..."), tr("Enter name for the new point set"), QLineEdit::Normal, tr("PointSet").arg(++m_IterationCounter), &ok);
 //  QString name = "PointSet";
   if (!ok || name.isEmpty())
   {
     return;
   }
   mitk::PointSet::Pointer pointSet = mitk::PointSet::New();
   mitk::DataNode::Pointer pointSetNode = mitk::DataNode::New();
   pointSetNode->SetData(pointSet);
   pointSetNode->SetProperty("name", mitk::StringProperty::New(name.toStdString()));
   pointSetNode->SetProperty("opacity", mitk::FloatProperty::New(1));
   pointSetNode->SetColor(1.0, 1.0, 0.0);
   this->GetDataStorage()->Add(pointSetNode, m_SelectedImageNode);
 
 
   m_Controls->m_selectedPointSetWidget->SetCurrentSelectedNode(pointSetNode);
 }
 
 void QmitkInteractiveFiberDissectionView::OnCurrentSelectionChanged(QmitkSingleNodeSelectionWidget::NodeList /*nodes*/)//pointset
 {
 
   m_Controls->m_poinSetListWidget->SetPointSetNode(m_Controls->m_selectedPointSetWidget->GetSelectedNode());
   m_SelectedPS = m_Controls->m_selectedPointSetWidget->GetSelectedNode();
 
   UpdateGui();
 
 }
 
 void QmitkInteractiveFiberDissectionView::OnSelectionChanged(berry::IWorkbenchPart::Pointer /*part*/, const QList<mitk::DataNode::Pointer>& nodes)
 {
 
     m_SelectedFB.clear();
 
     if (nodes.empty() || nodes.front().IsNull())
     {
       m_SelectedImageNode = nullptr;
     }
     else
     {
       m_SelectedImageNode = nodes.front();
     }
 
 
 
     for (auto node: nodes)
     {
       if (dynamic_cast<mitk::Image*>(node->GetData()))
           m_SelectedImage = dynamic_cast<mitk::Image*>(node->GetData());
       else if ( dynamic_cast<mitk::FiberBundle*>(node->GetData()) )
           m_SelectedFB.push_back(node);
     }
 
 
 
     UpdateGui();
 }
 
 void QmitkInteractiveFiberDissectionView::RenderWindowPartActivated(mitk::IRenderWindowPart* renderWindowPart)//pointset
 {
   if (nullptr != m_Controls)
   {
     m_Controls->m_poinSetListWidget->AddSliceNavigationController(renderWindowPart->GetQmitkRenderWindow("axial")->GetSliceNavigationController());
     m_Controls->m_poinSetListWidget->AddSliceNavigationController(renderWindowPart->GetQmitkRenderWindow("sagittal")->GetSliceNavigationController());
     m_Controls->m_poinSetListWidget->AddSliceNavigationController(renderWindowPart->GetQmitkRenderWindow("coronal")->GetSliceNavigationController());
   }
 }
 
 void QmitkInteractiveFiberDissectionView::RenderWindowPartDeactivated(mitk::IRenderWindowPart* renderWindowPart)//pointset
 {
   if (nullptr != m_Controls)
   {
     m_Controls->m_poinSetListWidget->RemoveSliceNavigationController(renderWindowPart->GetQmitkRenderWindow("axial")->GetSliceNavigationController());
     m_Controls->m_poinSetListWidget->RemoveSliceNavigationController(renderWindowPart->GetQmitkRenderWindow("sagittal")->GetSliceNavigationController());
     m_Controls->m_poinSetListWidget->RemoveSliceNavigationController(renderWindowPart->GetQmitkRenderWindow("coronal")->GetSliceNavigationController());
   }
 }
 
 void QmitkInteractiveFiberDissectionView::CreateStreamline()
 {
 
-    if (m_positivSelectedBundles.empty())
+    if (m_positivSelectedBundles.IsNull())
     {
         mitk::DataNode::Pointer node = mitk::DataNode::New();
 
         m_positiveFibersData = vtkSmartPointer<vtkPolyData>::New();
         m_positiveFibersData->SetPoints(vtkSmartPointer<vtkPoints>::New());
         m_positiveFibersData->SetLines(vtkSmartPointer<vtkCellArray>::New());
         m_positiveBundle = mitk::FiberBundle:: New(m_positiveFibersData);
 
         node->SetData( m_positiveBundle );
-        m_positivSelectedBundles.push_back(node);
-        MITK_INFO << m_positivSelectedBundles.size();
-        this->GetDataStorage()->Add(m_positivSelectedBundles.at(0));
+        m_positivSelectedBundles = node;
+        this->GetDataStorage()->Add(m_positivSelectedBundles);
       MITK_INFO << "Create Bundle";
     }
 
-    if (!m_positivSelectedBundles.empty())
+    if (!m_positivSelectedBundles.IsNull())
     {
-        this->GetDataStorage()->Remove(m_positivSelectedBundles.at(m_positivSelectedBundles.size()-1));
+        this->GetDataStorage()->Remove(m_positivSelectedBundles);
         MITK_INFO << "Adding fibers";
     }
 
 
     mitk::PointSet::Pointer pointSet = dynamic_cast<mitk::PointSet *>(m_SelectedPS->GetData());
 
     vnl_matrix<float> streamline;
     streamline.set_size(3, pointSet->GetSize());
     streamline.fill(0.0);
 
 
     mitk::PointSet::PointsIterator begin = pointSet->Begin();
     mitk::PointSet::PointsIterator end = pointSet->End();
     unsigned int i;
     mitk::PointSet::PointsContainer::Iterator it;
 
     for (it = begin, i = 0; it != end; ++it, ++i)
     {
         PointSet::PointType pt = pointSet->GetPoint(it->Index());
         vnl_vector_fixed< float, 3 > candV;
         candV[0]=pt[0]; candV[1]=pt[1]; candV[2]=pt[2];
         streamline.set_column(i, candV);
     }
 
 
 
 
     vtkSmartPointer<vtkPolyData> vNewPolyData = vtkSmartPointer<vtkPolyData>::New();
     vtkSmartPointer<vtkCellArray> vNewLines = vtkSmartPointer<vtkCellArray>::New();
     vtkSmartPointer<vtkPoints> vNewPoints = vtkSmartPointer<vtkPoints>::New();
 
 
 
     unsigned int counter = 0;
     for (unsigned int i=0; i<m_positiveFibersData->GetNumberOfCells(); ++i)
     {
       vtkCell* cell = m_positiveFibersData->GetCell(i);
       auto numPoints = cell->GetNumberOfPoints();
       vtkPoints* points = cell->GetPoints();
 
       vtkSmartPointer<vtkPolyLine> container = vtkSmartPointer<vtkPolyLine>::New();
       for (unsigned int j=0; j<numPoints; ++j)
       {
         double p[3];
         points->GetPoint(j, p);
 
         vtkIdType id = vNewPoints->InsertNextPoint(p);
         container->GetPointIds()->InsertNextId(id);
       }
 
       vNewLines->InsertNextCell(container);
       counter++;
     }
 
       // build Fiber
     vtkSmartPointer<vtkPolyLine> container = vtkSmartPointer<vtkPolyLine>::New();
 
 
       for (unsigned int j=0; j<streamline.cols(); j++)
       {
         double p[3];
         p[0] = streamline.get(0,j);
         p[1] = streamline.get(1,j);
         p[2] = streamline.get(2,j);
 
         vtkIdType id = vNewPoints->InsertNextPoint(p);
         container->GetPointIds()->InsertNextId(id);
       }
       vNewLines->InsertNextCell(container);
 
       vNewPolyData->SetPoints(vNewPoints);
       vNewPolyData->SetLines(vNewLines);
 
       m_positiveFibersData = vtkSmartPointer<vtkPolyData>::New();
       m_positiveFibersData->SetPoints(vtkSmartPointer<vtkPoints>::New());
       m_positiveFibersData->SetLines(vtkSmartPointer<vtkCellArray>::New());
       m_positiveFibersData->SetPoints(vNewPoints);
       m_positiveFibersData->SetLines(vNewLines);
 
       m_positiveBundle = mitk::FiberBundle::New(vNewPolyData);
-      m_positiveBundle->SetTrackVisHeader(dynamic_cast<mitk::Image*>(m_SelectedImageNode->GetData())->GetGeometry());
+//      m_positiveBundle->SetTrackVisHeader(dynamic_cast<mitk::Image*>(m_SelectedImageNode->GetData())->GetGeometry());
       m_positiveBundle->SetFiberColors(0, 255, 0);
 
 
 
 
       mitk::DataNode::Pointer node = mitk::DataNode::New();
       node->SetData(m_positiveBundle);
       node->SetName("+Bundle");
-      m_positivSelectedBundles.push_back(node);
-      MITK_INFO << m_positivSelectedBundles.size();
+      m_positivSelectedBundles= node;
+
 
 
 
       MITK_INFO << "The + Bundle has Streamlines:";
-      auto m_NegStreamline= dynamic_cast<mitk::FiberBundle *>(m_positivSelectedBundles.at(m_positivSelectedBundles.size()-1)->GetData());
+      auto m_NegStreamline= dynamic_cast<mitk::FiberBundle *>(m_positivSelectedBundles->GetData());
       MITK_INFO << m_NegStreamline->GetFiberPolyData()->GetNumberOfCells();
 
-      this->GetDataStorage()->Add(m_positivSelectedBundles.at(m_positivSelectedBundles.size()-1));
+      this->GetDataStorage()->Add(m_positivSelectedBundles);
 
       UpdateGui();
 
 }
 
 void QmitkInteractiveFiberDissectionView::ExtractRandomFibersFromTractogram()
 {
      MITK_INFO << "Number of Fibers to extract from Tractogram: ";
      MITK_INFO << m_Controls->m_NumRandomFibers->value();
-     if (m_newfibersSelectedBundles.empty())
+     if (m_newfibersSelectedBundles.IsNull())
      {
          mitk::DataNode::Pointer node = mitk::DataNode::New();
 
          m_newfibersFibersData = vtkSmartPointer<vtkPolyData>::New();
          m_newfibersFibersData->SetPoints(vtkSmartPointer<vtkPoints>::New());
          m_newfibersFibersData->SetLines(vtkSmartPointer<vtkCellArray>::New());
          m_newfibersBundle = mitk::FiberBundle:: New(m_newfibersFibersData);
 
          node->SetData( m_newfibersBundle );
-         m_newfibersSelectedBundles.push_back(node);
-         MITK_INFO << m_newfibersSelectedBundles.size();
-    //     this->GetDataStorage()->Add(m_newfibersSelectedBundles.at(0));
-    //     UpdateGui();
+         m_newfibersSelectedBundles = node ;
+
        MITK_INFO << "Create Bundle";
      }
 
       mitk::FiberBundle::Pointer fib = dynamic_cast<mitk::FiberBundle*>(m_SelectedFB.at(0)->GetData());
 
-    //   mitk::DataNode::Pointer node = mitk::DataNode::New();
-    //   node ->SetData(pi);
-    //   this->GetDataStorage()->Add(cur_bundle);
-
-
       vtkSmartPointer<vtkPolyData> vNewPolyData = vtkSmartPointer<vtkPolyData>::New();
       vtkSmartPointer<vtkCellArray> vNewLines = vtkSmartPointer<vtkCellArray>::New();
       vtkSmartPointer<vtkPoints> vNewPoints = vtkSmartPointer<vtkPoints>::New();
 
 
       unsigned int counter = 0;
       for ( int i=0; i<m_Controls->m_NumRandomFibers->value(); i++)
       {
         vtkCell* cell = fib->GetFiberPolyData()->GetCell(i);
         auto numPoints = cell->GetNumberOfPoints();
         vtkPoints* points = cell->GetPoints();
 
         vtkSmartPointer<vtkPolyLine> container = vtkSmartPointer<vtkPolyLine>::New();
         for (unsigned int j=0; j<numPoints; j++)
         {
           double p[3];
           points->GetPoint(j, p);
 
           vtkIdType id = vNewPoints->InsertNextPoint(p);
           container->GetPointIds()->InsertNextId(id);
         }
     //    weights->InsertValue(counter, fib->GetFiberWeight(i));
         vNewLines->InsertNextCell(container);
         counter++;
         MITK_INFO << counter;
         MITK_INFO << vNewLines;
 
       }
 
 
       vNewPolyData->SetLines(vNewLines);
       vNewPolyData->SetPoints(vNewPoints);
 
       m_newfibersFibersData = vtkSmartPointer<vtkPolyData>::New();
       m_newfibersFibersData->SetPoints(vtkSmartPointer<vtkPoints>::New());
       m_newfibersFibersData->SetLines(vtkSmartPointer<vtkCellArray>::New());
       m_newfibersFibersData->SetPoints(vNewPoints);
       m_newfibersFibersData->SetLines(vNewLines);
 
       m_newfibersBundle = mitk::FiberBundle::New(vNewPolyData);
       m_newfibersBundle->SetFiberColors(255, 255, 255);
 
       mitk::DataNode::Pointer node = mitk::DataNode::New();
       node->SetData(m_newfibersBundle);
       node->SetName("ToLabel");
-      m_newfibersSelectedBundles.push_back(node);
-      MITK_INFO << m_newfibersSelectedBundles.size();
+      m_newfibersSelectedBundles = node;
 
-      this->GetDataStorage()->Add(m_newfibersSelectedBundles.at(m_newfibersSelectedBundles.size()-1));
+      this->GetDataStorage()->Add(m_newfibersSelectedBundles);
 
     UpdateGui();
 
 
 }
 
-void QmitkInteractiveFiberDissectionView::RemovefromBundle()
+void QmitkInteractiveFiberDissectionView::RemovefromBundle( bool checked )
 {
-    if (m_StreamlineInteractor.IsNull())
+    if (checked)
+    {
+
+        if (m_StreamlineInteractor.IsNull())
+        {
+            this->CreateStreamlineInteractor();
+//            if (m_negativeSelectedBundles.IsNull())
+//            {
+                mitk::FiberBundle::Pointer m_negativeBundle = mitk::FiberBundle::New();
+                mitk::DataNode::Pointer node = mitk::DataNode::New();
+                node->SetName("-Bundle");
+                node->SetData(m_negativeBundle);
+                m_negativeSelectedBundles = node;
+                this->GetDataStorage()->Add(m_negativeSelectedBundles);
+//            }
+
+//            if (m_positivSelectedBundles.IsNull())
+//            {
+
+//                mitk::FiberBundle::Pointer m_positiveBundle = mitk::FiberBundle::New();
+//                mitk::DataNode::Pointer m_positiveSelectedBundles = mitk::DataNode::New();
+//                m_positiveSelectedBundles->SetName("+Bundle");
+//                m_positiveSelectedBundles->SetData(m_positiveBundle);
+//                this->GetDataStorage()->Add(m_positiveSelectedBundles);)
+//            }
+
+            m_StreamlineInteractor->EnableInteraction(true);
+            m_StreamlineInteractor->SetNegativeNode(m_negativeSelectedBundles);
+            m_StreamlineInteractor->SetPositiveNode(m_positivSelectedBundles);
+            m_StreamlineInteractor->SetToLabelNode(m_newfibersSelectedBundles);
+        }
+        else
+        {
+            m_StreamlineInteractor->EnableInteraction(true);
+        }
+    }
+    else
     {
-        this->CreateStreamlineInteractor();
-        mitk::FiberBundle::Pointer m_negativeBundle = mitk::FiberBundle::New();
-        mitk::DataNode::Pointer m_negativeSelectedBundles = mitk::DataNode::New();
-        m_negativeSelectedBundles->SetName("-Bundle");
-        m_negativeSelectedBundles->SetData(m_negativeBundle);
-        this->GetDataStorage()->Add(m_negativeSelectedBundles);
-
-//        if (m_positivSelectedBundles.IsNull())
-//        {
-
-//            mitk::FiberBundle::Pointer m_positiveBundle = mitk::FiberBundle::New();
-//            mitk::DataNode::Pointer m_positiveSelectedBundles = mitk::DataNode::New();
-//            m_positiveSelectedBundles->SetName("-Bundle");
-//            m_positiveSelectedBundles->SetData(m_positiveBundle);
-//            this->GetDataStorage()->Add(m_positiveSelectedBundles);)
-//        }
-
-        m_StreamlineInteractor->EnableInteraction(true);
-        m_StreamlineInteractor->SetNegativeNode(m_negativeSelectedBundles);
-        m_StreamlineInteractor->SetPositiveNode(m_positivSelectedBundles.at(m_positivSelectedBundles.size()-1));
-        m_StreamlineInteractor->SetToLabelNode(m_newfibersSelectedBundles.at(m_newfibersSelectedBundles.size()-1));
+      m_StreamlineInteractor->EnableInteraction(false);
+//      m_StreamlineInteractor = nullptr;
     }
 
 
 
 
 
 
 
 
    UpdateGui();
 }
 
 
 void QmitkInteractiveFiberDissectionView::CreateStreamlineInteractor()
 {
 
     m_StreamlineInteractor = mitk::StreamlineInteractor::New();
 
     m_StreamlineInteractor->LoadStateMachine("Streamline3DStates.xml", us::ModuleRegistry::GetModule("MitkFiberDissection"));
     m_StreamlineInteractor->SetEventConfig("Streamline3DConfig.xml", us::ModuleRegistry::GetModule("MitkFiberDissection"));
 
 //  m_StreamlineInteractor->SetRotationEnabled(rotationEnabled);
 }
 
 
 void QmitkInteractiveFiberDissectionView::StartAlgorithm()
 {
+    std::shared_ptr< mitk::StreamlineFeatureExtractor > clusterer = std::make_shared<mitk::StreamlineFeatureExtractor>();
+    clusterer->SetTractogram(m_positiveBundle);
+    clusterer->Update();
 
+    MITK_INFO << "HI";
 }
diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.fiberprocessing/src/internal/QmitkInteractiveFiberDissectionView.h b/Plugins/org.mitk.gui.qt.diffusionimaging.fiberprocessing/src/internal/QmitkInteractiveFiberDissectionView.h
index a662fe5..cb97dd7 100644
--- a/Plugins/org.mitk.gui.qt.diffusionimaging.fiberprocessing/src/internal/QmitkInteractiveFiberDissectionView.h
+++ b/Plugins/org.mitk.gui.qt.diffusionimaging.fiberprocessing/src/internal/QmitkInteractiveFiberDissectionView.h
@@ -1,140 +1,141 @@
 /*===================================================================
 
 The Medical Imaging Interaction Toolkit (MITK)
 
 Copyright (c) German Cancer Research Center.
 
 All rights reserved.
 
 This software is distributed WITHOUT ANY WARRANTY; without
 even the implied warranty of MERCHANTABILITY or FITNESS FOR
 A PARTICULAR PURPOSE.
 
 See LICENSE.txt or http://www.mitk.org for details.
 
 ===================================================================*/
 
 
 
 #ifndef QmitkInteractiveFiberDissectionView_h
 #define QmitkInteractiveFiberDissectionView_h
 #include "ui_QmitkInteractiveFiberDissectionViewControls.h"
 
 #include <QInputDialog> //Pointset
 #include <QmitkPointListWidget.h>//Pointset
 
 #include <QmitkAbstractView.h>//Pointset
 #include <QmitkSingleNodeSelectionWidget.h>//Pointset
 
 
 #include <mitkFiberBundle.h>
 #include <mitkDataInteractor.h>
 #include <mitkIRenderWindowPartListener.h> //Pointset
 #include <mitkStreamlineInteractor.h>
+#include <mitkStreamlineFeatureExtractor.h>
 
 #include <itkCastImageFilter.h>
 #include <itkVTKImageImport.h>
 #include <itkVTKImageExport.h>
 #include <itkRegionOfInterestImageFilter.h>
 
 #include <vtkLinearExtrusionFilter.h>
 #include <vtkPolyDataToImageStencil.h>
 #include <vtkSelectEnclosedPoints.h>
 #include <vtkImageImport.h>
 #include <vtkImageExport.h>
 #include <vtkImageStencil.h>
 #include <vtkSmartPointer.h>
 #include <vtkSelection.h>
 #include <vtkSelectionNode.h>
 #include <vtkExtractSelectedThresholds.h>
 #include <vtkFloatArray.h>
 #include <vtkCellPicker.h>
 
 /*!
 \brief View to process fiber bundles. Supplies methods to extract fibers from the bundle, fiber resampling, mirroring, join and subtract bundles and much more.
 */
 class QmitkInteractiveFiberDissectionView : public QmitkAbstractView, public mitk::IRenderWindowPartListener
 {
   // this is needed for all Qt objects that should have a Qt meta-object
   // (everything that derives from QObject and wants to have signal/slots)
   Q_OBJECT
 
 public:
 
   typedef itk::Image< unsigned char, 3 >    ItkUCharImageType;
   typedef itk::Image< float, 3 >            ItkFloatImageType;
 
   static const std::string VIEW_ID;
 
   QmitkInteractiveFiberDissectionView();
   virtual ~QmitkInteractiveFiberDissectionView();
 
   virtual void CreateQtPartControl(QWidget *parent) override;
 
   ///
   /// Sets the focus to an internal widget.
   ///
   virtual void SetFocus() override;
 
 protected slots:
 
   void RenderWindowPartActivated(mitk::IRenderWindowPart* renderWindowPart) override; //Pointset
   void RenderWindowPartDeactivated(mitk::IRenderWindowPart* renderWindowPart) override; //Pointset
   void OnAddPointSetClicked();//Pointset
   void CreateStreamline();
-  void RemovefromBundle();
+  void RemovefromBundle( bool checked );
   void ExtractRandomFibersFromTractogram();
   void StartAlgorithm();
 
 
 
 
   void UpdateGui();     ///< update button activity etc. dpending on current datamanager selection
 
 
 
 
 protected:
   void OnCurrentSelectionChanged(QmitkSingleNodeSelectionWidget::NodeList nodes);//Pointset
 
 
   virtual void OnSelectionChanged(berry::IWorkbenchPart::Pointer part, const QList<mitk::DataNode::Pointer>& nodes) override;
 
   void OnEndInteraction();
   void CreateStreamlineInteractor();
 
 
   Ui::QmitkInteractiveFiberDissectionViewControls* m_Controls;
 
 
 
   int m_IterationCounter;                                      ///< used for data node naming
 
 
   std::vector<mitk::DataNode::Pointer>  m_SelectedFB;       ///< selected fiber bundle nodes
 
   mitk::Image::Pointer                  m_SelectedImage;
   mitk::DataNode::Pointer               m_SelectedPS;
   mitk::DataNode::Pointer               m_SelectedImageNode;
   mitk::FiberBundle::Pointer            m_positiveBundle;
   mitk::FiberBundle::Pointer            m_newfibersBundle;
   mitk::FiberBundle::Pointer            m_negativeBundle;
 
 
-  std::vector< mitk::DataNode::Pointer> m_positivSelectedBundles;
-  std::vector< mitk::DataNode::Pointer> m_newfibersSelectedBundles;
-  mitk::DataNode::Pointer m_negativeSelectedBundles;
+  mitk::DataNode::Pointer               m_positivSelectedBundles;
+  mitk::DataNode::Pointer               m_newfibersSelectedBundles;
+  mitk::DataNode::Pointer               m_negativeSelectedBundles;
 
   vtkSmartPointer<vtkPolyData>          m_positiveFibersData;
   vtkSmartPointer<vtkPolyData>          m_newfibersFibersData;
 
   vtkSmartPointer<vtkCellPicker>        m_picker1;
   mitk::StreamlineInteractor::Pointer   m_StreamlineInteractor;
 
 
 };
 
 
 
 #endif // _QMITKFIBERTRACKINGVIEW_H_INCLUDED
 
diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.fiberprocessing/src/internal/QmitkInteractiveFiberDissectionViewControls.ui b/Plugins/org.mitk.gui.qt.diffusionimaging.fiberprocessing/src/internal/QmitkInteractiveFiberDissectionViewControls.ui
index 671a229..55eac34 100644
--- a/Plugins/org.mitk.gui.qt.diffusionimaging.fiberprocessing/src/internal/QmitkInteractiveFiberDissectionViewControls.ui
+++ b/Plugins/org.mitk.gui.qt.diffusionimaging.fiberprocessing/src/internal/QmitkInteractiveFiberDissectionViewControls.ui
@@ -1,631 +1,631 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <ui version="4.0">
  <class>QmitkInteractiveFiberDissectionViewControls</class>
  <widget class="QWidget" name="QmitkInteractiveFiberDissectionViewControls">
   <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
     <width>417</width>
     <height>711</height>
    </rect>
   </property>
   <property name="windowTitle">
    <string>Form</string>
   </property>
   <property name="styleSheet">
    <string>QCommandLinkButton:disabled {
   border: none;
 }
 
 QGroupBox {
   background-color: transparent;
 }</string>
   </property>
   <layout class="QGridLayout" name="gridLayout_3">
    <property name="leftMargin">
     <number>9</number>
    </property>
    <property name="topMargin">
     <number>9</number>
    </property>
    <property name="rightMargin">
     <number>9</number>
    </property>
    <property name="bottomMargin">
     <number>9</number>
    </property>
    <item row="0" column="0">
     <widget class="QGroupBox" name="m_InputData">
      <property name="title">
       <string>Please Select Input Data</string>
      </property>
      <layout class="QGridLayout" name="gridLayout_9">
       <property name="leftMargin">
        <number>6</number>
       </property>
       <property name="topMargin">
        <number>6</number>
       </property>
       <property name="rightMargin">
        <number>6</number>
       </property>
       <property name="bottomMargin">
        <number>6</number>
       </property>
       <item row="0" column="0">
        <widget class="QLabel" name="label_2">
         <property name="toolTip">
          <string>Input DTI</string>
         </property>
         <property name="text">
          <string>Fiber Bundle:</string>
         </property>
        </widget>
       </item>
       <item row="0" column="1">
        <widget class="QLabel" name="m_FibLabel">
         <property name="text">
          <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; color:#ff0000;&quot;&gt;mandatory&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
         </property>
         <property name="wordWrap">
          <bool>true</bool>
         </property>
        </widget>
       </item>
      </layout>
     </widget>
    </item>
    <item row="1" column="0">
     <widget class="QToolBox" name="toolBoxx">
      <property name="enabled">
       <bool>true</bool>
      </property>
      <property name="font">
       <font>
        <bold>true</bold>
       </font>
      </property>
      <property name="toolTip">
       <string>Label Fibers</string>
      </property>
      <property name="frameShape">
       <enum>QFrame::NoFrame</enum>
      </property>
      <property name="currentIndex">
-      <number>0</number>
+      <number>1</number>
      </property>
      <property name="tabSpacing">
       <number>6</number>
      </property>
      <widget class="QWidget" name="page_3">
       <property name="geometry">
        <rect>
         <x>0</x>
         <y>0</y>
         <width>399</width>
         <height>492</height>
        </rect>
       </property>
       <attribute name="label">
        <string>Fiber Creation</string>
       </attribute>
       <layout class="QGridLayout" name="gridLayout_7">
        <item row="0" column="0">
         <widget class="QFrame" name="frame">
          <property name="frameShape">
           <enum>QFrame::StyledPanel</enum>
          </property>
          <property name="frameShadow">
           <enum>QFrame::Raised</enum>
          </property>
          <layout class="QGridLayout" name="gridLayout_11">
           <item row="0" column="0">
            <widget class="QLabel" name="m_selectedPointSetLabel">
             <property name="text">
              <string>Selected Streamline Pointset</string>
             </property>
            </widget>
           </item>
           <item row="2" column="1">
            <spacer name="horizontalSpacer_14">
             <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="4" column="0" colspan="2">
            <widget class="QGroupBox" name="groupBox">
             <property name="title">
              <string>Streamline Points</string>
             </property>
             <layout class="QGridLayout" name="gridLayout_10">
              <item row="0" column="0">
               <widget class="QmitkPointListWidget" name="m_poinSetListWidget" native="true"/>
              </item>
              <item row="1" column="0">
               <spacer name="verticalSpacer_7">
                <property name="orientation">
                 <enum>Qt::Vertical</enum>
                </property>
                <property name="sizeHint" stdset="0">
                 <size>
                  <width>20</width>
                  <height>40</height>
                 </size>
                </property>
               </spacer>
              </item>
             </layout>
            </widget>
           </item>
           <item row="1" column="1">
            <spacer name="horizontalSpacer_13">
             <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="0" column="1">
            <spacer name="horizontalSpacer_12">
             <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="2" column="0">
            <widget class="QPushButton" name="m_addPointSetPushButton">
             <property name="text">
              <string>Add new Streamline Pointset</string>
             </property>
            </widget>
           </item>
           <item row="1" column="0">
            <widget class="QmitkSingleNodeSelectionWidget" name="m_selectedPointSetWidget" native="true">
             <property name="sizePolicy">
              <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
               <horstretch>0</horstretch>
               <verstretch>0</verstretch>
              </sizepolicy>
             </property>
             <property name="minimumSize">
              <size>
               <width>0</width>
               <height>40</height>
              </size>
             </property>
            </widget>
           </item>
           <item row="6" column="0">
            <spacer name="verticalSpacer_3">
             <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="7" column="0">
            <widget class="QPushButton" name="m_StreamlineCreation">
             <property name="text">
              <string>Create Streamline</string>
             </property>
            </widget>
           </item>
          </layout>
         </widget>
        </item>
       </layout>
      </widget>
      <widget class="QWidget" name="page_2">
       <property name="enabled">
        <bool>true</bool>
       </property>
       <property name="geometry">
        <rect>
         <x>0</x>
         <y>0</y>
         <width>399</width>
         <height>492</height>
        </rect>
       </property>
       <property name="accessibleName">
        <string/>
       </property>
       <attribute name="label">
        <string>Fiber Labelling</string>
       </attribute>
       <attribute name="toolTip">
        <string>Dissect/Eraze Fibers by Erasion and Highlighting</string>
       </attribute>
       <layout class="QGridLayout" name="gridLayout_13">
        <item row="4" column="0">
         <spacer name="verticalSpacer_4">
          <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="1" column="0">
         <widget class="QFrame" name="m_LabelFrame">
          <property name="enabled">
           <bool>true</bool>
          </property>
          <property name="cursor">
           <cursorShape>ArrowCursor</cursorShape>
          </property>
          <property name="frameShape">
           <enum>QFrame::NoFrame</enum>
          </property>
          <property name="frameShadow">
           <enum>QFrame::Raised</enum>
          </property>
          <layout class="QGridLayout" name="gridLayout_4">
           <item row="0" column="0">
            <widget class="QLabel" name="label">
             <property name="text">
              <string>Label individual Streamlines</string>
             </property>
            </widget>
           </item>
          </layout>
         </widget>
        </item>
        <item row="2" column="0">
         <widget class="QLabel" name="label_3">
          <property name="text">
           <string>Streamlines to be labeled</string>
          </property>
         </widget>
        </item>
        <item row="3" column="0">
         <widget class="QFrame" name="m_ExtractionToolsFrame">
          <property name="frameShape">
           <enum>QFrame::StyledPanel</enum>
          </property>
          <property name="frameShadow">
           <enum>QFrame::Raised</enum>
          </property>
          <layout class="QGridLayout" name="gridLayout_2">
           <item row="5" column="2">
            <widget class="QLabel" name="label_4">
             <property name="text">
              <string>Label Streamlines</string>
             </property>
            </widget>
           </item>
           <item row="5" column="3">
            <widget class="QPushButton" name="m_ErazorButton">
             <property name="maximumSize">
              <size>
               <width>30</width>
               <height>30</height>
              </size>
             </property>
             <property name="text">
              <string/>
             </property>
             <property name="icon">
              <iconset>
               <normaloff>:/org.mitk.gui.qt.diffusionimaging.fiberprocessing/resources/eraze.png</normaloff>:/org.mitk.gui.qt.diffusionimaging.fiberprocessing/resources/eraze.png</iconset>
             </property>
             <property name="iconSize">
              <size>
               <width>32</width>
               <height>32</height>
              </size>
             </property>
             <property name="flat">
              <bool>true</bool>
             </property>
            </widget>
           </item>
           <item row="6" column="2">
            <widget class="QLabel" name="label_6">
             <property name="text">
              <string>Reject: Rightclick + shift</string>
             </property>
            </widget>
           </item>
           <item row="2" column="7" colspan="3">
            <spacer name="horizontalSpacer_2">
             <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="2" column="2" colspan="2">
            <widget class="QLabel" name="label_7">
             <property name="text">
              <string>Random Streamlines</string>
             </property>
            </widget>
           </item>
           <item row="7" column="3" colspan="5">
            <spacer name="horizontalSpacer_8">
             <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="5" column="4" colspan="5">
            <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="6" column="3" colspan="6">
            <spacer name="horizontalSpacer_3">
             <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="2" column="6">
            <widget class="QPushButton" name="m_AddRandomFibers">
             <property name="text">
              <string>Add</string>
             </property>
            </widget>
           </item>
           <item row="7" column="2">
            <widget class="QLabel" name="label_8">
             <property name="text">
              <string>Accept: Rightclick + alt</string>
             </property>
            </widget>
           </item>
           <item row="8" column="2">
            <spacer name="verticalSpacer_2">
             <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="4">
            <widget class="QSpinBox" name="m_NumRandomFibers">
             <property name="minimum">
-             <number>10</number>
+             <number>1</number>
             </property>
            </widget>
           </item>
          </layout>
         </widget>
        </item>
       </layout>
      </widget>
      <widget class="QWidget" name="page_4">
       <property name="geometry">
        <rect>
         <x>0</x>
         <y>0</y>
         <width>399</width>
         <height>492</height>
        </rect>
       </property>
       <attribute name="label">
        <string>Active Learning</string>
       </attribute>
       <widget class="QFrame" name="frame_2">
        <property name="geometry">
         <rect>
          <x>9</x>
          <y>9</y>
          <width>341</width>
          <height>391</height>
         </rect>
        </property>
        <property name="frameShape">
         <enum>QFrame::StyledPanel</enum>
        </property>
        <property name="frameShadow">
         <enum>QFrame::Raised</enum>
        </property>
        <layout class="QGridLayout" name="gridLayout_6">
         <item row="2" column="3">
          <spacer name="horizontalSpacer_7">
           <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="0" column="0" colspan="3">
          <widget class="QPushButton" name="m_TrainClassifier">
           <property name="text">
            <string>Train Classifier</string>
           </property>
          </widget>
         </item>
         <item row="3" column="1">
          <widget class="QSpinBox" name="m_Numtolabel">
           <property name="minimum">
            <number>5</number>
           </property>
           <property name="value">
            <number>10</number>
           </property>
          </widget>
         </item>
         <item row="1" column="0" colspan="3">
          <widget class="QPushButton" name="m_CreatePrediction">
           <property name="text">
            <string>Create Prediction</string>
           </property>
          </widget>
         </item>
         <item row="6" column="2">
          <spacer name="verticalSpacer_6">
           <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="1" column="3">
          <spacer name="horizontalSpacer_5">
           <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="2" column="0" colspan="3">
          <widget class="QPushButton" name="m_CreateUncertantyMap">
           <property name="text">
            <string>Create Uncertanty Map</string>
           </property>
          </widget>
         </item>
         <item row="3" column="2">
          <widget class="QPushButton" name="m_AddUncertainFibers">
           <property name="text">
            <string>Add </string>
           </property>
          </widget>
         </item>
         <item row="3" column="0">
          <widget class="QLabel" name="label_5">
           <property name="text">
            <string>To be labeled</string>
           </property>
          </widget>
         </item>
         <item row="3" column="3">
          <spacer name="horizontalSpacer_6">
           <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="0" column="3">
          <spacer name="horizontalSpacer_4">
           <property name="orientation">
            <enum>Qt::Horizontal</enum>
           </property>
           <property name="sizeHint" stdset="0">
            <size>
             <width>84</width>
             <height>22</height>
            </size>
           </property>
          </spacer>
         </item>
        </layout>
       </widget>
      </widget>
     </widget>
    </item>
    <item row="2" column="0" rowspan="2">
     <spacer name="verticalSpacer">
      <property name="orientation">
       <enum>Qt::Vertical</enum>
      </property>
      <property name="sizeType">
       <enum>QSizePolicy::Fixed</enum>
      </property>
      <property name="sizeHint" stdset="0">
       <size>
        <width>20</width>
        <height>40</height>
       </size>
      </property>
     </spacer>
    </item>
   </layout>
  </widget>
  <customwidgets>
   <customwidget>
    <class>QmitkSingleNodeSelectionWidget</class>
    <extends>QWidget</extends>
    <header location="global">QmitkSingleNodeSelectionWidget.h</header>
   </customwidget>
   <customwidget>
    <class>QmitkPointListWidget</class>
    <extends>QWidget</extends>
    <header location="global">QmitkPointListWidget.h</header>
   </customwidget>
  </customwidgets>
  <resources/>
  <connections/>
 </ui>