Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
Generates ne proposals of particle configurations. More...
#include <mitkMetropolisHastingsSampler.h>
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 | |
ItkRandGenType * | m_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 |
ParticleGrid * | m_ParticleGrid |
storest all particles More... | |
EnergyComputer * | m_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 |
Generates ne proposals of particle configurations.
Definition at line 40 of file mitkMetropolisHastingsSampler.h.
typedef itk::Image< float, 3 > mitk::MetropolisHastingsSampler::ItkFloatImageType |
Definition at line 44 of file mitkMetropolisHastingsSampler.h.
typedef itk::Statistics::MersenneTwisterRandomVariateGenerator mitk::MetropolisHastingsSampler::ItkRandGenType |
Definition at line 45 of file mitkMetropolisHastingsSampler.h.
MetropolisHastingsSampler::MetropolisHastingsSampler | ( | ParticleGrid * | grid, |
EnergyComputer * | enComp, | ||
ItkRandGenType * | randGen, | ||
float | curvThres | ||
) |
Definition at line 21 of file mitkMetropolisHastingsSampler.cpp.
References m_CurvatureThreshold, m_DistanceThreshold, m_EnergyComputer, m_Gamma, m_ParticleGrid, mitk::ParticleGrid::m_ParticleLength, m_ParticleLength, M_PI, m_RandGen, m_Sigma, m_StopProb, m_TractProb, and m_Z.
|
protected |
Definition at line 445 of file mitkMetropolisHastingsSampler.cpp.
References mitk::SimpSamp::add(), mitk::SimpSamp::clear(), EnergyComputer::ComputeInternalEnergyConnection(), mitk::ParticleGrid::ComputeNeighbors(), mitk::EndPoint::ep, mitk::Particle::GetDir(), mitk::ParticleGrid::GetNextNeighbor(), mitk::Particle::GetPos(), mitk::Particle::label, m_CurvatureThreshold, m_DistanceThreshold, m_EnergyComputer, m_ParticleGrid, m_ParticleLength, m_SimpSamp, m_StopProb, m_TractProb, mitk::Particle::mID, mitk::EndPoint::p, and mitk::Particle::pID.
Referenced by MakeTrackProposal(), and RemoveAndSaveTrack().
|
protected |
generate random vectors
Definition at line 91 of file mitkMetropolisHastingsSampler.cpp.
References m_RandGen.
Referenced by MakeProposal().
int MetropolisHastingsSampler::GetNumAcceptedProposals | ( | ) |
Definition at line 494 of file mitkMetropolisHastingsSampler.cpp.
References m_AcceptedProposals.
Referenced by itk::GibbsTrackingFilter< ItkQBallImageType >::GenerateData().
|
protected |
Definition at line 99 of file mitkMetropolisHastingsSampler.cpp.
References m_RandGen.
Referenced by MakeProposal().
|
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::MakeProposal | ( | ) |
make proposal for birth/death/shift/connection of particles
Definition at line 110 of file mitkMetropolisHastingsSampler.cpp.
References EnergyComputer::ComputeExternalEnergy(), EnergyComputer::ComputeInternalEnergy(), DistortVector(), EnergyComputer::DrawRandomPosition(), mitk::EndPoint::ep, mitk::Particle::GetDir(), mitk::ParticleGrid::GetParticle(), mitk::Particle::GetPos(), GetRandomDirection(), mitk::Particle::ID, ImplementTrack(), m_AcceptedProposals, m_BackupTrack, m_BirthProb, m_BirthTime, m_ConnectionTime, m_DeathProb, m_DeathTime, m_DelProb, m_Density, mitk::Track::m_Energy, m_EnergyComputer, m_ExTemp, m_Gamma, m_InTemp, mitk::Track::m_Length, mitk::ParticleGrid::m_NumParticles, m_OptShiftProb, m_OptShiftTime, m_ParticleGrid, m_ParticleLength, mitk::Track::m_Probability, m_ProposalTrack, m_RandGen, m_ShiftProb, m_ShiftTime, m_Sigma, m_Z, MakeTrackProposal(), mitk::Particle::mID, mitk::ParticleGrid::NewParticle(), mitk::EndPoint::p, mitk::Particle::pID, RemoveAndSaveTrack(), mitk::ParticleGrid::RemoveParticle(), and mitk::ParticleGrid::TryUpdateGrid().
Referenced by itk::GibbsTrackingFilter< ItkQBallImageType >::EstimateParticleWeight(), and itk::GibbsTrackingFilter< ItkQBallImageType >::GenerateData().
|
protected |
Definition at line 393 of file mitkMetropolisHastingsSampler.cpp.
References ComputeEndPointProposalDistribution(), EnergyComputer::ComputeInternalEnergyConnection(), mitk::SimpSamp::draw(), mitk::EndPoint::ep, mitk::Particle::label, mitk::Track::m_Energy, m_EnergyComputer, mitk::Track::m_Length, mitk::Track::m_Probability, m_ProposalTrack, m_RandGen, m_SimpSamp, mitk::Particle::mID, mitk::SimpSamp::objs, mitk::EndPoint::p, mitk::Particle::pID, mitk::SimpSamp::probFor(), 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.
|
protected |
Definition at line 317 of file mitkMetropolisHastingsSampler.cpp.
References ComputeEndPointProposalDistribution(), EnergyComputer::ComputeInternalEnergyConnection(), mitk::EndPoint::ep, mitk::ParticleGrid::GetParticle(), mitk::Particle::ID, m_BackupTrack, m_DelProb, mitk::Track::m_Energy, m_EnergyComputer, mitk::Track::m_Length, mitk::ParticleGrid::m_NumConnections, m_ParticleGrid, mitk::Track::m_Probability, m_RandGen, m_SimpSamp, mitk::Particle::mID, mitk::EndPoint::p, mitk::Particle::pID, mitk::SimpSamp::probFor(), and mitk::Track::track.
Referenced by MakeProposal().
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 | ) |
Definition at line 84 of file mitkMetropolisHastingsSampler.cpp.
References m_ChempotParticle, m_Density, and m_InTemp.
Referenced by itk::GibbsTrackingFilter< ItkQBallImageType >::EstimateParticleWeight(), and itk::GibbsTrackingFilter< ItkQBallImageType >::GenerateData().
|
protected |
counts accepted proposals
Definition at line 96 of file mitkMetropolisHastingsSampler.h.
Referenced by GetNumAcceptedProposals(), and MakeProposal().
|
protected |
stores track removed for new proposal traCK
Definition at line 69 of file mitkMetropolisHastingsSampler.h.
Referenced by MakeProposal(), and RemoveAndSaveTrack().
|
protected |
probability for particle birth
Definition at line 76 of file mitkMetropolisHastingsSampler.h.
Referenced by MakeProposal(), and SetProbabilities().
|
protected |
Time probes for the single proposals
Definition at line 99 of file mitkMetropolisHastingsSampler.h.
Referenced by MakeProposal(), and PrintProposalTimes().
|
protected |
Definition at line 92 of file mitkMetropolisHastingsSampler.h.
Referenced by SetTemperature().
|
protected |
probability for particle connection proposal
Definition at line 80 of file mitkMetropolisHastingsSampler.h.
Referenced by SetProbabilities().
|
protected |
Definition at line 103 of file mitkMetropolisHastingsSampler.h.
Referenced by MakeProposal(), and PrintProposalTimes().
|
protected |
threshold for maximum angle between connected particles
Definition at line 87 of file mitkMetropolisHastingsSampler.h.
Referenced by ComputeEndPointProposalDistribution(), and MetropolisHastingsSampler().
|
protected |
probability for particle death
Definition at line 77 of file mitkMetropolisHastingsSampler.h.
Referenced by MakeProposal(), and SetProbabilities().
|
protected |
Definition at line 100 of file mitkMetropolisHastingsSampler.h.
Referenced by MakeProposal(), and PrintProposalTimes().
|
protected |
Definition at line 90 of file mitkMetropolisHastingsSampler.h.
Referenced by MakeProposal(), and RemoveAndSaveTrack().
|
protected |
Definition at line 74 of file mitkMetropolisHastingsSampler.h.
Referenced by MakeProposal(), and SetTemperature().
|
protected |
threshold for maximum distance between connected particles
Definition at line 86 of file mitkMetropolisHastingsSampler.h.
Referenced by ComputeEndPointProposalDistribution(), and MetropolisHastingsSampler().
|
protected |
computes internal and external energy of particles
Definition at line 95 of file mitkMetropolisHastingsSampler.h.
Referenced by ComputeEndPointProposalDistribution(), MakeProposal(), MakeTrackProposal(), MetropolisHastingsSampler(), and RemoveAndSaveTrack().
|
protected |
simulated annealing temperature
Definition at line 73 of file mitkMetropolisHastingsSampler.h.
Referenced by MakeProposal().
|
protected |
Definition at line 83 of file mitkMetropolisHastingsSampler.h.
Referenced by MakeProposal(), and MetropolisHastingsSampler().
|
protected |
simulated annealing temperature
Definition at line 72 of file mitkMetropolisHastingsSampler.h.
Referenced by MakeProposal(), and SetTemperature().
|
protected |
probability for optimal particle shift
Definition at line 79 of file mitkMetropolisHastingsSampler.h.
Referenced by MakeProposal(), and SetProbabilities().
|
protected |
Definition at line 102 of file mitkMetropolisHastingsSampler.h.
Referenced by MakeProposal(), and PrintProposalTimes().
|
protected |
storest all particles
Definition at line 94 of file mitkMetropolisHastingsSampler.h.
Referenced by ComputeEndPointProposalDistribution(), ImplementTrack(), MakeProposal(), MetropolisHastingsSampler(), and RemoveAndSaveTrack().
|
protected |
Definition at line 91 of file mitkMetropolisHastingsSampler.h.
Referenced by ComputeEndPointProposalDistribution(), MakeProposal(), and MetropolisHastingsSampler().
|
protected |
stores proposal track
Definition at line 68 of file mitkMetropolisHastingsSampler.h.
Referenced by MakeProposal(), and MakeTrackProposal().
|
protected |
random generator
Definition at line 67 of file mitkMetropolisHastingsSampler.h.
Referenced by DistortVector(), GetRandomDirection(), MakeProposal(), MakeTrackProposal(), MetropolisHastingsSampler(), and RemoveAndSaveTrack().
|
protected |
probability for particle shift
Definition at line 78 of file mitkMetropolisHastingsSampler.h.
Referenced by MakeProposal(), and SetProbabilities().
|
protected |
Definition at line 101 of file mitkMetropolisHastingsSampler.h.
Referenced by MakeProposal(), and PrintProposalTimes().
|
protected |
Definition at line 82 of file mitkMetropolisHastingsSampler.h.
Referenced by MakeProposal(), and MetropolisHastingsSampler().
|
protected |
neighbouring particles and their probabilities for the local tracking
Definition at line 70 of file mitkMetropolisHastingsSampler.h.
Referenced by ComputeEndPointProposalDistribution(), MakeTrackProposal(), and RemoveAndSaveTrack().
|
protected |
Definition at line 89 of file mitkMetropolisHastingsSampler.h.
Referenced by ComputeEndPointProposalDistribution(), and MetropolisHastingsSampler().
|
protected |
Definition at line 88 of file mitkMetropolisHastingsSampler.h.
Referenced by ComputeEndPointProposalDistribution(), and MetropolisHastingsSampler().
|
protected |
Definition at line 84 of file mitkMetropolisHastingsSampler.h.
Referenced by MakeProposal(), and MetropolisHastingsSampler().