Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
Contains and manages particles. More...
#include <mitkParticleGrid.h>
Classes | |
struct | NeighborTracker |
Public Types | |
typedef itk::Image< float, 3 > | ItkFloatImageType |
Public Member Functions | |
ParticleGrid (ItkFloatImageType *image, float particleLength, int cellCapacity) | |
~ParticleGrid () | |
Particle * | GetParticle (int ID) |
Particle * | NewParticle (vnl_vector_fixed< float, 3 > R) |
bool | TryUpdateGrid (int k) |
void | RemoveParticle (int k) |
void | ComputeNeighbors (vnl_vector_fixed< float, 3 > &R) |
Particle * | GetNextNeighbor () |
void | CreateConnection (Particle *P1, int ep1, Particle *P2, int ep2) |
void | DestroyConnection (Particle *P1, int ep1, Particle *P2, int ep2) |
void | DestroyConnection (Particle *P1, int ep1) |
bool | CheckConsistency () |
void | ResetGrid () |
Public Attributes | |
int | m_NumParticles |
int | m_NumConnections |
int | m_NumCellOverflows |
float | m_ParticleLength |
Protected Member Functions | |
bool | ReallocateGrid () |
Protected Attributes | |
std::vector< Particle * > | m_Grid |
std::vector< Particle > | m_Particles |
std::vector< int > | m_OccupationCount |
int | m_ContainerCapacity |
vnl_vector_fixed< int, 3 > | m_GridSize |
vnl_vector_fixed< float, 3 > | m_GridScale |
int | m_CellCapacity |
struct mitk::ParticleGrid::NeighborTracker | m_NeighbourTracker |
Contains and manages particles.
Definition at line 33 of file mitkParticleGrid.h.
typedef itk::Image< float, 3 > mitk::ParticleGrid::ItkFloatImageType |
Definition at line 38 of file mitkParticleGrid.h.
ParticleGrid::ParticleGrid | ( | ItkFloatImageType * | image, |
float | particleLength, | ||
int | cellCapacity | ||
) |
Definition at line 24 of file mitkParticleGrid.cpp.
References mitk::ParticleGrid::NeighborTracker::cellidx, mitk::ParticleGrid::NeighborTracker::cellidx_c, ID, m_CellCapacity, m_ContainerCapacity, m_Grid, m_GridScale, m_GridSize, m_NeighbourTracker, m_NumCellOverflows, m_NumConnections, m_NumParticles, m_OccupationCount, m_ParticleLength, m_Particles, and max().
ParticleGrid::~ParticleGrid | ( | ) |
Definition at line 60 of file mitkParticleGrid.cpp.
bool ParticleGrid::CheckConsistency | ( | ) |
Definition at line 389 of file mitkParticleGrid.cpp.
References mitk::Particle::ID, m_NumParticles, m_Particles, mitk::Particle::mID, and mitk::Particle::pID.
void ParticleGrid::ComputeNeighbors | ( | vnl_vector_fixed< float, 3 > & | R | ) |
Definition at line 265 of file mitkParticleGrid.cpp.
References mitk::ParticleGrid::NeighborTracker::cellcnt, mitk::ParticleGrid::NeighborTracker::cellidx, mitk::ParticleGrid::NeighborTracker::cellidx_c, m_CellCapacity, m_GridScale, m_GridSize, m_NeighbourTracker, and mitk::ParticleGrid::NeighborTracker::pcnt.
Referenced by mitk::MetropolisHastingsSampler::ComputeEndPointProposalDistribution(), and GibbsEnergyComputer::ComputeExternalEnergy().
Definition at line 337 of file mitkParticleGrid.cpp.
References mitk::Particle::ID, m_NumConnections, mitk::Particle::mID, and mitk::Particle::pID.
Referenced by mitk::MetropolisHastingsSampler::ImplementTrack().
Definition at line 352 of file mitkParticleGrid.cpp.
References m_NumConnections, mitk::Particle::mID, and mitk::Particle::pID.
Referenced by RemoveParticle().
void ParticleGrid::DestroyConnection | ( | Particle * | P1, |
int | ep1 | ||
) |
Definition at line 366 of file mitkParticleGrid.cpp.
References mitk::Particle::ID, m_NumConnections, m_Particles, mitk::Particle::mID, and mitk::Particle::pID.
Particle * ParticleGrid::GetNextNeighbor | ( | ) |
Definition at line 316 of file mitkParticleGrid.cpp.
References mitk::ParticleGrid::NeighborTracker::cellcnt, mitk::ParticleGrid::NeighborTracker::cellidx, mitk::ParticleGrid::NeighborTracker::cellidx_c, m_Grid, m_NeighbourTracker, m_OccupationCount, and mitk::ParticleGrid::NeighborTracker::pcnt.
Referenced by mitk::MetropolisHastingsSampler::ComputeEndPointProposalDistribution(), and GibbsEnergyComputer::ComputeExternalEnergy().
Particle * ParticleGrid::GetParticle | ( | int | ID | ) |
Definition at line 114 of file mitkParticleGrid.cpp.
References ID, and m_Particles.
Referenced by GibbsEnergyComputer::ComputeInternalEnergyConnection(), mitk::FiberBuilder::iterate(), mitk::FiberBuilder::LabelPredecessors(), mitk::FiberBuilder::LabelSuccessors(), mitk::MetropolisHastingsSampler::MakeProposal(), and mitk::MetropolisHastingsSampler::RemoveAndSaveTrack().
Particle * ParticleGrid::NewParticle | ( | vnl_vector_fixed< float, 3 > | R | ) |
Definition at line 122 of file mitkParticleGrid.cpp.
References mitk::Particle::GetPos(), mitk::Particle::gridindex, m_CellCapacity, m_ContainerCapacity, m_Grid, m_GridScale, m_GridSize, m_NumCellOverflows, m_NumParticles, m_OccupationCount, m_Particles, mitk::Particle::mID, mitk::Particle::pID, and ReallocateGrid().
Referenced by mitk::MetropolisHastingsSampler::MakeProposal().
|
protected |
Definition at line 90 of file mitkParticleGrid.cpp.
References ID, m_ContainerCapacity, m_Grid, m_GridSize, and m_Particles.
Referenced by NewParticle().
void ParticleGrid::RemoveParticle | ( | int | k | ) |
Definition at line 214 of file mitkParticleGrid.cpp.
References DestroyConnection(), mitk::Particle::gridindex, m_CellCapacity, m_Grid, m_NumParticles, m_OccupationCount, m_Particles, mitk::Particle::mID, and mitk::Particle::pID.
Referenced by mitk::MetropolisHastingsSampler::MakeProposal().
void ParticleGrid::ResetGrid | ( | ) |
Definition at line 66 of file mitkParticleGrid.cpp.
References mitk::ParticleGrid::NeighborTracker::cellidx, mitk::ParticleGrid::NeighborTracker::cellidx_c, ID, m_CellCapacity, m_ContainerCapacity, m_Grid, m_GridSize, m_NeighbourTracker, m_NumCellOverflows, m_NumConnections, m_NumParticles, m_OccupationCount, and m_Particles.
Referenced by itk::GibbsTrackingFilter< ItkQBallImageType >::EstimateParticleWeight().
bool ParticleGrid::TryUpdateGrid | ( | int | k | ) |
Definition at line 166 of file mitkParticleGrid.cpp.
References mitk::Particle::GetPos(), mitk::Particle::gridindex, m_CellCapacity, m_Grid, m_GridScale, m_GridSize, m_NumCellOverflows, m_OccupationCount, and m_Particles.
Referenced by mitk::MetropolisHastingsSampler::MakeProposal().
|
protected |
Definition at line 77 of file mitkParticleGrid.h.
Referenced by ComputeNeighbors(), NewParticle(), ParticleGrid(), RemoveParticle(), ResetGrid(), and TryUpdateGrid().
|
protected |
Definition at line 72 of file mitkParticleGrid.h.
Referenced by NewParticle(), ParticleGrid(), ReallocateGrid(), and ResetGrid().
|
protected |
Definition at line 68 of file mitkParticleGrid.h.
Referenced by GetNextNeighbor(), NewParticle(), ParticleGrid(), ReallocateGrid(), RemoveParticle(), ResetGrid(), and TryUpdateGrid().
|
protected |
Definition at line 75 of file mitkParticleGrid.h.
Referenced by ComputeNeighbors(), NewParticle(), ParticleGrid(), and TryUpdateGrid().
|
protected |
Definition at line 74 of file mitkParticleGrid.h.
Referenced by ComputeNeighbors(), NewParticle(), ParticleGrid(), ReallocateGrid(), ResetGrid(), and TryUpdateGrid().
|
protected |
Referenced by ComputeNeighbors(), GetNextNeighbor(), ParticleGrid(), and ResetGrid().
int mitk::ParticleGrid::m_NumCellOverflows |
Definition at line 42 of file mitkParticleGrid.h.
Referenced by NewParticle(), ParticleGrid(), ResetGrid(), and TryUpdateGrid().
int mitk::ParticleGrid::m_NumConnections |
Definition at line 41 of file mitkParticleGrid.h.
Referenced by CreateConnection(), DestroyConnection(), itk::GibbsTrackingFilter< ItkQBallImageType >::GenerateData(), ParticleGrid(), mitk::MetropolisHastingsSampler::RemoveAndSaveTrack(), and ResetGrid().
int mitk::ParticleGrid::m_NumParticles |
Definition at line 40 of file mitkParticleGrid.h.
Referenced by CheckConsistency(), itk::GibbsTrackingFilter< ItkQBallImageType >::EstimateParticleWeight(), itk::GibbsTrackingFilter< ItkQBallImageType >::GenerateData(), mitk::FiberBuilder::iterate(), mitk::MetropolisHastingsSampler::MakeProposal(), NewParticle(), ParticleGrid(), RemoveParticle(), and ResetGrid().
|
protected |
Definition at line 70 of file mitkParticleGrid.h.
Referenced by GetNextNeighbor(), NewParticle(), ParticleGrid(), RemoveParticle(), ResetGrid(), and TryUpdateGrid().
float mitk::ParticleGrid::m_ParticleLength |
Definition at line 43 of file mitkParticleGrid.h.
Referenced by EnergyComputer::EnergyComputer(), mitk::MetropolisHastingsSampler::MetropolisHastingsSampler(), and ParticleGrid().
|
protected |
Definition at line 69 of file mitkParticleGrid.h.
Referenced by CheckConsistency(), DestroyConnection(), GetParticle(), NewParticle(), ParticleGrid(), ReallocateGrid(), RemoveParticle(), ResetGrid(), and TryUpdateGrid().