Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitk::MetropolisHastingsSampler Class Reference

Generates ne proposals of particle configurations. More...

#include <mitkMetropolisHastingsSampler.h>

Collaboration diagram for mitk::MetropolisHastingsSampler:

Public Types

typedef itk::Image< float, 3 > ItkFloatImageType
 
typedef itk::Statistics::MersenneTwisterRandomVariateGenerator ItkRandGenType
 

Public Member Functions

 MetropolisHastingsSampler (ParticleGrid *grid, EnergyComputer *enComp, ItkRandGenType *randGen, float curvThres)
 
void SetTemperature (float val)
 
void MakeProposal ()
 make proposal for birth/death/shift/connection of particles More...
 
int GetNumAcceptedProposals ()
 
void SetProbabilities (float birth, float death, float shift, float optShift, float connect)
 update the probabilities of the single proposals More...
 
void PrintProposalTimes ()
 print the state of the proposal time probes More...
 

Protected Member Functions

void ImplementTrack (Track &T)
 
void RemoveAndSaveTrack (EndPoint P)
 
void MakeTrackProposal (EndPoint P)
 
void ComputeEndPointProposalDistribution (EndPoint P)
 
void DistortVector (float sigma, vnl_vector_fixed< float, 3 > &vec)
 
vnl_vector_fixed< float, 3 > GetRandomDirection ()
 

Protected Attributes

ItkRandGenTypem_RandGen
 random generator More...
 
Track m_ProposalTrack
 stores proposal track More...
 
Track m_BackupTrack
 stores track removed for new proposal traCK More...
 
SimpSamp m_SimpSamp
 neighbouring particles and their probabilities for the local tracking More...
 
float m_InTemp
 simulated annealing temperature More...
 
float m_ExTemp
 simulated annealing temperature More...
 
float m_Density
 
float m_BirthProb
 probability for particle birth More...
 
float m_DeathProb
 probability for particle death More...
 
float m_ShiftProb
 probability for particle shift More...
 
float m_OptShiftProb
 probability for optimal particle shift More...
 
float m_ConnectionProb
 probability for particle connection proposal More...
 
float m_Sigma
 
float m_Gamma
 
float m_Z
 
float m_DistanceThreshold
 threshold for maximum distance between connected particles More...
 
float m_CurvatureThreshold
 threshold for maximum angle between connected particles More...
 
float m_TractProb
 
float m_StopProb
 
float m_DelProb
 
float m_ParticleLength
 
float m_ChempotParticle
 
ParticleGridm_ParticleGrid
 storest all particles More...
 
EnergyComputerm_EnergyComputer
 computes internal and external energy of particles More...
 
unsigned int m_AcceptedProposals
 counts accepted proposals More...
 
itk::TimeProbe m_BirthTime
 
itk::TimeProbe m_DeathTime
 
itk::TimeProbe m_ShiftTime
 
itk::TimeProbe m_OptShiftTime
 
itk::TimeProbe m_ConnectionTime
 

Detailed Description

Generates ne proposals of particle configurations.

Definition at line 40 of file mitkMetropolisHastingsSampler.h.

Member Typedef Documentation

typedef itk::Statistics::MersenneTwisterRandomVariateGenerator mitk::MetropolisHastingsSampler::ItkRandGenType

Definition at line 45 of file mitkMetropolisHastingsSampler.h.

Constructor & Destructor Documentation

MetropolisHastingsSampler::MetropolisHastingsSampler ( ParticleGrid grid,
EnergyComputer enComp,
ItkRandGenType randGen,
float  curvThres 
)

Member Function Documentation

void MetropolisHastingsSampler::DistortVector ( float  sigma,
vnl_vector_fixed< float, 3 > &  vec 
)
protected

generate random vectors

Definition at line 91 of file mitkMetropolisHastingsSampler.cpp.

References m_RandGen.

Referenced by MakeProposal().

