Shapeworks Studio  2.1
Shape analysis software suite
List of all members | Public Types | Public Member Functions | Public Attributes
itk::MyPSMProcrustesIterationCommand Class Reference
+ Inheritance diagram for itk::MyPSMProcrustesIterationCommand:
+ Collaboration diagram for itk::MyPSMProcrustesIterationCommand:

Public Types

typedef MyPSMProcrustesIterationCommand Self
 
typedef Command Superclass
 
typedef SmartPointer< SelfPointer
 
typedef SmartPointer< const SelfConstPointer
 
typedef Image< float, 2 > ImageType
 
typedef MyPSMProcrustesIterationCommand Self
 
typedef Command Superclass
 
typedef SmartPointer< SelfPointer
 
typedef SmartPointer< const SelfConstPointer
 
typedef Image< float, 3 > ImageType
 

Public Member Functions

 itkTypeMacro (MyPSMProcrustesIterationCommand, Command)
 
 itkNewMacro (Self)
 
virtual void Execute (Object *caller, const EventObject &)
 
virtual void Execute (const Object *, const EventObject &)
 
void SetPSMProcrustesRegistration (PSMProcrustesRegistration< 2 > *p)
 
 itkTypeMacro (MyPSMProcrustesIterationCommand, Command)
 
 itkNewMacro (Self)
 
virtual void Execute (Object *caller, const EventObject &)
 
virtual void Execute (const Object *, const EventObject &)
 
void SetPSMProcrustesRegistration (PSMProcrustesRegistration< 3 > *p)
 

Public Attributes

PSMProcrustesRegistration< 2 > * procrustesRegistration
 
PSMProcrustesRegistration< 3 > * procrustesRegistration
 

Detailed Description

Definition at line 35 of file itkPSMProcrustesRegistration2DTest.cxx.

Member Typedef Documentation

Standard class typedefs.

Definition at line 39 of file itkPSMProcrustesRegistrationTest.cxx.

Standard class typedefs.

Definition at line 39 of file itkPSMProcrustesRegistration2DTest.cxx.

Member Function Documentation

virtual void itk::MyPSMProcrustesIterationCommand::Execute ( Object *  caller,
const EventObject &   
)
inlinevirtual

This method will be passed a PSMProcrustesRegistration

Definition at line 54 of file itkPSMProcrustesRegistration2DTest.cxx.

55  {
56  PSMEntropyModelFilter<ImageType> *o
57  = static_cast<PSMEntropyModelFilter<ImageType> *>(caller);
58 
59  if (this->procrustesRegistration->GetProcrustesInterval() != 0)
60  {
61  this->m_ProcrustesCounter++;
62 
63  if (this->m_ProcrustesCounter >= (int)this->procrustesRegistration->GetProcrustesInterval())
64  {
65  // Reset the counter
66  this->m_ProcrustesCounter = 0;
67  this->procrustesRegistration->RunRegistration();
68  std::cout << "Run Procrustes Registration" << std::endl;
69  }
70  }
71 
72  // Print every 10 iterations
73  if (o->GetNumberOfElapsedIterations() % 10 != 0) return;
74 
75  std::cout << "Iteration # " << o->GetNumberOfElapsedIterations() << std::endl;
76  std::cout << " Eigenmode variances: ";
77  for (unsigned int i = 0; i < o->GetShapePCAVariances().size(); i++)
78  {
79  std::cout << o->GetShapePCAVariances()[i] << " ";
80  }
81  std::cout << std::endl;
82  std::cout << " Regularization = " << o->GetRegularizationConstant() << std::endl;
83  }
virtual void itk::MyPSMProcrustesIterationCommand::Execute ( Object *  caller,
const EventObject &   
)
inlinevirtual

This method will be passed a PSMProcrustesRegistration

Definition at line 54 of file itkPSMProcrustesRegistrationTest.cxx.

55  {
56  PSMEntropyModelFilter<ImageType> *o
57  = static_cast<PSMEntropyModelFilter<ImageType> *>(caller);
58 
59  if (this->procrustesRegistration->GetProcrustesInterval() != 0)
60  {
61  this->m_ProcrustesCounter++;
62 
63  if (this->m_ProcrustesCounter >= (int)this->procrustesRegistration->GetProcrustesInterval())
64  {
65  // Reset the counter
66  this->m_ProcrustesCounter = 0;
67  this->procrustesRegistration->RunRegistration();
68  std::cout << "Run Procrustes Registration" << std::endl;
69  }
70  }
71 
72  // Print every 10 iterations
73  if (o->GetNumberOfElapsedIterations() % 10 != 0) return;
74 
75  std::cout << "Iteration # " << o->GetNumberOfElapsedIterations() << std::endl;
76  std::cout << " Eigenmode variances: ";
77  for (unsigned int i = 0; i < o->GetShapePCAVariances().size(); i++)
78  {
79  std::cout << o->GetShapePCAVariances()[i] << " ";
80  }
81  std::cout << std::endl;
82  std::cout << " Regularization = " << o->GetRegularizationConstant() << std::endl;
83  }
itk::MyPSMProcrustesIterationCommand::itkNewMacro ( Self  )

Method for creation through the object factory.

itk::MyPSMProcrustesIterationCommand::itkNewMacro ( Self  )

Method for creation through the object factory.

itk::MyPSMProcrustesIterationCommand::itkTypeMacro ( MyPSMProcrustesIterationCommand  ,
Command   
)

Run-time type information (and related methods).

itk::MyPSMProcrustesIterationCommand::itkTypeMacro ( MyPSMProcrustesIterationCommand  ,
Command   
)

Run-time type information (and related methods).


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