diff --git a/Modules/DiffusionImaging/FiberTracking/Algorithms/itkTractsToDWIImageFilter.cpp b/Modules/DiffusionImaging/FiberTracking/Algorithms/itkTractsToDWIImageFilter.cpp
index f4f2f98986..00e2761710 100644
--- a/Modules/DiffusionImaging/FiberTracking/Algorithms/itkTractsToDWIImageFilter.cpp
+++ b/Modules/DiffusionImaging/FiberTracking/Algorithms/itkTractsToDWIImageFilter.cpp
@@ -1,697 +1,697 @@
 /*===================================================================
 
 The Medical Imaging Interaction Toolkit (MITK)
 
 Copyright (c) German Cancer Research Center,
 Division of Medical and Biological Informatics.
 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 "itkTractsToDWIImageFilter.h"
 #include <boost/progress.hpp>
 #include <vtkSmartPointer.h>
 #include <vtkPolyData.h>
 #include <vtkCellArray.h>
 #include <vtkPoints.h>
 #include <vtkPolyLine.h>
 #include <itkImageRegionIteratorWithIndex.h>
 #include <mitkGibbsRingingArtifact.h>
 #include <itkResampleImageFilter.h>
 #include <itkNearestNeighborInterpolateImageFunction.h>
 #include <itkBSplineInterpolateImageFunction.h>
 #include <itkCastImageFilter.h>
 #include <itkImageFileWriter.h>
 #include <itkRescaleIntensityImageFilter.h>
 #include <itkWindowedSincInterpolateImageFunction.h>
 #include <itkResampleDwiImageFilter.h>
 #include <itkKspaceImageFilter.h>
 #include <itkDftImageFilter.h>
 
 namespace itk
 {
 TractsToDWIImageFilter::TractsToDWIImageFilter()
     : m_CircleDummy(false)
     , m_VolumeAccuracy(10)
     , m_Upsampling(1)
     , m_NumberOfRepetitions(1)
     , m_EnforcePureFiberVoxels(false)
     , m_InterpolationShrink(10)
     , m_FiberRadius(20)
     , m_SignalScale(300)
     , m_kOffset(0)
     , m_tLine(1)
     , m_UseInterpolation(false)
 {
     m_Spacing.Fill(2.5); m_Origin.Fill(0.0);
     m_DirectionMatrix.SetIdentity();
     m_ImageRegion.SetSize(0, 10);
     m_ImageRegion.SetSize(1, 10);
     m_ImageRegion.SetSize(2, 10);
 }
 
 TractsToDWIImageFilter::~TractsToDWIImageFilter()
 {
 
 }
 
 std::vector< TractsToDWIImageFilter::DoubleDwiType::Pointer > TractsToDWIImageFilter::DoKspaceStuff( std::vector< DoubleDwiType::Pointer >& images )
 {
     // create slice object
     SliceType::Pointer slice = SliceType::New();
     ImageRegion<2> region;
     region.SetSize(0, m_UpsampledImageRegion.GetSize()[0]);
     region.SetSize(1, m_UpsampledImageRegion.GetSize()[1]);
     slice->SetLargestPossibleRegion( region );
     slice->SetBufferedRegion( region );
     slice->SetRequestedRegion( region );
     slice->Allocate();
 
     // frequency map slice
     SliceType::Pointer fMap = NULL;
     if (m_FrequencyMap.IsNotNull())
     {
         fMap = SliceType::New();
         ImageRegion<2> region;
         region.SetSize(0, m_UpsampledImageRegion.GetSize()[0]);
         region.SetSize(1, m_UpsampledImageRegion.GetSize()[1]);
         fMap->SetLargestPossibleRegion( region );
         fMap->SetBufferedRegion( region );
         fMap->SetRequestedRegion( region );
         fMap->Allocate();
     }
 
     boost::progress_display disp(images.size()*images[0]->GetVectorLength()*images[0]->GetLargestPossibleRegion().GetSize(2));
     std::vector< DoubleDwiType::Pointer > outImages;
     for (int i=0; i<images.size(); i++)
     {
         DoubleDwiType::Pointer image = images.at(i);
         DoubleDwiType::Pointer newImage = DoubleDwiType::New();
         newImage->SetSpacing( m_Spacing );
         newImage->SetOrigin( m_Origin );
         newImage->SetDirection( m_DirectionMatrix );
         newImage->SetLargestPossibleRegion( m_ImageRegion );
         newImage->SetBufferedRegion( m_ImageRegion );
         newImage->SetRequestedRegion( m_ImageRegion );
         newImage->SetVectorLength( image->GetVectorLength() );
         newImage->Allocate();
 
         DiffusionSignalModel<double>* signalModel;
         if (i<m_FiberModels.size())
             signalModel = m_FiberModels.at(i);
         else
             signalModel = m_NonFiberModels.at(i-m_FiberModels.size());
 
         for (int g=0; g<image->GetVectorLength(); g++)
             for (int z=0; z<image->GetLargestPossibleRegion().GetSize(2); z++)
             {
                 ++disp;
 
                 // extract slice from channel g
                 for (int y=0; y<image->GetLargestPossibleRegion().GetSize(1); y++)
                     for (int x=0; x<image->GetLargestPossibleRegion().GetSize(0); x++)
                     {
                         SliceType::IndexType index2D;
                         index2D[0]=x; index2D[1]=y;
                         DoubleDwiType::IndexType index3D;
                         index3D[0]=x; index3D[1]=y; index3D[2]=z;
 
                         SliceType::PixelType pix2D = image->GetPixel(index3D)[g];
                         slice->SetPixel(index2D, pix2D);
 
                         if (fMap.IsNotNull())
                             fMap->SetPixel(index2D, m_FrequencyMap->GetPixel(index3D));
                     }
 
                 // inverse fourier transform slice
                 ComplexSliceType::Pointer fSlice;
                 itk::KspaceImageFilter< SliceType::PixelType >::Pointer idft = itk::KspaceImageFilter< SliceType::PixelType >::New();
                 idft->SetInput(slice);
                 idft->SetkOffset(m_kOffset);
                 idft->SettLine(m_tLine);
                 idft->SetFrequencyMap(fMap);
                 idft->Update();
 
                 fSlice = idft->GetOutput();
                 fSlice = RearrangeSlice(fSlice);
 
                 // add artifacts
                 for (int a=0; a<m_KspaceArtifacts.size(); a++)
                 {
                     m_KspaceArtifacts.at(a)->SetT2(signalModel->GetT2());
                     fSlice = m_KspaceArtifacts.at(a)->AddArtifact(fSlice);
                 }
 
                 // save k-space slice of s0 image
                 if (g==m_FiberModels.at(0)->GetFirstBaselineIndex())
                     for (int y=0; y<fSlice->GetLargestPossibleRegion().GetSize(1); y++)
                         for (int x=0; x<fSlice->GetLargestPossibleRegion().GetSize(0); x++)
                         {
                             DoubleDwiType::IndexType index3D;
                             index3D[0]=x; index3D[1]=y; index3D[2]=z;
                             SliceType::IndexType index2D;
                             index2D[0]=x; index2D[1]=y;
                             double kpix = sqrt(fSlice->GetPixel(index2D).real()*fSlice->GetPixel(index2D).real()+fSlice->GetPixel(index2D).imag()*fSlice->GetPixel(index2D).imag());
                             m_KspaceImage->SetPixel(index3D, m_KspaceImage->GetPixel(index3D)+kpix);
                         }
 
                 // fourier transform slice
                 SliceType::Pointer newSlice;
                 itk::DftImageFilter< SliceType::PixelType >::Pointer dft = itk::DftImageFilter< SliceType::PixelType >::New();
                 dft->SetInput(fSlice);
                 dft->Update();
                 newSlice = dft->GetOutput();
 
                 // put slice back into channel g
                 for (int y=0; y<fSlice->GetLargestPossibleRegion().GetSize(1); y++)
                     for (int x=0; x<fSlice->GetLargestPossibleRegion().GetSize(0); x++)
                     {
                         DoubleDwiType::IndexType index3D;
                         index3D[0]=x; index3D[1]=y; index3D[2]=z;
                         DoubleDwiType::PixelType pix3D = newImage->GetPixel(index3D);
                         SliceType::IndexType index2D;
                         index2D[0]=x; index2D[1]=y;
 
                         pix3D[g] = newSlice->GetPixel(index2D);
                         newImage->SetPixel(index3D, pix3D);
                     }
             }
         outImages.push_back(newImage);
     }
     return outImages;
 }
 
 TractsToDWIImageFilter::ComplexSliceType::Pointer TractsToDWIImageFilter::RearrangeSlice(ComplexSliceType::Pointer slice)
 {
     ImageRegion<2> region = slice->GetLargestPossibleRegion();
     ComplexSliceType::Pointer rearrangedSlice = ComplexSliceType::New();
     rearrangedSlice->SetLargestPossibleRegion( region );
     rearrangedSlice->SetBufferedRegion( region );
     rearrangedSlice->SetRequestedRegion( region );
     rearrangedSlice->Allocate();
 
     int xHalf = region.GetSize(0)/2;
     int yHalf = region.GetSize(1)/2;
 
     for (int y=0; y<region.GetSize(1); y++)
         for (int x=0; x<region.GetSize(0); x++)
         {
             SliceType::IndexType idx;
             idx[0]=x; idx[1]=y;
             vcl_complex< double > pix = slice->GetPixel(idx);
 
             if( idx[0] <  xHalf )
                 idx[0] = idx[0] + xHalf;
             else
                 idx[0] = idx[0] - xHalf;
 
             if( idx[1] <  yHalf )
                 idx[1] = idx[1] + yHalf;
             else
                 idx[1] = idx[1] - yHalf;
 
             rearrangedSlice->SetPixel(idx, pix);
         }
 
     return rearrangedSlice;
 }
 
 void TractsToDWIImageFilter::GenerateData()
 {
     // check input data
     if (m_FiberBundle.IsNull())
         itkExceptionMacro("Input fiber bundle is NULL!");
 
     int numFibers = m_FiberBundle->GetNumFibers();
     if (numFibers<=0)
         itkExceptionMacro("Input fiber bundle contains no fibers!");
 
     if (m_FiberModels.empty())
         itkExceptionMacro("No diffusion model for fiber compartments defined!");
 
     if (m_NonFiberModels.empty())
         itkExceptionMacro("No diffusion model for non-fiber compartments defined!");
 
     int baselineIndex = m_FiberModels[0]->GetFirstBaselineIndex();
     if (baselineIndex<0)
         itkExceptionMacro("No baseline index found!");
 
     // determine k-space undersampling
     for (int i=0; i<m_KspaceArtifacts.size(); i++)
         if ( dynamic_cast<mitk::GibbsRingingArtifact<double>*>(m_KspaceArtifacts.at(i)) )
             m_Upsampling = dynamic_cast<mitk::GibbsRingingArtifact<double>*>(m_KspaceArtifacts.at(i))->GetKspaceCropping();
     if (m_Upsampling<1)
         m_Upsampling = 1;
 
     if (m_TissueMask.IsNotNull())
     {
         // use input tissue mask
         m_Spacing = m_TissueMask->GetSpacing();
         m_Origin = m_TissueMask->GetOrigin();
         m_DirectionMatrix = m_TissueMask->GetDirection();
         m_ImageRegion = m_TissueMask->GetLargestPossibleRegion();
 
         if (m_Upsampling>1)
         {
             ImageRegion<3> region = m_ImageRegion;
             region.SetSize(0, m_ImageRegion.GetSize(0)*m_Upsampling);
             region.SetSize(1, m_ImageRegion.GetSize(1)*m_Upsampling);
             itk::Vector<double> spacing = m_Spacing;
             spacing[0] /= m_Upsampling;
             spacing[1] /= m_Upsampling;
             itk::RescaleIntensityImageFilter<ItkUcharImgType,ItkUcharImgType>::Pointer rescaler = itk::RescaleIntensityImageFilter<ItkUcharImgType,ItkUcharImgType>::New();
             rescaler->SetInput(0,m_TissueMask);
             rescaler->SetOutputMaximum(100);
             rescaler->SetOutputMinimum(0);
             rescaler->Update();
 
             itk::ResampleImageFilter<ItkUcharImgType, ItkUcharImgType>::Pointer resampler = itk::ResampleImageFilter<ItkUcharImgType, ItkUcharImgType>::New();
             resampler->SetInput(rescaler->GetOutput());
             resampler->SetOutputParametersFromImage(m_TissueMask);
             resampler->SetSize(region.GetSize());
             resampler->SetOutputSpacing(spacing);
             resampler->Update();
             m_TissueMask = resampler->GetOutput();
         }
         MITK_INFO << "Using tissue mask";
     }
 
     // initialize output dwi image
     OutputImageType::Pointer outImage = OutputImageType::New();
     outImage->SetSpacing( m_Spacing );
     outImage->SetOrigin( m_Origin );
     outImage->SetDirection( m_DirectionMatrix );
     outImage->SetLargestPossibleRegion( m_ImageRegion );
     outImage->SetBufferedRegion( m_ImageRegion );
     outImage->SetRequestedRegion( m_ImageRegion );
     outImage->SetVectorLength( m_FiberModels[0]->GetNumGradients() );
     outImage->Allocate();
     OutputImageType::PixelType temp;
     temp.SetSize(m_FiberModels[0]->GetNumGradients());
     temp.Fill(0.0);
     outImage->FillBuffer(temp);
 
     // is input slize size a power of two?
     int x=m_ImageRegion.GetSize(0); int y=m_ImageRegion.GetSize(1);
     if ( x%2 == 1 )
         x += 1;
     if ( y%2 == 1 )
         y += 1;
 
     // if not, adjust size and dimension (needed for FFT); zero-padding
     if (x!=m_ImageRegion.GetSize(0))
     {
         MITK_INFO << "Adjusting image width: " << m_ImageRegion.GetSize(0) << " --> " << x << " --> " << x*m_Upsampling;
         m_ImageRegion.SetSize(0, x);
     }
     if (y!=m_ImageRegion.GetSize(1))
     {
         MITK_INFO << "Adjusting image height: " << m_ImageRegion.GetSize(1) << " --> " << y << " --> " << y*m_Upsampling;
         m_ImageRegion.SetSize(1, y);
     }
 
     // initialize k-space image
     m_KspaceImage = ItkDoubleImgType::New();
     m_KspaceImage->SetSpacing( m_Spacing );
     m_KspaceImage->SetOrigin( m_Origin );
     m_KspaceImage->SetDirection( m_DirectionMatrix );
     m_KspaceImage->SetLargestPossibleRegion( m_ImageRegion );
     m_KspaceImage->SetBufferedRegion( m_ImageRegion );
     m_KspaceImage->SetRequestedRegion( m_ImageRegion );
     m_KspaceImage->Allocate();
     m_KspaceImage->FillBuffer(0);
 
     // apply undersampling to image parameters
     m_UpsampledSpacing = m_Spacing;
     m_UpsampledImageRegion = m_ImageRegion;
     m_UpsampledSpacing[0] /= m_Upsampling;
     m_UpsampledSpacing[1] /= m_Upsampling;
     m_UpsampledImageRegion.SetSize(0, m_ImageRegion.GetSize()[0]*m_Upsampling);
     m_UpsampledImageRegion.SetSize(1, m_ImageRegion.GetSize()[1]*m_Upsampling);
 
     // everything from here on is using the upsampled image parameters!!!
     if (m_TissueMask.IsNull())
     {
         m_TissueMask = ItkUcharImgType::New();
         m_TissueMask->SetSpacing( m_UpsampledSpacing );
         m_TissueMask->SetOrigin( m_Origin );
         m_TissueMask->SetDirection( m_DirectionMatrix );
         m_TissueMask->SetLargestPossibleRegion( m_UpsampledImageRegion );
         m_TissueMask->SetBufferedRegion( m_UpsampledImageRegion );
         m_TissueMask->SetRequestedRegion( m_UpsampledImageRegion );
         m_TissueMask->Allocate();
         m_TissueMask->FillBuffer(1);
     }
 
     // resample frequency map
     if (m_FrequencyMap.IsNotNull())
     {
         itk::ResampleImageFilter<ItkDoubleImgType, ItkDoubleImgType>::Pointer resampler = itk::ResampleImageFilter<ItkDoubleImgType, ItkDoubleImgType>::New();
         resampler->SetInput(m_FrequencyMap);
         resampler->SetOutputParametersFromImage(m_FrequencyMap);
         resampler->SetSize(m_UpsampledImageRegion.GetSize());
         resampler->SetOutputSpacing(m_UpsampledSpacing);
         resampler->Update();
         m_FrequencyMap = resampler->GetOutput();
     }
 
     // initialize volume fraction images
     m_VolumeFractions.clear();
     for (int i=0; i<m_FiberModels.size()+m_NonFiberModels.size(); i++)
     {
         ItkDoubleImgType::Pointer tempimg = ItkDoubleImgType::New();
         tempimg->SetSpacing( m_UpsampledSpacing );
         tempimg->SetOrigin( m_Origin );
         tempimg->SetDirection( m_DirectionMatrix );
         tempimg->SetLargestPossibleRegion( m_UpsampledImageRegion );
         tempimg->SetBufferedRegion( m_UpsampledImageRegion );
         tempimg->SetRequestedRegion( m_UpsampledImageRegion );
         tempimg->Allocate();
         tempimg->FillBuffer(0);
         m_VolumeFractions.push_back(tempimg);
     }
 
     // resample fiber bundle for sufficient voxel coverage
     double segmentVolume = 0.0001;
     float minSpacing = 1;
     if(m_UpsampledSpacing[0]<m_UpsampledSpacing[1] && m_UpsampledSpacing[0]<m_UpsampledSpacing[2])
         minSpacing = m_UpsampledSpacing[0];
     else if (m_UpsampledSpacing[1] < m_UpsampledSpacing[2])
         minSpacing = m_UpsampledSpacing[1];
     else
         minSpacing = m_UpsampledSpacing[2];
     FiberBundleType fiberBundle = m_FiberBundle->GetDeepCopy();
     fiberBundle->ResampleFibers(minSpacing/m_VolumeAccuracy);
     double mmRadius = m_FiberRadius/1000;
     if (mmRadius>0)
         segmentVolume = M_PI*mmRadius*mmRadius*minSpacing/m_VolumeAccuracy;
 
     // generate double images to work with because we don't want to lose precision
     // we use a separate image for each compartment model
     std::vector< DoubleDwiType::Pointer > compartments;
     for (int i=0; i<m_FiberModels.size()+m_NonFiberModels.size(); i++)
     {
         DoubleDwiType::Pointer doubleDwi = DoubleDwiType::New();
         doubleDwi->SetSpacing( m_UpsampledSpacing );
         doubleDwi->SetOrigin( m_Origin );
         doubleDwi->SetDirection( m_DirectionMatrix );
         doubleDwi->SetLargestPossibleRegion( m_UpsampledImageRegion );
         doubleDwi->SetBufferedRegion( m_UpsampledImageRegion );
         doubleDwi->SetRequestedRegion( m_UpsampledImageRegion );
         doubleDwi->SetVectorLength( m_FiberModels[0]->GetNumGradients() );
         doubleDwi->Allocate();
         DoubleDwiType::PixelType pix;
         pix.SetSize(m_FiberModels[0]->GetNumGradients());
         pix.Fill(0.0);
         doubleDwi->FillBuffer(pix);
         compartments.push_back(doubleDwi);
     }
 
     double interpFact = 2*atan(-0.5*m_InterpolationShrink);
     double maxVolume = 0;
 
     vtkSmartPointer<vtkPolyData> fiberPolyData = fiberBundle->GetFiberPolyData();
     vtkSmartPointer<vtkCellArray> vLines = fiberPolyData->GetLines();
     vLines->InitTraversal();
 
     MITK_INFO << "Generating signal of " << m_FiberModels.size() << " fiber compartments";
     boost::progress_display disp(numFibers);
     for( int i=0; i<numFibers; i++ )
     {
         ++disp;
         vtkIdType   numPoints(0);
         vtkIdType*  points(NULL);
         vLines->GetNextCell ( numPoints, points );
         if (numPoints<2)
             continue;
 
         for( int j=0; j<numPoints; j++)
         {
             double* temp = fiberPolyData->GetPoint(points[j]);
             itk::Point<float, 3> vertex = GetItkPoint(temp);
             itk::Vector<double> v = GetItkVector(temp);
 
             itk::Vector<double, 3> dir(3);
             if (j<numPoints-1)
                 dir = GetItkVector(fiberPolyData->GetPoint(points[j+1]))-v;
             else
                 dir = v-GetItkVector(fiberPolyData->GetPoint(points[j-1]));
 
             itk::Index<3> idx;
             itk::ContinuousIndex<float, 3> contIndex;
             m_TissueMask->TransformPhysicalPointToIndex(vertex, idx);
             m_TissueMask->TransformPhysicalPointToContinuousIndex(vertex, contIndex);
 
             if (!m_UseInterpolation)    // use nearest neighbour interpolation
             {
                 if (!m_TissueMask->GetLargestPossibleRegion().IsInside(idx) || m_TissueMask->GetPixel(idx)<=0)
                     continue;
 
                 // generate signal for each fiber compartment
                 for (int k=0; k<m_FiberModels.size(); k++)
                 {
                     DoubleDwiType::Pointer doubleDwi = compartments.at(k);
                     m_FiberModels[k]->SetFiberDirection(dir);
                     DoubleDwiType::PixelType pix = doubleDwi->GetPixel(idx);
                     pix += segmentVolume*m_FiberModels[k]->SimulateMeasurement();
                     doubleDwi->SetPixel(idx, pix );
                     if (pix[baselineIndex]>maxVolume)
                         maxVolume = pix[baselineIndex];
                 }
 
                 continue;
             }
 
             double frac_x = contIndex[0] - idx[0];
             double frac_y = contIndex[1] - idx[1];
             double frac_z = contIndex[2] - idx[2];
             if (frac_x<0)
             {
                 idx[0] -= 1;
                 frac_x += 1;
             }
             if (frac_y<0)
             {
                 idx[1] -= 1;
                 frac_y += 1;
             }
             if (frac_z<0)
             {
                 idx[2] -= 1;
                 frac_z += 1;
             }
 
             frac_x = atan((0.5-frac_x)*m_InterpolationShrink)/interpFact + 0.5;
             frac_y = atan((0.5-frac_y)*m_InterpolationShrink)/interpFact + 0.5;
             frac_z = atan((0.5-frac_z)*m_InterpolationShrink)/interpFact + 0.5;
 
             // use trilinear interpolation
             itk::Index<3> newIdx;
             for (int x=0; x<2; x++)
             {
                 frac_x = 1-frac_x;
                 for (int y=0; y<2; y++)
                 {
                     frac_y = 1-frac_y;
                     for (int z=0; z<2; z++)
                     {
                         frac_z = 1-frac_z;
 
                         newIdx[0] = idx[0]+x;
                         newIdx[1] = idx[1]+y;
                         newIdx[2] = idx[2]+z;
 
                         double frac = frac_x*frac_y*frac_z;
 
                         // is position valid?
                         if (!m_TissueMask->GetLargestPossibleRegion().IsInside(newIdx) || m_TissueMask->GetPixel(newIdx)<=0)
                             continue;
 
                         // generate signal for each fiber compartment
                         for (int k=0; k<m_FiberModels.size(); k++)
                         {
                             DoubleDwiType::Pointer doubleDwi = compartments.at(k);
                             m_FiberModels[k]->SetFiberDirection(dir);
                             DoubleDwiType::PixelType pix = doubleDwi->GetPixel(newIdx);
                             pix += segmentVolume*frac*m_FiberModels[k]->SimulateMeasurement();
                             doubleDwi->SetPixel(newIdx, pix );
                             if (pix[baselineIndex]>maxVolume)
                                 maxVolume = pix[baselineIndex];
                         }
                     }
                 }
             }
         }
     }
 
     MITK_INFO << "Generating signal of " << m_NonFiberModels.size() << " non-fiber compartments";
     ImageRegionIterator<ItkUcharImgType> it3(m_TissueMask, m_TissueMask->GetLargestPossibleRegion());
     boost::progress_display disp3(m_TissueMask->GetLargestPossibleRegion().GetNumberOfPixels());
     double voxelVolume = m_UpsampledSpacing[0]*m_UpsampledSpacing[1]*m_UpsampledSpacing[2];
 
     double fact = 1;
     if (m_FiberRadius<0.0001)
         fact = voxelVolume/maxVolume;
 
     while(!it3.IsAtEnd())
     {
         ++disp3;
         DoubleDwiType::IndexType index = it3.GetIndex();
 
         if (it3.Get()>0)
         {
             // get fiber volume fraction
             DoubleDwiType::Pointer fiberDwi = compartments.at(0);
             DoubleDwiType::PixelType fiberPix = fiberDwi->GetPixel(index); // intra axonal compartment
             if (fact>1) // auto scale intra-axonal if no fiber radius is specified
             {
                 fiberPix *= fact;
                 fiberDwi->SetPixel(index, fiberPix);
             }
             double f = fiberPix[baselineIndex];
 
             if (f>voxelVolume || f>0 && m_EnforcePureFiberVoxels)  // more fiber than space in voxel?
             {
                 fiberDwi->SetPixel(index, fiberPix*voxelVolume/f);
 
                 for (int i=1; i<m_FiberModels.size(); i++)
                 {
                     DoubleDwiType::PixelType pix; pix.Fill(0.0);
                     compartments.at(i)->SetPixel(index, pix);
-                    m_VolumeFractions.at(i)->SetPixel(index, voxelVolume);
+                    m_VolumeFractions.at(i)->SetPixel(index, 1);
                 }
             }
             else
             {
                 m_VolumeFractions.at(0)->SetPixel(index, f);
 
                 double nonf = voxelVolume-f;    // non-fiber volume
                 double inter = 0;
                 if (m_FiberModels.size()>1)
                     inter = nonf * f/voxelVolume;   // intra-axonal fraction of non fiber compartment scales linearly with f
                 double other = nonf - inter;        // rest of compartment
                 double singleinter = inter/(m_FiberModels.size()-1);
 
                 // adjust non-fiber and intra-axonal signal
                 for (int i=1; i<m_FiberModels.size(); i++)
                 {
                     DoubleDwiType::Pointer doubleDwi = compartments.at(i);
                     DoubleDwiType::PixelType pix = doubleDwi->GetPixel(index);
                     if (pix[baselineIndex]>0)
                         pix /= pix[baselineIndex];
                     pix *= singleinter;
                     doubleDwi->SetPixel(index, pix);
-                    m_VolumeFractions.at(i)->SetPixel(index, singleinter);
+                    m_VolumeFractions.at(i)->SetPixel(index, singleinter/voxelVolume);
                 }
                 for (int i=0; i<m_NonFiberModels.size(); i++)
                 {
                     DoubleDwiType::Pointer doubleDwi = compartments.at(i+m_FiberModels.size());
                     DoubleDwiType::PixelType pix = doubleDwi->GetPixel(index) + m_NonFiberModels[i]->SimulateMeasurement()*other*m_NonFiberModels[i]->GetWeight();
                     doubleDwi->SetPixel(index, pix);
-                    m_VolumeFractions.at(i+m_FiberModels.size())->SetPixel(index, other*m_NonFiberModels[i]->GetWeight());
+                    m_VolumeFractions.at(i+m_FiberModels.size())->SetPixel(index, other/voxelVolume*m_NonFiberModels[i]->GetWeight());
                 }
             }
         }
         ++it3;
     }
 
     // do k-space stuff
-    if (!m_KspaceArtifacts.empty())
+    if (!m_KspaceArtifacts.empty() || m_kOffset>0)
     {
         MITK_INFO << "Adjusting complex signal";
         compartments = DoKspaceStuff(compartments);
     }
 
     MITK_INFO << "Summing compartments and adding noise";
     unsigned int window = 0;
     unsigned int min = itk::NumericTraits<unsigned int>::max();
     ImageRegionIterator<DWIImageType> it4 (outImage, outImage->GetLargestPossibleRegion());
     DoubleDwiType::PixelType signal; signal.SetSize(m_FiberModels[0]->GetNumGradients());
     boost::progress_display disp4(outImage->GetLargestPossibleRegion().GetNumberOfPixels());
     while(!it4.IsAtEnd())
     {
         ++disp4;
         DWIImageType::IndexType index = it4.GetIndex();
         signal.Fill(0.0);
 
         // adjust fiber signal
         for (int i=0; i<m_FiberModels.size(); i++)
             signal += compartments.at(i)->GetPixel(index)*m_SignalScale;
 
         // adjust non-fiber signal
         for (int i=0; i<m_NonFiberModels.size(); i++)
             signal += compartments.at(m_FiberModels.size()+i)->GetPixel(index)*m_SignalScale;
 
         DoubleDwiType::PixelType accu = signal; accu.Fill(0.0);
         for (int i=0; i<m_NumberOfRepetitions; i++)
         {
             DoubleDwiType::PixelType temp = signal;
             m_NoiseModel->AddNoise(temp);
             accu += temp;
         }
         signal = accu/m_NumberOfRepetitions;
         for (int i=0; i<signal.Size(); i++)
         {
             if (signal[i]>0)
                 signal[i] = floor(signal[i]+0.5);
             else
                 signal[i] = ceil(signal[i]-0.5);
 
             if (!m_FiberModels.at(0)->IsBaselineIndex(i) && signal[i]>window)
                 window = signal[i];
             if (!m_FiberModels.at(0)->IsBaselineIndex(i) && signal[i]<min)
                 min = signal[i];
         }
         it4.Set(signal);
         ++it4;
     }
     window -= min;
     unsigned int level = window/2 + min;
     m_LevelWindow.SetLevelWindow(level, window);
     this->SetNthOutput(0, outImage);
 }
 
 itk::Point<float, 3> TractsToDWIImageFilter::GetItkPoint(double point[3])
 {
     itk::Point<float, 3> itkPoint;
     itkPoint[0] = point[0];
     itkPoint[1] = point[1];
     itkPoint[2] = point[2];
     return itkPoint;
 }
 
 itk::Vector<double, 3> TractsToDWIImageFilter::GetItkVector(double point[3])
 {
     itk::Vector<double, 3> itkVector;
     itkVector[0] = point[0];
     itkVector[1] = point[1];
     itkVector[2] = point[2];
     return itkVector;
 }
 
 vnl_vector_fixed<double, 3> TractsToDWIImageFilter::GetVnlVector(double point[3])
 {
     vnl_vector_fixed<double, 3> vnlVector;
     vnlVector[0] = point[0];
     vnlVector[1] = point[1];
     vnlVector[2] = point[2];
     return vnlVector;
 }
 
 
 vnl_vector_fixed<double, 3> TractsToDWIImageFilter::GetVnlVector(Vector<float,3>& vector)
 {
     vnl_vector_fixed<double, 3> vnlVector;
     vnlVector[0] = vector[0];
     vnlVector[1] = vector[1];
     vnlVector[2] = vector[2];
     return vnlVector;
 }
 
 }
diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging/src/internal/QmitkFiberfoxViewControls.ui b/Plugins/org.mitk.gui.qt.diffusionimaging/src/internal/QmitkFiberfoxViewControls.ui
index ca102b4d97..1e9af9ab77 100644
--- a/Plugins/org.mitk.gui.qt.diffusionimaging/src/internal/QmitkFiberfoxViewControls.ui
+++ b/Plugins/org.mitk.gui.qt.diffusionimaging/src/internal/QmitkFiberfoxViewControls.ui
@@ -1,2166 +1,2166 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <ui version="4.0">
  <class>QmitkFiberfoxViewControls</class>
  <widget class="QWidget" name="QmitkFiberfoxViewControls">
   <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
     <width>493</width>
     <height>1532</height>
    </rect>
   </property>
   <property name="windowTitle">
    <string>Form</string>
   </property>
   <layout class="QGridLayout" name="gridLayout_2">
    <item row="0" column="0">
     <widget class="QTabWidget" name="tabWidget">
      <property name="currentIndex">
       <number>0</number>
      </property>
      <widget class="QWidget" name="tab">
       <attribute name="title">
        <string>Fiber Definition</string>
       </attribute>
       <layout class="QGridLayout" name="gridLayout_8">
        <item row="7" 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="0" column="0">
         <widget class="QLabel" name="m_FiberGenMessage">
          <property name="styleSheet">
           <string notr="true">color: rgb(255, 0, 0);</string>
          </property>
          <property name="text">
           <string>Please select an image or an existing fiber bundle to draw the fiber fiducials. If you can't provide a suitable image, generate one using the &quot;Signal Generation&quot; tab.</string>
          </property>
          <property name="textFormat">
           <enum>Qt::AutoText</enum>
          </property>
          <property name="alignment">
           <set>Qt::AlignJustify|Qt::AlignVCenter</set>
          </property>
          <property name="wordWrap">
           <bool>true</bool>
          </property>
         </widget>
        </item>
        <item row="5" column="0">
         <widget class="QGroupBox" name="groupBox_7">
          <property name="title">
           <string>Fiducial Options</string>
          </property>
          <layout class="QGridLayout" name="gridLayout_16">
           <item row="0" column="0">
            <widget class="QCheckBox" name="m_ConstantRadiusBox">
             <property name="toolTip">
              <string>All fiducials are treated as circles with the same radius as the first fiducial. </string>
             </property>
             <property name="text">
              <string>Use Constant Fiducial Radius</string>
             </property>
             <property name="checked">
              <bool>false</bool>
             </property>
            </widget>
           </item>
           <item row="1" column="0">
            <widget class="QCommandLinkButton" name="m_AlignOnGrid">
             <property name="enabled">
              <bool>false</bool>
             </property>
             <property name="toolTip">
              <string>Align selected fiducials with voxel grid. Shifts selected fiducials to nearest voxel center.</string>
             </property>
             <property name="text">
              <string>Align With Grid</string>
             </property>
            </widget>
           </item>
          </layout>
         </widget>
        </item>
        <item row="6" column="0" colspan="2">
         <widget class="QGroupBox" name="groupBox_4">
          <property name="title">
           <string>Operations</string>
          </property>
          <layout class="QGridLayout" name="gridLayout_11">
           <item row="4" column="0">
            <widget class="QCommandLinkButton" name="m_CopyBundlesButton">
             <property name="enabled">
              <bool>false</bool>
             </property>
             <property name="text">
              <string>Copy Bundles</string>
             </property>
            </widget>
           </item>
           <item row="3" column="0">
            <widget class="QCommandLinkButton" name="m_TransformBundlesButton">
             <property name="enabled">
              <bool>false</bool>
             </property>
             <property name="text">
              <string>Transform Selection</string>
             </property>
            </widget>
           </item>
           <item row="2" column="0">
            <widget class="QFrame" name="frame_4">
             <property name="frameShape">
              <enum>QFrame::NoFrame</enum>
             </property>
             <property name="frameShadow">
              <enum>QFrame::Raised</enum>
             </property>
             <layout class="QGridLayout" name="gridLayout_12">
              <property name="margin">
               <number>0</number>
              </property>
              <item row="1" column="2">
               <widget class="QLabel" name="m_TensorsToDWIBValueLabel_18">
                <property name="toolTip">
                 <string/>
                </property>
                <property name="statusTip">
                 <string/>
                </property>
                <property name="whatsThis">
                 <string/>
                </property>
                <property name="text">
                 <string>Y</string>
                </property>
                <property name="wordWrap">
                 <bool>false</bool>
                </property>
               </widget>
              </item>
              <item row="2" column="1">
               <widget class="QDoubleSpinBox" name="m_XrotBox">
                <property name="toolTip">
                 <string>Rotation angle (in degree) around x-axis.</string>
                </property>
                <property name="minimum">
                 <double>-360.000000000000000</double>
                </property>
                <property name="maximum">
                 <double>360.000000000000000</double>
                </property>
                <property name="singleStep">
                 <double>0.100000000000000</double>
                </property>
               </widget>
              </item>
              <item row="1" column="0">
               <widget class="QLabel" name="m_TensorsToDWIBValueLabel_22">
                <property name="toolTip">
                 <string/>
                </property>
                <property name="statusTip">
                 <string/>
                </property>
                <property name="whatsThis">
                 <string/>
                </property>
                <property name="text">
                 <string>Axis:</string>
                </property>
                <property name="wordWrap">
                 <bool>false</bool>
                </property>
               </widget>
              </item>
              <item row="2" column="2">
               <widget class="QDoubleSpinBox" name="m_YrotBox">
                <property name="toolTip">
                 <string>Rotation angle (in degree) around y-axis.</string>
                </property>
                <property name="minimum">
                 <double>-360.000000000000000</double>
                </property>
                <property name="maximum">
                 <double>360.000000000000000</double>
                </property>
                <property name="singleStep">
                 <double>0.100000000000000</double>
                </property>
               </widget>
              </item>
              <item row="3" column="0">
               <widget class="QLabel" name="m_TensorsToDWIBValueLabel_21">
                <property name="toolTip">
                 <string/>
                </property>
                <property name="statusTip">
                 <string/>
                </property>
                <property name="whatsThis">
                 <string/>
                </property>
                <property name="text">
                 <string>Translation:</string>
                </property>
                <property name="wordWrap">
                 <bool>false</bool>
                </property>
               </widget>
              </item>
              <item row="3" column="3">
               <widget class="QDoubleSpinBox" name="m_ZtransBox">
                <property name="toolTip">
                 <string>Translation (in mm) in direction of the z-axis.</string>
                </property>
                <property name="minimum">
                 <double>-1000.000000000000000</double>
                </property>
                <property name="maximum">
                 <double>1000.000000000000000</double>
                </property>
                <property name="singleStep">
                 <double>0.100000000000000</double>
                </property>
               </widget>
              </item>
              <item row="3" column="2">
               <widget class="QDoubleSpinBox" name="m_YtransBox">
                <property name="toolTip">
                 <string>Translation (in mm) in direction of the y-axis.</string>
                </property>
                <property name="minimum">
                 <double>-1000.000000000000000</double>
                </property>
                <property name="maximum">
                 <double>1000.000000000000000</double>
                </property>
                <property name="singleStep">
                 <double>0.100000000000000</double>
                </property>
               </widget>
              </item>
              <item row="1" column="1">
               <widget class="QLabel" name="m_TensorsToDWIBValueLabel_17">
                <property name="toolTip">
                 <string/>
                </property>
                <property name="statusTip">
                 <string/>
                </property>
                <property name="whatsThis">
                 <string/>
                </property>
                <property name="text">
                 <string>X</string>
                </property>
                <property name="wordWrap">
                 <bool>false</bool>
                </property>
               </widget>
              </item>
              <item row="2" column="0">
               <widget class="QLabel" name="m_TensorsToDWIBValueLabel_20">
                <property name="toolTip">
                 <string/>
                </property>
                <property name="statusTip">
                 <string/>
                </property>
                <property name="whatsThis">
                 <string/>
                </property>
                <property name="text">
                 <string>Rotation:</string>
                </property>
                <property name="wordWrap">
                 <bool>false</bool>
                </property>
               </widget>
              </item>
              <item row="1" column="3">
               <widget class="QLabel" name="m_TensorsToDWIBValueLabel_19">
                <property name="toolTip">
                 <string/>
                </property>
                <property name="statusTip">
                 <string/>
                </property>
                <property name="whatsThis">
                 <string/>
                </property>
                <property name="text">
                 <string>Z</string>
                </property>
                <property name="wordWrap">
                 <bool>false</bool>
                </property>
               </widget>
              </item>
              <item row="2" column="3">
               <widget class="QDoubleSpinBox" name="m_ZrotBox">
                <property name="toolTip">
                 <string>Rotation angle (in degree) around z-axis.</string>
                </property>
                <property name="minimum">
                 <double>-360.000000000000000</double>
                </property>
                <property name="maximum">
                 <double>360.000000000000000</double>
                </property>
                <property name="singleStep">
                 <double>0.100000000000000</double>
                </property>
               </widget>
              </item>
              <item row="3" column="1">
               <widget class="QDoubleSpinBox" name="m_XtransBox">
                <property name="toolTip">
                 <string>Translation (in mm) in direction of the x-axis.</string>
                </property>
                <property name="minimum">
                 <double>-1000.000000000000000</double>
                </property>
                <property name="maximum">
                 <double>1000.000000000000000</double>
                </property>
                <property name="singleStep">
                 <double>0.100000000000000</double>
                </property>
               </widget>
              </item>
              <item row="4" column="0">
               <widget class="QLabel" name="m_TensorsToDWIBValueLabel_24">
                <property name="toolTip">
                 <string/>
                </property>
                <property name="statusTip">
                 <string/>
                </property>
                <property name="whatsThis">
                 <string/>
                </property>
                <property name="text">
                 <string>Scaling:</string>
                </property>
                <property name="wordWrap">
                 <bool>false</bool>
                </property>
               </widget>
              </item>
              <item row="4" column="1">
               <widget class="QDoubleSpinBox" name="m_XscaleBox">
                <property name="toolTip">
                 <string>Scaling factor for selected fiber bundle along the x-axis.</string>
                </property>
                <property name="minimum">
                 <double>0.010000000000000</double>
                </property>
                <property name="maximum">
                 <double>10.000000000000000</double>
                </property>
                <property name="singleStep">
                 <double>0.010000000000000</double>
                </property>
                <property name="value">
                 <double>1.000000000000000</double>
                </property>
               </widget>
              </item>
              <item row="4" column="2">
               <widget class="QDoubleSpinBox" name="m_YscaleBox">
                <property name="toolTip">
                 <string>Scaling factor for selected fiber bundle along the y-axis.</string>
                </property>
                <property name="minimum">
                 <double>0.010000000000000</double>
                </property>
                <property name="maximum">
                 <double>10.000000000000000</double>
                </property>
                <property name="singleStep">
                 <double>0.010000000000000</double>
                </property>
                <property name="value">
                 <double>1.000000000000000</double>
                </property>
               </widget>
              </item>
              <item row="4" column="3">
               <widget class="QDoubleSpinBox" name="m_ZscaleBox">
                <property name="toolTip">
                 <string>Scaling factor for selected fiber bundle along the z-axis.</string>
                </property>
                <property name="minimum">
                 <double>0.010000000000000</double>
                </property>
                <property name="maximum">
                 <double>10.000000000000000</double>
                </property>
                <property name="singleStep">
                 <double>0.010000000000000</double>
                </property>
                <property name="value">
                 <double>1.000000000000000</double>
                </property>
               </widget>
              </item>
             </layout>
            </widget>
           </item>
           <item row="5" column="0">
            <widget class="QCommandLinkButton" name="m_JoinBundlesButton">
             <property name="enabled">
              <bool>false</bool>
             </property>
             <property name="text">
              <string>Join Bundles</string>
             </property>
            </widget>
           </item>
           <item row="6" column="0">
            <widget class="QCheckBox" name="m_IncludeFiducials">
             <property name="toolTip">
              <string>If checked, the fiducials belonging to the modified bundle are also modified.</string>
             </property>
             <property name="text">
              <string>Include Fiducials</string>
             </property>
             <property name="checked">
              <bool>true</bool>
             </property>
            </widget>
           </item>
          </layout>
         </widget>
        </item>
        <item row="4" column="0">
         <widget class="QGroupBox" name="groupBox_8">
          <property name="title">
           <string>Fiber Options</string>
          </property>
          <layout class="QGridLayout" name="gridLayout_15">
           <item row="2" column="0">
            <widget class="QFrame" name="frame_5">
             <property name="frameShape">
              <enum>QFrame::NoFrame</enum>
             </property>
             <property name="frameShadow">
              <enum>QFrame::Raised</enum>
             </property>
             <layout class="QGridLayout" name="gridLayout_9">
              <property name="margin">
               <number>0</number>
              </property>
              <item row="2" column="0">
               <widget class="QFrame" name="m_AdvancedFiberOptionsFrame">
                <property name="frameShape">
                 <enum>QFrame::NoFrame</enum>
                </property>
                <property name="frameShadow">
                 <enum>QFrame::Raised</enum>
                </property>
                <layout class="QGridLayout" name="gridLayout_21">
                 <property name="margin">
                  <number>0</number>
                 </property>
                 <item row="1" column="0">
                  <widget class="QLabel" name="m_TensorsToDWIBValueLabel_5">
                   <property name="toolTip">
                    <string/>
                   </property>
                   <property name="statusTip">
                    <string/>
                   </property>
                   <property name="whatsThis">
                    <string/>
                   </property>
                   <property name="text">
                    <string>Tension:</string>
                   </property>
                   <property name="wordWrap">
                    <bool>false</bool>
                   </property>
                  </widget>
                 </item>
                 <item row="0" column="0">
                  <widget class="QLabel" name="m_TensorsToDWIBValueLabel_8">
                   <property name="toolTip">
                    <string/>
                   </property>
                   <property name="statusTip">
                    <string/>
                   </property>
                   <property name="whatsThis">
                    <string/>
                   </property>
                   <property name="text">
                    <string>Fiber Sampling:</string>
                   </property>
                   <property name="wordWrap">
                    <bool>false</bool>
                   </property>
                  </widget>
                 </item>
                 <item row="1" column="1">
                  <widget class="QDoubleSpinBox" name="m_TensionBox">
                   <property name="toolTip">
                    <string/>
                   </property>
                   <property name="decimals">
                    <number>3</number>
                   </property>
                   <property name="minimum">
                    <double>-1.000000000000000</double>
                   </property>
                   <property name="maximum">
                    <double>1.000000000000000</double>
                   </property>
                   <property name="singleStep">
                    <double>0.100000000000000</double>
                   </property>
                   <property name="value">
                    <double>0.000000000000000</double>
                   </property>
                  </widget>
                 </item>
                 <item row="0" column="1">
                  <widget class="QSpinBox" name="m_FiberSamplingBox">
                   <property name="toolTip">
                    <string>Fiber sampling points (per cm)</string>
                   </property>
                   <property name="minimum">
                    <number>1</number>
                   </property>
                   <property name="maximum">
                    <number>100</number>
                   </property>
                   <property name="singleStep">
                    <number>1</number>
                   </property>
                   <property name="value">
                    <number>10</number>
                   </property>
                  </widget>
                 </item>
                 <item row="3" column="1">
                  <widget class="QDoubleSpinBox" name="m_BiasBox">
                   <property name="decimals">
                    <number>3</number>
                   </property>
                   <property name="minimum">
                    <double>-1.000000000000000</double>
                   </property>
                   <property name="maximum">
                    <double>1.000000000000000</double>
                   </property>
                   <property name="singleStep">
                    <double>0.100000000000000</double>
                   </property>
                   <property name="value">
                    <double>0.000000000000000</double>
                   </property>
                  </widget>
                 </item>
                 <item row="3" column="0">
                  <widget class="QLabel" name="m_TensorsToDWIBValueLabel_7">
                   <property name="toolTip">
                    <string/>
                   </property>
                   <property name="statusTip">
                    <string/>
                   </property>
                   <property name="whatsThis">
                    <string/>
                   </property>
                   <property name="text">
                    <string>Bias:</string>
                   </property>
                   <property name="wordWrap">
                    <bool>false</bool>
                   </property>
                  </widget>
                 </item>
                 <item row="2" column="0">
                  <widget class="QLabel" name="m_TensorsToDWIBValueLabel_6">
                   <property name="toolTip">
                    <string/>
                   </property>
                   <property name="statusTip">
                    <string/>
                   </property>
                   <property name="whatsThis">
                    <string/>
                   </property>
                   <property name="text">
                    <string>Continuity:</string>
                   </property>
                   <property name="wordWrap">
                    <bool>false</bool>
                   </property>
                  </widget>
                 </item>
                 <item row="2" column="1">
                  <widget class="QDoubleSpinBox" name="m_ContinuityBox">
                   <property name="decimals">
                    <number>3</number>
                   </property>
                   <property name="minimum">
                    <double>-1.000000000000000</double>
                   </property>
                   <property name="maximum">
                    <double>1.000000000000000</double>
                   </property>
                   <property name="singleStep">
                    <double>0.100000000000000</double>
                   </property>
                   <property name="value">
                    <double>0.000000000000000</double>
                   </property>
                  </widget>
                 </item>
                </layout>
               </widget>
              </item>
              <item row="1" column="0">
               <widget class="QFrame" name="frame_2">
                <property name="frameShape">
                 <enum>QFrame::NoFrame</enum>
                </property>
                <property name="frameShadow">
                 <enum>QFrame::Raised</enum>
                </property>
                <layout class="QGridLayout" name="gridLayout_25">
                 <property name="margin">
                  <number>0</number>
                 </property>
                 <property name="verticalSpacing">
                  <number>6</number>
                 </property>
                 <item row="0" column="0">
                  <widget class="QLabel" name="m_TensorsToDWIBValueLabel_4">
                   <property name="toolTip">
                    <string/>
                   </property>
                   <property name="statusTip">
                    <string/>
                   </property>
                   <property name="whatsThis">
                    <string/>
                   </property>
                   <property name="text">
                    <string>#Fibers:</string>
                   </property>
                   <property name="wordWrap">
                    <bool>false</bool>
                   </property>
                  </widget>
                 </item>
                 <item row="0" column="1">
                  <widget class="QSpinBox" name="m_FiberDensityBox">
                   <property name="toolTip">
                    <string>Specify number of fibers to generate for the selected bundle.</string>
                   </property>
                   <property name="minimum">
                    <number>1</number>
                   </property>
                   <property name="maximum">
                    <number>1000000</number>
                   </property>
                   <property name="singleStep">
                    <number>100</number>
                   </property>
                   <property name="value">
                    <number>100</number>
                   </property>
                  </widget>
                 </item>
                </layout>
               </widget>
              </item>
             </layout>
            </widget>
           </item>
           <item row="3" column="0">
            <widget class="QCommandLinkButton" name="m_GenerateFibersButton">
             <property name="enabled">
              <bool>false</bool>
             </property>
             <property name="text">
              <string>Generate Fibers</string>
             </property>
            </widget>
           </item>
           <item row="1" column="0">
            <widget class="QFrame" name="frame_3">
             <property name="frameShape">
              <enum>QFrame::NoFrame</enum>
             </property>
             <property name="frameShadow">
              <enum>QFrame::Raised</enum>
             </property>
             <layout class="QGridLayout" name="gridLayout_5">
              <property name="margin">
               <number>0</number>
              </property>
              <item row="0" column="1">
               <widget class="QComboBox" name="m_DistributionBox">
                <property name="toolTip">
                 <string>Select fiber distribution inside of the fiducials.</string>
                </property>
                <item>
                 <property name="text">
                  <string>Uniform</string>
                 </property>
                </item>
                <item>
                 <property name="text">
                  <string>Gaussian</string>
                 </property>
                </item>
               </widget>
              </item>
              <item row="0" column="0">
               <widget class="QLabel" name="m_TensorsToDWIBValueLabel_9">
                <property name="toolTip">
                 <string/>
                </property>
                <property name="statusTip">
                 <string/>
                </property>
                <property name="whatsThis">
                 <string/>
                </property>
                <property name="text">
                 <string>Fiber Distribution:</string>
                </property>
                <property name="wordWrap">
                 <bool>false</bool>
                </property>
               </widget>
              </item>
              <item row="0" column="2">
               <widget class="QDoubleSpinBox" name="m_VarianceBox">
                <property name="toolTip">
                 <string>Variance of the gaussian</string>
                </property>
                <property name="decimals">
                 <number>3</number>
                </property>
                <property name="minimum">
                 <double>0.001000000000000</double>
                </property>
                <property name="maximum">
                 <double>10.000000000000000</double>
                </property>
                <property name="singleStep">
                 <double>0.010000000000000</double>
                </property>
                <property name="value">
                 <double>0.100000000000000</double>
                </property>
               </widget>
              </item>
             </layout>
            </widget>
           </item>
           <item row="0" column="0">
            <widget class="QFrame" name="frame_8">
             <property name="frameShape">
              <enum>QFrame::NoFrame</enum>
             </property>
             <property name="frameShadow">
              <enum>QFrame::Raised</enum>
             </property>
             <layout class="QGridLayout" name="gridLayout_22">
              <property name="margin">
               <number>0</number>
              </property>
              <item row="0" column="0">
               <widget class="QCheckBox" name="m_RealTimeFibers">
                <property name="toolTip">
                 <string>Disable to only generate fibers if &quot;Generate Fibers&quot; button is pressed.</string>
                </property>
                <property name="text">
                 <string>Real Time Fibers</string>
                </property>
                <property name="checked">
                 <bool>true</bool>
                </property>
               </widget>
              </item>
              <item row="0" column="1">
               <widget class="QCheckBox" name="m_AdvancedOptionsBox">
                <property name="toolTip">
                 <string>Disable to only generate fibers if &quot;Generate Fibers&quot; button is pressed.</string>
                </property>
                <property name="text">
                 <string>Advanced Options</string>
                </property>
                <property name="checked">
                 <bool>false</bool>
                </property>
               </widget>
              </item>
             </layout>
            </widget>
           </item>
          </layout>
         </widget>
        </item>
        <item row="3" column="0">
         <widget class="QFrame" name="frame">
          <property name="frameShape">
           <enum>QFrame::NoFrame</enum>
          </property>
          <property name="frameShadow">
           <enum>QFrame::Raised</enum>
          </property>
          <layout class="QGridLayout" name="gridLayout_3">
           <property name="margin">
            <number>0</number>
           </property>
           <item row="0" column="0">
            <widget class="QPushButton" name="m_CircleButton">
             <property name="enabled">
              <bool>false</bool>
             </property>
             <property name="maximumSize">
              <size>
               <width>30</width>
               <height>30</height>
              </size>
             </property>
             <property name="toolTip">
              <string>Draw elliptical fiducial.</string>
             </property>
             <property name="text">
              <string/>
             </property>
             <property name="icon">
              <iconset resource="../../resources/QmitkDiffusionImaging.qrc">
               <normaloff>:/QmitkDiffusionImaging/circle.png</normaloff>:/QmitkDiffusionImaging/circle.png</iconset>
             </property>
             <property name="iconSize">
              <size>
               <width>32</width>
               <height>32</height>
              </size>
             </property>
             <property name="checkable">
              <bool>false</bool>
             </property>
             <property name="flat">
              <bool>true</bool>
             </property>
            </widget>
           </item>
           <item row="0" column="1">
            <widget class="QPushButton" name="m_FlipButton">
             <property name="enabled">
              <bool>false</bool>
             </property>
             <property name="maximumSize">
              <size>
               <width>30</width>
               <height>30</height>
              </size>
             </property>
             <property name="toolTip">
              <string>Flip fiber waypoints of selcted fiducial around one axis.</string>
             </property>
             <property name="text">
              <string/>
             </property>
             <property name="icon">
              <iconset resource="../../resources/QmitkDiffusionImaging.qrc">
               <normaloff>:/QmitkDiffusionImaging/refresh.xpm</normaloff>:/QmitkDiffusionImaging/refresh.xpm</iconset>
             </property>
             <property name="iconSize">
              <size>
               <width>32</width>
               <height>32</height>
              </size>
             </property>
             <property name="checkable">
              <bool>false</bool>
             </property>
             <property name="flat">
              <bool>true</bool>
             </property>
            </widget>
           </item>
           <item row="0" column="2">
            <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>
          </layout>
         </widget>
        </item>
       </layout>
      </widget>
      <widget class="QWidget" name="tab_2">
       <attribute name="title">
        <string>Signal Generation</string>
       </attribute>
       <layout class="QGridLayout" name="gridLayout_4">
        <item row="5" column="0">
         <widget class="QGroupBox" name="m_IntraAxonalGroupBox">
          <property name="title">
           <string>Intra-axonal Compartment</string>
          </property>
          <layout class="QGridLayout" name="gridLayout_13">
           <item row="0" column="0">
            <widget class="QComboBox" name="m_Compartment1Box">
             <property name="toolTip">
              <string>Select signal model for intra-axonal compartment.</string>
             </property>
             <item>
              <property name="text">
               <string>Stick Model</string>
              </property>
             </item>
             <item>
              <property name="text">
               <string>Zeppelin Model</string>
              </property>
             </item>
             <item>
              <property name="text">
               <string>Tensor Model</string>
              </property>
             </item>
            </widget>
           </item>
           <item row="1" column="0">
            <widget class="QmitkStickModelParametersWidget" name="m_StickWidget1" native="true"/>
           </item>
           <item row="2" column="0">
            <widget class="QmitkZeppelinModelParametersWidget" name="m_ZeppelinWidget1" native="true"/>
           </item>
           <item row="3" column="0">
            <widget class="QmitkTensorModelParametersWidget" name="m_TensorWidget1" native="true"/>
           </item>
          </layout>
         </widget>
        </item>
        <item row="0" column="0">
         <widget class="QGroupBox" name="groupBox_2">
          <property name="title">
           <string>Data</string>
          </property>
          <layout class="QGridLayout" name="gridLayout_10">
           <item row="0" column="0" rowspan="2" colspan="2">
            <widget class="QLabel" name="m_TensorsToDWIBValueLabel_16">
             <property name="toolTip">
              <string/>
             </property>
             <property name="statusTip">
              <string/>
             </property>
             <property name="whatsThis">
              <string/>
             </property>
             <property name="text">
              <string>Fiber Bundle:</string>
             </property>
             <property name="wordWrap">
              <bool>false</bool>
             </property>
            </widget>
           </item>
           <item row="0" column="2" rowspan="2">
            <widget class="QLabel" name="m_FiberBundleLabel">
             <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>
           <item row="3" column="0" colspan="2">
            <widget class="QLabel" name="m_TensorsToDWIBValueLabel_3">
             <property name="toolTip">
              <string/>
             </property>
             <property name="statusTip">
              <string/>
             </property>
             <property name="whatsThis">
              <string/>
             </property>
             <property name="text">
              <string>Tissue Mask:</string>
             </property>
             <property name="wordWrap">
              <bool>false</bool>
             </property>
            </widget>
           </item>
           <item row="3" column="2">
            <widget class="QLabel" name="m_TissueMaskLabel">
             <property name="text">
              <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; color:#969696;&quot;&gt;optional&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="7" column="0">
         <widget class="QGroupBox" name="groupBox_6">
          <property name="title">
           <string>Extra-axonal Compartments</string>
          </property>
          <layout class="QGridLayout" name="gridLayout_14">
           <item row="6" column="0">
            <widget class="QComboBox" name="m_Compartment3Box">
             <property name="toolTip">
              <string>Select signal model for extra-axonal compartment.</string>
             </property>
             <item>
              <property name="text">
               <string>Ball Model</string>
              </property>
             </item>
             <item>
              <property name="text">
               <string>Astrosticks Model</string>
              </property>
             </item>
             <item>
              <property name="text">
               <string>Dot Model</string>
              </property>
             </item>
            </widget>
           </item>
           <item row="8" column="0">
            <widget class="QmitkAstrosticksModelParametersWidget" name="m_AstrosticksWidget1" native="true"/>
           </item>
           <item row="14" column="0">
            <widget class="QmitkAstrosticksModelParametersWidget" name="m_AstrosticksWidget2" native="true"/>
           </item>
           <item row="13" column="0">
            <widget class="QmitkBallModelParametersWidget" name="m_BallWidget2" native="true"/>
           </item>
           <item row="7" column="0">
            <widget class="QmitkBallModelParametersWidget" name="m_BallWidget1" native="true"/>
           </item>
           <item row="12" column="0">
            <widget class="QComboBox" name="m_Compartment4Box">
             <property name="toolTip">
              <string>Select signal model for extra-axonal compartment.</string>
             </property>
             <item>
              <property name="text">
               <string>--</string>
              </property>
             </item>
             <item>
              <property name="text">
               <string>Ball Model</string>
              </property>
             </item>
             <item>
              <property name="text">
               <string>Astrosticks Model</string>
              </property>
             </item>
             <item>
              <property name="text">
               <string>Dot Model</string>
              </property>
             </item>
            </widget>
           </item>
           <item row="11" column="0">
            <widget class="Line" name="line_2">
             <property name="orientation">
              <enum>Qt::Horizontal</enum>
             </property>
            </widget>
           </item>
           <item row="15" column="0">
            <widget class="QmitkDotModelParametersWidget" name="m_DotWidget2" native="true"/>
           </item>
           <item row="16" column="0">
            <widget class="QFrame" name="m_Comp4FractionFrame">
             <property name="frameShape">
              <enum>QFrame::NoFrame</enum>
             </property>
             <property name="frameShadow">
              <enum>QFrame::Raised</enum>
             </property>
             <layout class="QGridLayout" name="gridLayout_18">
              <property name="margin">
               <number>0</number>
              </property>
              <item row="0" column="1">
               <widget class="QDoubleSpinBox" name="m_Comp4FractionBox">
                <property name="toolTip">
                 <string>Weighting factor between the two extra-axonal compartments.</string>
                </property>
                <property name="maximum">
                 <double>1.000000000000000</double>
                </property>
                <property name="singleStep">
                 <double>0.100000000000000</double>
                </property>
                <property name="value">
                 <double>0.300000000000000</double>
                </property>
               </widget>
              </item>
              <item row="0" column="0">
               <widget class="QLabel" name="m_NoiseLabel_3">
                <property name="text">
                 <string>Compartment Fraction:</string>
                </property>
               </widget>
              </item>
             </layout>
            </widget>
           </item>
           <item row="9" column="0">
            <widget class="QmitkDotModelParametersWidget" name="m_DotWidget1" native="true"/>
           </item>
          </layout>
         </widget>
        </item>
        <item row="2" column="0">
         <widget class="QCommandLinkButton" name="m_GenerateImageButton">
          <property name="enabled">
           <bool>true</bool>
          </property>
          <property name="toolTip">
           <string>Start DWI generation from selected fiebr bundle. If no fiber bundle is selected, a grayscale image containing a simple gradient is generated.</string>
          </property>
          <property name="text">
           <string>Generate Image</string>
          </property>
         </widget>
        </item>
        <item row="4" column="0">
         <widget class="QGroupBox" name="groupBox">
          <property name="title">
           <string>Image Settings</string>
          </property>
          <layout class="QGridLayout" name="gridLayout">
           <item row="7" column="0">
            <widget class="QFrame" name="m_AdvancedSignalOptionsFrame">
             <property name="frameShape">
              <enum>QFrame::NoFrame</enum>
             </property>
             <property name="frameShadow">
              <enum>QFrame::Raised</enum>
             </property>
             <layout class="QGridLayout" name="gridLayout_23">
              <property name="margin">
               <number>0</number>
              </property>
              <property name="horizontalSpacing">
               <number>6</number>
              </property>
              <item row="1" column="0">
               <widget class="QLabel" name="m_TensorsToDWINumDirsLabel_5">
                <property name="text">
                 <string>Signal Scale:</string>
                </property>
               </widget>
              </item>
              <item row="6" column="0">
               <widget class="QLabel" name="m_TensorsToDWINumDirsLabel_3">
                <property name="text">
                 <string>Interpolation Shrink:</string>
                </property>
               </widget>
              </item>
              <item row="3" column="0">
               <widget class="QLabel" name="m_TensorsToDWIBValueLabel_15">
                <property name="toolTip">
                 <string/>
                </property>
                <property name="statusTip">
                 <string/>
                </property>
                <property name="whatsThis">
                 <string/>
                </property>
                <property name="text">
                 <string>Line Readout Time:  </string>
                </property>
                <property name="wordWrap">
                 <bool>false</bool>
                </property>
               </widget>
              </item>
              <item row="5" column="1">
               <widget class="QSpinBox" name="m_FiberRadius">
                <property name="toolTip">
                 <string>Fiber radius used to calculate volume fractions (in µm). Set to 0 for automatic radius estimation.</string>
                </property>
                <property name="minimum">
                 <number>0</number>
                </property>
                <property name="maximum">
                 <number>1000</number>
                </property>
                <property name="value">
                 <number>0</number>
                </property>
               </widget>
              </item>
              <item row="3" column="1">
               <widget class="QDoubleSpinBox" name="m_LineReadoutTimeBox">
                <property name="toolTip">
                 <string>T2* relaxation time (in milliseconds).</string>
                </property>
                <property name="maximum">
                 <double>100.000000000000000</double>
                </property>
                <property name="singleStep">
                 <double>0.100000000000000</double>
                </property>
                <property name="value">
                 <double>1.000000000000000</double>
                </property>
               </widget>
              </item>
              <item row="5" column="0">
               <widget class="QLabel" name="m_TensorsToDWINumDirsLabel_4">
                <property name="text">
                 <string>Fiber Radius:</string>
                </property>
               </widget>
              </item>
              <item row="4" column="1">
               <widget class="QSpinBox" name="m_T2starBox">
                <property name="toolTip">
                 <string>Relaxation time due to magnetic field inhomogeneities (T2', in milliseconds).</string>
                </property>
                <property name="minimum">
                 <number>1</number>
                </property>
                <property name="maximum">
                 <number>10000</number>
                </property>
                <property name="singleStep">
                 <number>1</number>
                </property>
                <property name="value">
                 <number>50</number>
                </property>
               </widget>
              </item>
              <item row="2" column="1">
               <widget class="QSpinBox" name="m_TEbox">
                <property name="toolTip">
                 <string>TE in milliseconds</string>
                </property>
                <property name="minimum">
                 <number>1</number>
                </property>
                <property name="maximum">
                 <number>10000</number>
                </property>
                <property name="singleStep">
                 <number>1</number>
                </property>
                <property name="value">
                 <number>100</number>
                </property>
               </widget>
              </item>
              <item row="0" column="1">
               <widget class="QSpinBox" name="m_RepetitionsBox">
                <property name="toolTip">
                 <string>Number of signal averages. Increase to reduce noise.</string>
                </property>
                <property name="minimum">
                 <number>1</number>
                </property>
                <property name="maximum">
                 <number>100</number>
                </property>
                <property name="singleStep">
                 <number>1</number>
                </property>
                <property name="value">
                 <number>1</number>
                </property>
               </widget>
              </item>
              <item row="6" column="1">
               <widget class="QSpinBox" name="m_InterpolationShrink">
                <property name="toolTip">
                 <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Large values shrink (towards nearest neighbour interpolation), small values strech interpolation function (towards linear interpolation). 1000 equals nearest neighbour interpolation.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
                </property>
                <property name="minimum">
                 <number>1</number>
                </property>
                <property name="maximum">
                 <number>1000</number>
                </property>
                <property name="value">
                 <number>1000</number>
                </property>
               </widget>
              </item>
              <item row="1" column="1">
               <widget class="QSpinBox" name="m_SignalScaleBox">
                <property name="toolTip">
                 <string>TE in milliseconds</string>
                </property>
                <property name="minimum">
                 <number>1</number>
                </property>
                <property name="maximum">
                 <number>10000</number>
                </property>
                <property name="singleStep">
                 <number>1</number>
                </property>
                <property name="value">
                 <number>100</number>
                </property>
               </widget>
              </item>
              <item row="0" column="0">
               <widget class="QLabel" name="m_TensorsToDWINumDirsLabel_2">
                <property name="text">
                 <string>Repetitions:</string>
                </property>
               </widget>
              </item>
              <item row="9" column="0">
               <widget class="QCheckBox" name="m_KspaceImageBox">
                <property name="text">
                 <string>Output k-Space Image</string>
                </property>
                <property name="checked">
                 <bool>false</bool>
                </property>
               </widget>
              </item>
              <item row="2" column="0">
               <widget class="QLabel" name="m_TensorsToDWIBValueLabel_13">
                <property name="toolTip">
                 <string/>
                </property>
                <property name="statusTip">
                 <string/>
                </property>
                <property name="whatsThis">
                 <string/>
                </property>
                <property name="text">
                 <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Echo Time &lt;span style=&quot; font-style:italic;&quot;&gt;TE&lt;/span&gt;:  &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
                </property>
                <property name="wordWrap">
                 <bool>false</bool>
                </property>
               </widget>
              </item>
              <item row="8" column="0">
               <widget class="QCheckBox" name="m_EnforcePureFiberVoxelsBox">
                <property name="toolTip">
                 <string>Disable partial volume. Treat voxel content as fiber-only if at least one fiber is present.</string>
                </property>
                <property name="text">
                 <string>Disable Partial Volume Effects</string>
                </property>
                <property name="checked">
                 <bool>false</bool>
                </property>
               </widget>
              </item>
              <item row="4" column="0">
               <widget class="QLabel" name="m_TensorsToDWIBValueLabel_12">
                <property name="toolTip">
                 <string/>
                </property>
                <property name="statusTip">
                 <string/>
                </property>
                <property name="whatsThis">
                 <string/>
                </property>
                <property name="text">
                 <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;T&lt;/span&gt;&lt;span style=&quot; font-style:italic; vertical-align:sub;&quot;&gt;inhom&lt;/span&gt; Relaxation: &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
                </property>
                <property name="wordWrap">
                 <bool>false</bool>
                </property>
               </widget>
              </item>
              <item row="7" column="0">
               <widget class="QCheckBox" name="m_RelaxationBox">
                <property name="toolTip">
                 <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;TE&lt;/span&gt;, &lt;span style=&quot; font-style:italic;&quot;&gt;T&lt;/span&gt;&lt;span style=&quot; font-style:italic; vertical-align:sub;&quot;&gt;inhom&lt;/span&gt; and &lt;span style=&quot; font-style:italic;&quot;&gt;T2&lt;/span&gt; will have no effect if unchecked.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
                </property>
                <property name="text">
                 <string>Simulate Signal Relaxation</string>
                </property>
                <property name="checked">
                 <bool>true</bool>
                </property>
               </widget>
              </item>
              <item row="10" column="0">
               <widget class="QCheckBox" name="m_VolumeFractionsBox">
                <property name="toolTip">
-                <string>Output one image per compartment containing the corresponding volume fractions (in mm³) per voxel.</string>
+                <string>Output one image per compartment containing the corresponding volume fractions per voxel.</string>
                </property>
                <property name="text">
                 <string>Output Volume Fractions</string>
                </property>
                <property name="checked">
                 <bool>false</bool>
                </property>
               </widget>
              </item>
             </layout>
            </widget>
           </item>
           <item row="2" column="0">
            <widget class="QLabel" name="m_GeometryMessage">
             <property name="styleSheet">
              <string notr="true">color: rgb(255, 0, 0);</string>
             </property>
             <property name="text">
              <string>Using  geometry of selected image!</string>
             </property>
            </widget>
           </item>
           <item row="4" column="0">
            <widget class="QLabel" name="m_DiffusionPropsMessage">
             <property name="styleSheet">
              <string notr="true">color: rgb(255, 0, 0);</string>
             </property>
             <property name="text">
              <string>Using  gradients of selected DWI!</string>
             </property>
            </widget>
           </item>
           <item row="3" column="0">
            <widget class="QFrame" name="m_GeometryFrame">
             <property name="frameShape">
              <enum>QFrame::NoFrame</enum>
             </property>
             <property name="frameShadow">
              <enum>QFrame::Raised</enum>
             </property>
             <layout class="QGridLayout" name="gridLayout_7">
              <property name="margin">
               <number>0</number>
              </property>
              <item row="2" column="2">
               <widget class="QDoubleSpinBox" name="m_SpacingY">
                <property name="decimals">
                 <number>3</number>
                </property>
                <property name="minimum">
                 <double>0.100000000000000</double>
                </property>
                <property name="maximum">
                 <double>50.000000000000000</double>
                </property>
                <property name="singleStep">
                 <double>0.100000000000000</double>
                </property>
                <property name="value">
                 <double>2.000000000000000</double>
                </property>
               </widget>
              </item>
              <item row="2" column="0">
               <widget class="QLabel" name="label_2">
                <property name="text">
                 <string>Image Spacing:</string>
                </property>
               </widget>
              </item>
              <item row="2" column="3">
               <widget class="QDoubleSpinBox" name="m_SpacingZ">
                <property name="decimals">
                 <number>3</number>
                </property>
                <property name="minimum">
                 <double>0.100000000000000</double>
                </property>
                <property name="maximum">
                 <double>50.000000000000000</double>
                </property>
                <property name="singleStep">
                 <double>0.100000000000000</double>
                </property>
                <property name="value">
                 <double>2.000000000000000</double>
                </property>
               </widget>
              </item>
              <item row="2" column="1">
               <widget class="QDoubleSpinBox" name="m_SpacingX">
                <property name="decimals">
                 <number>3</number>
                </property>
                <property name="minimum">
                 <double>0.100000000000000</double>
                </property>
                <property name="maximum">
                 <double>50.000000000000000</double>
                </property>
                <property name="singleStep">
                 <double>0.100000000000000</double>
                </property>
                <property name="value">
                 <double>2.000000000000000</double>
                </property>
               </widget>
              </item>
              <item row="0" column="0">
               <widget class="QLabel" name="label">
                <property name="text">
                 <string>Image Dimensions:</string>
                </property>
               </widget>
              </item>
              <item row="0" column="1">
               <widget class="QSpinBox" name="m_SizeX">
                <property name="toolTip">
                 <string>Fiber sampling factor which determines the accuracy of the calculated fiber and non-fiber volume fractions.</string>
                </property>
                <property name="minimum">
                 <number>1</number>
                </property>
                <property name="maximum">
                 <number>1000</number>
                </property>
                <property name="singleStep">
                 <number>1</number>
                </property>
                <property name="value">
                 <number>11</number>
                </property>
               </widget>
              </item>
              <item row="0" column="2">
               <widget class="QSpinBox" name="m_SizeY">
                <property name="toolTip">
                 <string>Fiber sampling factor which determines the accuracy of the calculated fiber and non-fiber volume fractions.</string>
                </property>
                <property name="minimum">
                 <number>1</number>
                </property>
                <property name="maximum">
                 <number>1000</number>
                </property>
                <property name="singleStep">
                 <number>1</number>
                </property>
                <property name="value">
                 <number>11</number>
                </property>
               </widget>
              </item>
              <item row="0" column="3">
               <widget class="QSpinBox" name="m_SizeZ">
                <property name="toolTip">
                 <string>Fiber sampling factor which determines the accuracy of the calculated fiber and non-fiber volume fractions.</string>
                </property>
                <property name="minimum">
                 <number>1</number>
                </property>
                <property name="maximum">
                 <number>1000</number>
                </property>
                <property name="singleStep">
                 <number>1</number>
                </property>
                <property name="value">
                 <number>3</number>
                </property>
               </widget>
              </item>
             </layout>
            </widget>
           </item>
           <item row="5" column="0">
            <widget class="QFrame" name="m_TensorsToDWIFrame">
             <property name="frameShape">
              <enum>QFrame::NoFrame</enum>
             </property>
             <property name="frameShadow">
              <enum>QFrame::Raised</enum>
             </property>
             <layout class="QGridLayout" name="gridLayout_24">
              <property name="margin">
               <number>0</number>
              </property>
              <property name="spacing">
               <number>6</number>
              </property>
              <item row="0" column="0">
               <widget class="QLabel" name="m_TensorsToDWINumDirsLabel">
                <property name="text">
                 <string>Gradient Directions:</string>
                </property>
               </widget>
              </item>
              <item row="0" column="1">
               <widget class="QSpinBox" name="m_NumGradientsBox">
                <property name="toolTip">
                 <string>Number of gradient directions distributed over the half sphere.</string>
                </property>
                <property name="minimum">
                 <number>0</number>
                </property>
                <property name="maximum">
                 <number>10000</number>
                </property>
                <property name="singleStep">
                 <number>1</number>
                </property>
                <property name="value">
                 <number>30</number>
                </property>
               </widget>
              </item>
              <item row="1" column="0">
               <widget class="QLabel" name="m_TensorsToDWIBValueLabel">
                <property name="toolTip">
                 <string/>
                </property>
                <property name="statusTip">
                 <string/>
                </property>
                <property name="whatsThis">
                 <string/>
                </property>
                <property name="text">
                 <string>b-Value:</string>
                </property>
                <property name="wordWrap">
                 <bool>false</bool>
                </property>
               </widget>
              </item>
              <item row="1" column="1">
               <widget class="QSpinBox" name="m_BvalueBox">
                <property name="toolTip">
                 <string>b-value in mm/s²</string>
                </property>
                <property name="minimum">
                 <number>0</number>
                </property>
                <property name="maximum">
                 <number>10000</number>
                </property>
                <property name="singleStep">
                 <number>100</number>
                </property>
                <property name="value">
                 <number>1000</number>
                </property>
               </widget>
              </item>
             </layout>
            </widget>
           </item>
           <item row="6" column="0">
            <widget class="QCheckBox" name="m_AdvancedOptionsBox_2">
             <property name="text">
              <string>Advanced Options</string>
             </property>
            </widget>
           </item>
          </layout>
         </widget>
        </item>
        <item row="10" column="0">
         <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="9" column="0">
         <widget class="QGroupBox" name="groupBox_3">
          <property name="title">
           <string>Noise and other Artifacts</string>
          </property>
          <layout class="QGridLayout" name="gridLayout_6">
           <item row="8" column="0">
            <widget class="QFrame" name="m_GibbsRingingFrame">
             <property name="enabled">
              <bool>true</bool>
             </property>
             <property name="frameShape">
              <enum>QFrame::NoFrame</enum>
             </property>
             <property name="frameShadow">
              <enum>QFrame::Raised</enum>
             </property>
             <layout class="QFormLayout" name="formLayout_4">
              <property name="horizontalSpacing">
               <number>6</number>
              </property>
              <property name="margin">
               <number>0</number>
              </property>
              <item row="0" column="0">
               <widget class="QLabel" name="m_TensorsToDWIBValueLabel_14">
                <property name="toolTip">
                 <string/>
                </property>
                <property name="statusTip">
                 <string/>
                </property>
                <property name="whatsThis">
                 <string/>
                </property>
                <property name="text">
                 <string>k-Space Undersampling:</string>
                </property>
                <property name="wordWrap">
                 <bool>false</bool>
                </property>
               </widget>
              </item>
              <item row="0" column="1">
               <widget class="QComboBox" name="m_KspaceUndersamplingBox">
                <property name="toolTip">
                 <string>Image is upsampled using this factor, afterwards fourier transformed, cropped to the original size and then inverse fourier transformed.</string>
                </property>
                <property name="currentIndex">
                 <number>0</number>
                </property>
                <item>
                 <property name="text">
                  <string>2</string>
                 </property>
                </item>
                <item>
                 <property name="text">
                  <string>4</string>
                 </property>
                </item>
                <item>
                 <property name="text">
                  <string>8</string>
                 </property>
                </item>
                <item>
                 <property name="text">
                  <string>16</string>
                 </property>
                </item>
                <item>
                 <property name="text">
                  <string>32</string>
                 </property>
                </item>
                <item>
                 <property name="text">
                  <string>64</string>
                 </property>
                </item>
                <item>
                 <property name="text">
                  <string>128</string>
                 </property>
                </item>
                <item>
                 <property name="text">
                  <string>256</string>
                 </property>
                </item>
               </widget>
              </item>
             </layout>
            </widget>
           </item>
           <item row="5" column="0">
            <widget class="QCheckBox" name="m_AddDistortions">
             <property name="text">
              <string>Add Distortions</string>
             </property>
             <property name="checked">
              <bool>false</bool>
             </property>
            </widget>
           </item>
           <item row="7" column="0">
            <widget class="QCheckBox" name="m_AddGibbsRinging">
             <property name="text">
              <string>Add Gibbs Ringing</string>
             </property>
             <property name="checked">
              <bool>false</bool>
             </property>
            </widget>
           </item>
           <item row="0" column="0">
            <widget class="QCheckBox" name="m_AddNoise">
             <property name="text">
              <string>Add Rician Noise</string>
             </property>
             <property name="checked">
              <bool>true</bool>
             </property>
            </widget>
           </item>
           <item row="1" column="0">
            <widget class="QFrame" name="m_NoiseFrame">
             <property name="frameShape">
              <enum>QFrame::NoFrame</enum>
             </property>
             <property name="frameShadow">
              <enum>QFrame::Raised</enum>
             </property>
             <layout class="QFormLayout" name="formLayout_5">
              <property name="margin">
               <number>0</number>
              </property>
              <item row="0" column="0">
               <widget class="QLabel" name="m_NoiseLabel">
                <property name="text">
                 <string>Variance:</string>
                </property>
               </widget>
              </item>
              <item row="0" column="1">
               <widget class="QDoubleSpinBox" name="m_NoiseLevel">
                <property name="toolTip">
                 <string>Variance of Rician noise model.</string>
                </property>
                <property name="decimals">
                 <number>4</number>
                </property>
                <property name="minimum">
                 <double>0.000000000000000</double>
                </property>
                <property name="maximum">
                 <double>100000.000000000000000</double>
                </property>
                <property name="singleStep">
                 <double>0.001000000000000</double>
                </property>
                <property name="value">
                 <double>25.000000000000000</double>
                </property>
               </widget>
              </item>
             </layout>
            </widget>
           </item>
           <item row="3" column="0">
            <widget class="QCheckBox" name="m_AddGhosts">
             <property name="text">
              <string>Add N/2 Ghosts</string>
             </property>
             <property name="checked">
              <bool>false</bool>
             </property>
            </widget>
           </item>
           <item row="4" column="0">
            <widget class="QFrame" name="m_GhostFrame">
             <property name="enabled">
              <bool>true</bool>
             </property>
             <property name="frameShape">
              <enum>QFrame::NoFrame</enum>
             </property>
             <property name="frameShadow">
              <enum>QFrame::Raised</enum>
             </property>
             <layout class="QFormLayout" name="formLayout_6">
              <property name="horizontalSpacing">
               <number>6</number>
              </property>
              <property name="margin">
               <number>0</number>
              </property>
              <item row="0" column="0">
               <widget class="QLabel" name="m_TensorsToDWIBValueLabel_23">
                <property name="toolTip">
                 <string/>
                </property>
                <property name="statusTip">
                 <string/>
                </property>
                <property name="whatsThis">
                 <string/>
                </property>
                <property name="text">
                 <string>K-Space Line Offset:</string>
                </property>
                <property name="wordWrap">
                 <bool>false</bool>
                </property>
               </widget>
              </item>
              <item row="0" column="1">
               <widget class="QDoubleSpinBox" name="m_kOffsetBox">
                <property name="toolTip">
                 <string>A larger offset increases the inensity of the ghost image.</string>
                </property>
                <property name="decimals">
                 <number>3</number>
                </property>
                <property name="maximum">
                 <double>1.000000000000000</double>
                </property>
                <property name="singleStep">
                 <double>0.010000000000000</double>
                </property>
                <property name="value">
                 <double>0.100000000000000</double>
                </property>
               </widget>
              </item>
             </layout>
            </widget>
           </item>
           <item row="6" column="0">
            <widget class="QFrame" name="m_DistortionsFrame">
             <property name="enabled">
              <bool>true</bool>
             </property>
             <property name="frameShape">
              <enum>QFrame::NoFrame</enum>
             </property>
             <property name="frameShadow">
              <enum>QFrame::Raised</enum>
             </property>
             <layout class="QFormLayout" name="formLayout_7">
              <property name="horizontalSpacing">
               <number>6</number>
              </property>
              <property name="margin">
               <number>0</number>
              </property>
              <item row="0" column="0">
               <widget class="QLabel" name="m_TensorsToDWIBValueLabel_25">
                <property name="toolTip">
                 <string/>
                </property>
                <property name="statusTip">
                 <string/>
                </property>
                <property name="whatsThis">
                 <string/>
                </property>
                <property name="text">
                 <string>Frequency Map:</string>
                </property>
                <property name="wordWrap">
                 <bool>false</bool>
                </property>
               </widget>
              </item>
              <item row="0" column="1">
               <widget class="QmitkDataStorageComboBox" name="m_FrequencyMapBox">
                <property name="toolTip">
                 <string>Select image specifying the frequency inhomogeneities (in Hz).</string>
                </property>
               </widget>
              </item>
             </layout>
            </widget>
           </item>
          </layout>
         </widget>
        </item>
        <item row="6" column="0">
         <widget class="QGroupBox" name="groupBox_5">
          <property name="title">
           <string>Inter-axonal Compartment</string>
          </property>
          <layout class="QGridLayout" name="gridLayout_17">
           <item row="3" column="0">
            <widget class="QmitkTensorModelParametersWidget" name="m_TensorWidget2" native="true"/>
           </item>
           <item row="1" column="0">
            <widget class="QmitkZeppelinModelParametersWidget" name="m_ZeppelinWidget2" native="true"/>
           </item>
           <item row="0" column="0">
            <widget class="QComboBox" name="m_Compartment2Box">
             <property name="toolTip">
              <string>Select signal model for intra-axonal compartment.</string>
             </property>
             <item>
              <property name="text">
               <string>--</string>
              </property>
             </item>
             <item>
              <property name="text">
               <string>Stick Model</string>
              </property>
             </item>
             <item>
              <property name="text">
               <string>Zeppelin Model</string>
              </property>
             </item>
             <item>
              <property name="text">
               <string>Tensor Model</string>
              </property>
             </item>
            </widget>
           </item>
           <item row="2" column="0">
            <widget class="QmitkStickModelParametersWidget" name="m_StickWidget2" native="true"/>
           </item>
          </layout>
         </widget>
        </item>
       </layout>
      </widget>
     </widget>
    </item>
   </layout>
  </widget>
  <customwidgets>
   <customwidget>
    <class>QmitkTensorModelParametersWidget</class>
    <extends>QWidget</extends>
    <header location="global">QmitkTensorModelParametersWidget.h</header>
    <container>1</container>
   </customwidget>
   <customwidget>
    <class>QmitkStickModelParametersWidget</class>
    <extends>QWidget</extends>
    <header location="global">QmitkStickModelParametersWidget.h</header>
    <container>1</container>
   </customwidget>
   <customwidget>
    <class>QmitkZeppelinModelParametersWidget</class>
    <extends>QWidget</extends>
    <header location="global">QmitkZeppelinModelParametersWidget.h</header>
    <container>1</container>
   </customwidget>
   <customwidget>
    <class>QmitkBallModelParametersWidget</class>
    <extends>QWidget</extends>
    <header location="global">QmitkBallModelParametersWidget.h</header>
    <container>1</container>
   </customwidget>
   <customwidget>
    <class>QmitkAstrosticksModelParametersWidget</class>
    <extends>QWidget</extends>
    <header location="global">QmitkAstrosticksModelParametersWidget.h</header>
    <container>1</container>
   </customwidget>
   <customwidget>
    <class>QmitkDotModelParametersWidget</class>
    <extends>QWidget</extends>
    <header>QmitkDotModelParametersWidget.h</header>
    <container>1</container>
   </customwidget>
   <customwidget>
    <class>QmitkDataStorageComboBox</class>
    <extends>QComboBox</extends>
    <header location="global">QmitkDataStorageComboBox.h</header>
   </customwidget>
  </customwidgets>
  <tabstops>
   <tabstop>m_CircleButton</tabstop>
   <tabstop>m_FlipButton</tabstop>
   <tabstop>m_RealTimeFibers</tabstop>
   <tabstop>m_AdvancedOptionsBox</tabstop>
   <tabstop>m_DistributionBox</tabstop>
   <tabstop>m_VarianceBox</tabstop>
   <tabstop>m_FiberDensityBox</tabstop>
   <tabstop>m_FiberSamplingBox</tabstop>
   <tabstop>m_TensionBox</tabstop>
   <tabstop>m_ContinuityBox</tabstop>
   <tabstop>m_BiasBox</tabstop>
   <tabstop>m_GenerateFibersButton</tabstop>
   <tabstop>m_ConstantRadiusBox</tabstop>
   <tabstop>m_AlignOnGrid</tabstop>
   <tabstop>m_XrotBox</tabstop>
   <tabstop>m_YrotBox</tabstop>
   <tabstop>m_ZrotBox</tabstop>
   <tabstop>m_XtransBox</tabstop>
   <tabstop>m_YtransBox</tabstop>
   <tabstop>m_ZtransBox</tabstop>
   <tabstop>m_XscaleBox</tabstop>
   <tabstop>m_YscaleBox</tabstop>
   <tabstop>m_ZscaleBox</tabstop>
   <tabstop>m_TransformBundlesButton</tabstop>
   <tabstop>m_CopyBundlesButton</tabstop>
   <tabstop>m_JoinBundlesButton</tabstop>
   <tabstop>m_IncludeFiducials</tabstop>
   <tabstop>m_GenerateImageButton</tabstop>
   <tabstop>m_SizeX</tabstop>
   <tabstop>m_SizeY</tabstop>
   <tabstop>m_SizeZ</tabstop>
   <tabstop>m_SpacingX</tabstop>
   <tabstop>m_SpacingY</tabstop>
   <tabstop>m_SpacingZ</tabstop>
   <tabstop>m_NumGradientsBox</tabstop>
   <tabstop>m_BvalueBox</tabstop>
   <tabstop>m_AdvancedOptionsBox_2</tabstop>
   <tabstop>m_RepetitionsBox</tabstop>
   <tabstop>m_SignalScaleBox</tabstop>
   <tabstop>m_TEbox</tabstop>
   <tabstop>m_LineReadoutTimeBox</tabstop>
   <tabstop>m_T2starBox</tabstop>
   <tabstop>m_FiberRadius</tabstop>
   <tabstop>m_InterpolationShrink</tabstop>
   <tabstop>m_EnforcePureFiberVoxelsBox</tabstop>
   <tabstop>m_KspaceImageBox</tabstop>
   <tabstop>m_Compartment1Box</tabstop>
   <tabstop>m_Compartment2Box</tabstop>
   <tabstop>m_Compartment3Box</tabstop>
   <tabstop>m_Compartment4Box</tabstop>
   <tabstop>m_Comp4FractionBox</tabstop>
   <tabstop>m_AddNoise</tabstop>
   <tabstop>m_NoiseLevel</tabstop>
   <tabstop>m_AddGhosts</tabstop>
   <tabstop>m_kOffsetBox</tabstop>
   <tabstop>m_AddDistortions</tabstop>
   <tabstop>m_FrequencyMapBox</tabstop>
   <tabstop>m_AddGibbsRinging</tabstop>
   <tabstop>m_KspaceUndersamplingBox</tabstop>
   <tabstop>tabWidget</tabstop>
  </tabstops>
  <resources>
   <include location="../../resources/QmitkDiffusionImaging.qrc"/>
  </resources>
  <connections/>
 </ui>