ANIMA  4.0
animaAsymmetricBMRegistrationMethod.hxx
Go to the documentation of this file.
1 #pragma once
3 
6 
7 namespace anima
8 {
9 
10 template <typename TInputImageType>
11 void
12 AsymmetricBMRegistrationMethod <TInputImageType>
13 ::PerformOneIteration(InputImageType *refImage, InputImageType *movingImage, TransformPointer &addOn)
14 {
15  itk::TimeProbe tmpTime;
16  tmpTime.Start();
17 
18  this->GetBlockMatcher()->SetForceComputeBlocks(false);
19  this->GetBlockMatcher()->SetReferenceImage(this->GetFixedImage());
20  this->GetBlockMatcher()->SetMovingImage(movingImage);
21  this->GetBlockMatcher()->SetNumberOfWorkUnits(this->GetNumberOfWorkUnits());
22  this->GetBlockMatcher()->Update();
23 
24  tmpTime.Stop();
25 
26  if (this->GetVerboseProgression())
27  std::cout << "Matching performed in " << tmpTime.GetTotal() << std::endl;
28 
29  this->GetAgregator()->SetInputRegions(this->GetBlockMatcher()->GetBlockRegions());
30  this->GetAgregator()->SetInputOrigins(this->GetBlockMatcher()->GetBlockPositions());
31 
32  this->GetAgregator()->SetInputWeights(this->GetBlockMatcher()->GetBlockWeights());
33  this->GetAgregator()->SetInputTransforms(this->GetBlockMatcher()->GetBlockTransformPointers());
34 
35  addOn = this->GetAgregator()->GetOutput();
36 }
37 
38 }