18 #ifndef __itkPSMContainerArrayAttribute_h 19 #define __itkPSMContainerArrayAttribute_h 21 #include "itkDataObject.h" 22 #include "itkWeakPointer.h" 23 #include "itkPSMAttribute.h" 24 #include "itkPSMContainer.h" 34 template <
class T,
unsigned int VDimension>
36 :
public std::vector<typename PSMContainer<T>::Pointer >,
44 typedef SmartPointer<Self> Pointer;
45 typedef SmartPointer<const Self> ConstPointer;
46 typedef WeakPointer<const Self> ConstWeakPointer;
60 this->resize( this->size() +1);
64 virtual void PositionAddEventCallback(Object *,
const EventObject &e)
66 const itk::ParticlePositionAddEvent &
event 67 =
dynamic_cast<const itk::ParticlePositionAddEvent &
>(e);
68 this->operator[](event.GetDomainIndex())->
operator[](event.GetPositionIndex()) = 0.0;
71 virtual void PositionRemoveEventCallback(Object *,
const EventObject &)
73 itkExceptionMacro(
"This class does note support removal of particles positions.");
78 for (
unsigned d = 0; d < this->size(); d++)
80 for (
unsigned int i = 0; i < this->operator[](d)->GetSize(); i++)
82 this->operator[](d)->operator[](i) = 0.0;
91 this->m_DefinedCallbacks.DomainAddEvent =
true;
92 this->m_DefinedCallbacks.PositionAddEvent =
true;
93 this->m_DefinedCallbacks.PositionRemoveEvent =
true;
97 void PrintSelf(std::ostream& os, Indent indent)
const 98 { Superclass::PrintSelf(os,indent); }
102 void operator=(
const Self&);
Base class for PSMParticleSystem attribute classes.
virtual void DomainAddEventCallback(Object *, const EventObject &)
A container class that holds particle position information for the PSMParticleSystem class...