Commit ecbb068e authored by Floris Berendsen's avatar Floris Berendsen
Browse files

ENH: completed test for CompositeTransformComponent

parent df7ffcdc
......@@ -32,7 +32,7 @@ class ItkCompositeTransformComponent :
public SuperElastixComponent<
Accepting<MultiStageTransformInterface< InternalComputationValueType, Dimensionality > >,
Providing<itkTransformInterface<InternalComputationValueType, Dimensionality>,
RunRegistrationInterface>
RegistrationControllerStartInterface>
>
{
public:
......@@ -51,7 +51,7 @@ public:
virtual int Set(MultiStageTransformInterface< InternalComputationValueType, Dimensionality > *) override;
virtual typename void RunRegistration() override;
virtual typename void RegistrationControllerStart() override;
virtual typename TransformType::Pointer GetItkTransform() override;
......
......@@ -55,7 +55,7 @@ ItkCompositeTransformComponent< InternalComputationValueType, Dimensionality >::
template< class InternalComputationValueType, int Dimensionality >
void
ItkCompositeTransformComponent< InternalComputationValueType, Dimensionality >::RunRegistration()
ItkCompositeTransformComponent< InternalComputationValueType, Dimensionality >::RegistrationControllerStart()
{
for (auto & stage : this->m_registrationStages)
{
......
......@@ -167,7 +167,6 @@ ItkImageRegistrationMethodv4Component< Dimensionality, TPixel, InternalComputati
Dimensionality > * component )
{
this->m_theItkFilter->SetInitialTransform( component->GetItkTransform() );
return 0;
}
......
......@@ -96,6 +96,7 @@ public:
ItkMeanSquaresImageToImageMetricv4Component< 2, float, double >,
ItkGradientDescentOptimizerv4Component< double >,
ItkAffineTransformComponent< double, 3 >,
ItkAffineTransformComponent< double, 2 >,
ItkGaussianExponentialDiffeomorphicTransformComponent< double, 3 >,
ItkGaussianExponentialDiffeomorphicTransformParametersAdaptorsContainerComponent< 3, double >,
ItkTransformDisplacementFilterComponent< 2, float, double >,
......@@ -103,7 +104,8 @@ public:
ItkResampleFilterComponent< 2, float, double >,
ItkResampleFilterComponent< 3, double, double >,
RegistrationControllerComponent< >,
ItkCompositeTransformComponent<double, 3> > RegisterComponents;
ItkCompositeTransformComponent<double, 3>,
ItkCompositeTransformComponent<double, 2 >> RegisterComponents;
typedef SuperElastixFilter< RegisterComponents > SuperElastixFilterType;
......
......@@ -70,6 +70,9 @@ public:
virtual unsigned int CountProvidingInterfaces( const InterfaceCriteriaType ) = 0;
virtual const std::map< std::string, std::string > TemplateProperties() { return {}; }; //TODO should be overridden
protected:
ComponentBase() {}
......
......@@ -75,6 +75,8 @@ public:
/** Return Component or Nullptr*/
ComponentBasePointer GetComponent( void );
void PrintComponents(void);
protected:
CriteriaType m_Criteria;
......
......@@ -113,7 +113,6 @@ private:
/** See which components need more configuration criteria */
ComponentNamesType GetNonUniqueComponentNames();
void PrintComponentSelector(std::string);
//TODO make const correct
//Overlord should be constructed with a blueprint.
//Blueprint::ConstPointer m_Blueprint;
......
......@@ -118,6 +118,20 @@ ComponentSelector::NumberOfComponents()
{
return this->m_PossibleComponents.size();
}
void
ComponentSelector::PrintComponents(void)
{
for (auto & component : this->m_PossibleComponents)
{
auto const & properties = component->TemplateProperties();
for (auto const & keyvalue : properties)
{
std::cout << "{ """ << keyvalue.first << """: """ << keyvalue.second << """}" << std::endl;
}
std::cout << std::endl;
}
}
} // end namespace selx
//#endif
......@@ -71,9 +71,18 @@ Overlord::Configure()
for( const auto & nonUniqueComponentName : nonUniqueComponentNames )
{
std::cout << this->m_ComponentSelectorContainer[ nonUniqueComponentName ]->NumberOfComponents() << " " << nonUniqueComponentName << std::endl;
this->m_ComponentSelectorContainer[nonUniqueComponentName]->PrintComponents();
}
return false;
}
std::cout << "===== Selected Components =====" << std::endl;
for (auto const & componentName : m_Blueprint->GetComponentNames())
{
std::cout << componentName << ":" << std::endl;
this->m_ComponentSelectorContainer[componentName]->PrintComponents();
}
return true;
}
......@@ -306,13 +315,6 @@ Overlord::PropagateConnectionsWithUniqueComponents()
}
}
void
Overlord::PrintComponentSelector(std::string componentName)
{
}
bool
Overlord::ConnectComponents()
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment