Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
Home
Manual
API Reference
Download
Bugzilla
Groups
Namespace List
Class List
File List
Examples
File List
File Members
mitkChiSquareNoiseModel.cpp
Go to the documentation of this file.
1
/*===================================================================
2
3
The Medical Imaging Interaction Toolkit (MITK)
4
5
Copyright (c) German Cancer Research Center,
6
Division of Medical and Biological Informatics.
7
All rights reserved.
8
9
This software is distributed WITHOUT ANY WARRANTY; without
10
even the implied warranty of MERCHANTABILITY or FITNESS FOR
11
A PARTICULAR PURPOSE.
12
13
See LICENSE.txt or http://www.mitk.org for details.
14
15
===================================================================*/
16
#include <vnl/vnl_cross.h>
17
#include <vnl/vnl_quaternion.h>
18
#include <
mitkChiSquareNoiseModel.h
>
19
20
using namespace
mitk
;
21
22
template
<
class
ScalarType >
23
ChiSquareNoiseModel< ScalarType >::ChiSquareNoiseModel
()
24
{
25
m_RandGen.seed();
26
}
27
28
template
<
class
ScalarType >
29
ChiSquareNoiseModel< ScalarType >::~ChiSquareNoiseModel
()
30
{
31
32
}
33
34
template
<
class
ScalarType >
35
void
ChiSquareNoiseModel< ScalarType >::SetSeed
(
int
seed)
36
{
37
if
(seed>=0)
38
m_RandGen.seed(seed);
39
else
40
m_RandGen.seed();
41
}
42
43
template
<
class
ScalarType >
44
void
ChiSquareNoiseModel< ScalarType >::AddNoise
(
PixelType
& pixel)
45
{
46
for
(
unsigned
int
i=0; i<pixel.Size(); i++)
47
pixel[i] += (
ScalarType
)(m_Distribution(m_RandGen)-m_Distribution.n());
48
}
mitkChiSquareNoiseModel.h
mitk::ChiSquareNoiseModel::ChiSquareNoiseModel
ChiSquareNoiseModel()
Definition:
mitkChiSquareNoiseModel.cpp:23
mitk::ScalarType
double ScalarType
Definition:
mitkNumericConstants.h:24
mitk
DataCollection - Class to facilitate loading/accessing structured data.
Definition:
GeometryOverview.dox:1
itk::VariableLengthVector
Definition:
mitkPixelTypeTraits.h:38
mitk::ChiSquareNoiseModel::SetSeed
void SetSeed(int seed)
seed for random number generator
Definition:
mitkChiSquareNoiseModel.cpp:35
mitk::ChiSquareNoiseModel::AddNoise
void AddNoise(PixelType &pixel)
Definition:
mitkChiSquareNoiseModel.cpp:44
mitk::ChiSquareNoiseModel::~ChiSquareNoiseModel
~ChiSquareNoiseModel()
Definition:
mitkChiSquareNoiseModel.cpp:29
git
MITK
Modules
DiffusionImaging
FiberTracking
Fiberfox
SignalModels
mitkChiSquareNoiseModel.cpp
Generated on Fri Feb 3 2017 20:51:54 for Medical Imaging Interaction Toolkit by
1.8.9.1