int MetropolisHastingsSampler::GetNumAcceptedProposals ( )
vnl_vector_fixed< float, 3 > MetropolisHastingsSampler::GetRandomDirection ( )
protected

Definition at line 99 of file mitkMetropolisHastingsSampler.cpp.

References m_RandGen.

Referenced by MakeProposal().

void MetropolisHastingsSampler::ImplementTrack ( Track T)
protected

connection proposal related methods

Definition at line 310 of file mitkMetropolisHastingsSampler.cpp.

References mitk::ParticleGrid::CreateConnection(), mitk::Track::m_Length, m_ParticleGrid, and mitk::Track::track.

Referenced by MakeProposal().

void MetropolisHastingsSampler::PrintProposalTimes ( )

print the state of the proposal time probes

Definition at line 72 of file mitkMetropolisHastingsSampler.cpp.

References m_BirthTime, m_ConnectionTime, m_DeathTime, m_OptShiftTime, and m_ShiftTime.

void MetropolisHastingsSampler::SetProbabilities ( float  birth,
float  death,
float  shift,
float  optShift,
float  connect 
)

update the probabilities of the single proposals

Definition at line 47 of file mitkMetropolisHastingsSampler.cpp.

References mitk::eps, m_BirthProb, m_ConnectionProb, m_DeathProb, m_OptShiftProb, and m_ShiftProb.

void MetropolisHastingsSampler::SetTemperature ( float  val)

Member Data Documentation

unsigned int mitk::MetropolisHastingsSampler::m_AcceptedProposals
protected

counts accepted proposals

Definition at line 96 of file mitkMetropolisHastingsSampler.h.

Referenced by GetNumAcceptedProposals(), and MakeProposal().

Track mitk::MetropolisHastingsSampler::m_BackupTrack
protected

stores track removed for new proposal traCK

Definition at line 69 of file mitkMetropolisHastingsSampler.h.

Referenced by MakeProposal(), and RemoveAndSaveTrack().

float mitk::MetropolisHastingsSampler::m_BirthProb
protected

probability for particle birth

Definition at line 76 of file mitkMetropolisHastingsSampler.h.

Referenced by MakeProposal(), and SetProbabilities().

itk::TimeProbe mitk::MetropolisHastingsSampler::m_BirthTime
protected

Time probes for the single proposals

Definition at line 99 of file mitkMetropolisHastingsSampler.h.

Referenced by MakeProposal(), and PrintProposalTimes().

float mitk::MetropolisHastingsSampler::m_ChempotParticle
protected

Definition at line 92 of file mitkMetropolisHastingsSampler.h.

Referenced by SetTemperature().

float mitk::MetropolisHastingsSampler::m_ConnectionProb
protected

probability for particle connection proposal

Definition at line 80 of file mitkMetropolisHastingsSampler.h.

Referenced by SetProbabilities().

itk::TimeProbe mitk::MetropolisHastingsSampler::m_ConnectionTime
protected

Definition at line 103 of file mitkMetropolisHastingsSampler.h.

Referenced by MakeProposal(), and PrintProposalTimes().

float mitk::MetropolisHastingsSampler::m_CurvatureThreshold
protected

threshold for maximum angle between connected particles

Definition at line 87 of file mitkMetropolisHastingsSampler.h.

Referenced by ComputeEndPointProposalDistribution(), and MetropolisHastingsSampler().

float mitk::MetropolisHastingsSampler::m_DeathProb
protected

probability for particle death

Definition at line 77 of file mitkMetropolisHastingsSampler.h.

Referenced by MakeProposal(), and SetProbabilities().

itk::TimeProbe mitk::MetropolisHastingsSampler::m_DeathTime
protected

Definition at line 100 of file mitkMetropolisHastingsSampler.h.

Referenced by MakeProposal(), and PrintProposalTimes().

float mitk::MetropolisHastingsSampler::m_DelProb
protected

Definition at line 90 of file mitkMetropolisHastingsSampler.h.

