#pragma once#include"itkEventObject.h"namespaceitk{classITK_EXPORTParticleEvent:publicEventObject{public:typedefParticleEventSelf;ParticleEvent():m_ThreadID(0){}virtual~ParticleEvent(){}intGetThreadID()const{returnm_ThreadID;}voidSetThreadID(inti){m_ThreadID=i;}ParticleEvent(constParticleEvent&v):EventObject(v){m_ThreadID=v.m_ThreadID;}constParticleEvent&operator=(constParticleEvent&v){m_ThreadID=v.m_ThreadID;return*this;}virtualconstchar*GetEventName()const{return"ParticleEvent";}virtualboolCheckEvent(const::itk::EventObject*e)const{returndynamic_cast<constSelf*>(e);}virtual::itk::EventObject*MakeObject()const{returnnewSelf;}private:intm_ThreadID;};classITK_EXPORTParticleEventWithIndex:publicParticleEvent{public:ParticleEventWithIndex(){}~ParticleEventWithIndex(){}ParticleEventWithIndex(constParticleEventWithIndex&v){m_PositionIndex=v.m_PositionIndex;m_DomainIndex=v.m_DomainIndex;}constParticleEventWithIndex&operator=(constParticleEventWithIndex&v){ParticleEvent::operator=(v);m_PositionIndex=v.m_PositionIndex;m_DomainIndex=v.m_DomainIndex;return*this;}inlinevoidSetPositionIndex(inti){m_PositionIndex=i;}intGetPositionIndex()const{returnm_PositionIndex;}inlinevoidSetDomainIndex(inti){m_DomainIndex=i;}intGetDomainIndex()const{returnm_DomainIndex;}private:intm_PositionIndex;intm_DomainIndex;};itkEventMacro(ParticleDomainAddEvent,ParticleEventWithIndex);itkEventMacro(ParticleTransformSetEvent,ParticleEventWithIndex);itkEventMacro(ParticlePrefixTransformSetEvent,ParticleEventWithIndex);itkEventMacro(ParticleNeighborhoodSetEvent,ParticleEventWithIndex);itkEventMacro(ParticlePositionSetEvent,ParticleEventWithIndex);itkEventMacro(ParticlePositionAddEvent,ParticleEventWithIndex);itkEventMacro(ParticlePositionRemoveEvent,ParticleEventWithIndex);}// end namespace itk