Referenced by MakeProposal(), and RemoveAndSaveTrack().

float mitk::MetropolisHastingsSampler::m_Density
protected

Definition at line 74 of file mitkMetropolisHastingsSampler.h.

Referenced by MakeProposal(), and SetTemperature().

float mitk::MetropolisHastingsSampler::m_DistanceThreshold
protected

threshold for maximum distance between connected particles

Definition at line 86 of file mitkMetropolisHastingsSampler.h.

Referenced by ComputeEndPointProposalDistribution(), and MetropolisHastingsSampler().

EnergyComputer* mitk::MetropolisHastingsSampler::m_EnergyComputer
protected

computes internal and external energy of particles

Definition at line 95 of file mitkMetropolisHastingsSampler.h.

Referenced by ComputeEndPointProposalDistribution(), MakeProposal(), MakeTrackProposal(), MetropolisHastingsSampler(), and RemoveAndSaveTrack().

float mitk::MetropolisHastingsSampler::m_ExTemp
protected

simulated annealing temperature

Definition at line 73 of file mitkMetropolisHastingsSampler.h.

Referenced by MakeProposal().

float mitk::MetropolisHastingsSampler::m_Gamma
protected

Definition at line 83 of file mitkMetropolisHastingsSampler.h.

Referenced by MakeProposal(), and MetropolisHastingsSampler().

float mitk::MetropolisHastingsSampler::m_InTemp
protected

simulated annealing temperature

Definition at line 72 of file mitkMetropolisHastingsSampler.h.

Referenced by MakeProposal(), and SetTemperature().

float mitk::MetropolisHastingsSampler::m_OptShiftProb
protected

probability for optimal particle shift

Definition at line 79 of file mitkMetropolisHastingsSampler.h.

Referenced by MakeProposal(), and SetProbabilities().

itk::TimeProbe mitk::MetropolisHastingsSampler::m_OptShiftTime
protected

Definition at line 102 of file mitkMetropolisHastingsSampler.h.

Referenced by MakeProposal(), and PrintProposalTimes().

ParticleGrid* mitk::MetropolisHastingsSampler::m_ParticleGrid
protected
float mitk::MetropolisHastingsSampler::m_ParticleLength
protected
Track mitk::MetropolisHastingsSampler::m_ProposalTrack
protected

stores proposal track

Definition at line 68 of file mitkMetropolisHastingsSampler.h.

Referenced by MakeProposal(), and MakeTrackProposal().

ItkRandGenType* mitk::MetropolisHastingsSampler::m_RandGen
protected
float mitk::MetropolisHastingsSampler::m_ShiftProb
protected

probability for particle shift

Definition at line 78 of file mitkMetropolisHastingsSampler.h.

Referenced by MakeProposal(), and SetProbabilities().

itk::TimeProbe mitk::MetropolisHastingsSampler::m_ShiftTime
protected

Definition at line 101 of file mitkMetropolisHastingsSampler.h.

Referenced by MakeProposal(), and PrintProposalTimes().

float mitk::MetropolisHastingsSampler::m_Sigma
protected

Definition at line 82 of file mitkMetropolisHastingsSampler.h.

Referenced by MakeProposal(), and MetropolisHastingsSampler().

SimpSamp mitk::MetropolisHastingsSampler::m_SimpSamp
protected

neighbouring particles and their probabilities for the local tracking

Definition at line 70 of file mitkMetropolisHastingsSampler.h.

Referenced by ComputeEndPointProposalDistribution(), MakeTrackProposal(), and RemoveAndSaveTrack().

float mitk::MetropolisHastingsSampler::m_StopProb
protected
float mitk::MetropolisHastingsSampler::m_TractProb
protected
float mitk::MetropolisHastingsSampler::m_Z
protected

Definition at line 84 of file mitkMetropolisHastingsSampler.h.

Referenced by MakeProposal(), and MetropolisHastingsSampler().


The documentation for this class was generated from the following files: