Skip to content
Snippets Groups Projects
Commit 5417d0b6 authored by Floris Berendsen's avatar Floris Berendsen
Browse files

ENH: made Source Interfaces templated. Changed Overlord accordingly.

parent 183c2bad
No related branches found
No related tags found
No related merge requests found
Showing with 415 additions and 114 deletions
......@@ -7,31 +7,89 @@
#include "elxMacro.h"
namespace selx
{
template<int Dimensionality, class TPixel>
class ItkImageSourceFixedComponent :
public Implements<
Accepting<>,
Providing< SourceInterface, itkImageSourceFixedInterface<3,double > >
Providing< SourceInterface, itkImageSourceFixedInterface<Dimensionality, TPixel > >
>
{
public:
elxNewMacro(ItkImageSourceFixedComponent, ComponentBase);
itkStaticConstMacro(Dimensionality, unsigned int, Dimensionality);
ItkImageSourceFixedComponent();
virtual ~ItkImageSourceFixedComponent();
typedef itk::ImageSource<itk::Image<double, 3>> ItkImageSourceFixedType;
typedef typename itk::ImageSource<itk::Image<TPixel, Dimensionality>> ItkImageSourceFixedType;
virtual ItkImageSourceFixedType::Pointer GetItkImageSourceFixed() override;
virtual typename ItkImageSourceFixedType::Pointer GetItkImageSourceFixed() override;
virtual bool ConnectToOverlordSource(itk::Object::Pointer) override;
//int Update();
//virtual bool MeetsCriteria(const CriteriaType &criteria);
virtual bool MeetsCriterion(const CriterionType &criterion) override;
//static const char * GetName() { return "GDOptimizer3rdPartyComponent"; } ;
static const char * GetDescription() { return "ItkImageSourceFixed Component"; };
private:
ItkImageSourceFixedType::Pointer m_Source;
typename ItkImageSourceFixedType::Pointer m_Source;
protected:
/* The following struct returns the string name of computation type */
/* default implementation */
static inline const std::string GetTypeNameString()
{
itkGenericExceptionMacro(<< "Unknown ScalarType" << typeid(TPixel).name());
// TODO: provide the user instructions how to enable the compilation of the component with the required template types (if desired)
// We might define an exception object that can communicate various error messages: for simple user, for developer user, etc
}
static inline const std::string GetPixelTypeNameString()
{
itkGenericExceptionMacro(<< "Unknown PixelType" << typeid(TPixel).name());
// TODO: provide the user instructions how to enable the compilation of the component with the required template types (if desired)
// We might define an exception object that can communicate various error messages: for simple user, for developer user, etc
}
};
template <>
inline const std::string
ItkImageSourceFixedComponent<2, float>
::GetPixelTypeNameString()
{
return std::string("float");
}
template <>
inline const std::string
ItkImageSourceFixedComponent<2, double>
::GetPixelTypeNameString()
{
return std::string("double");
}
template <>
inline const std::string
ItkImageSourceFixedComponent<3, float>
::GetPixelTypeNameString()
{
return std::string("float");
}
template <>
inline const std::string
ItkImageSourceFixedComponent<3, double>
::GetPixelTypeNameString()
{
return std::string("double");
}
} //end namespace selx
#endif // #define GDOptimizer3rdPartyComponent_h
\ No newline at end of file
#ifndef ITK_MANUAL_INSTANTIATION
#include "selxItkImageSourceFixed.hxx"
#endif
#endif // #define selxItkImageSourceFixed_h
\ No newline at end of file
#include "selxItkImageSourceFixed.h"
namespace selx
{
template<int Dimensionality, class TPixel>
ItkImageSourceFixedComponent< Dimensionality, TPixel>::ItkImageSourceFixedComponent()
{
this->m_Source = nullptr;
}
template<int Dimensionality, class TPixel>
ItkImageSourceFixedComponent< Dimensionality, TPixel>::~ItkImageSourceFixedComponent()
{
}
template<int Dimensionality, class TPixel>
typename ItkImageSourceFixedComponent< Dimensionality, TPixel>::ItkImageSourceFixedType::Pointer ItkImageSourceFixedComponent< Dimensionality, TPixel>::GetItkImageSourceFixed()
{
if (this->m_Source == nullptr)
{
itkExceptionMacro("SourceComponent needs to be initialized by ConnectToOverlordSource()");
}
return this->m_Source;
}
template<int Dimensionality, class TPixel>
bool ItkImageSourceFixedComponent< Dimensionality, TPixel>::ConnectToOverlordSource(itk::Object::Pointer object)
{
this->m_Source = dynamic_cast<ItkImageSourceFixedType*>(object.GetPointer());
return (this->m_Source == nullptr);
}
template<int Dimensionality, class TPixel>
bool ItkImageSourceFixedComponent< Dimensionality, TPixel>::MeetsCriterion(const CriterionType &criterion)
{
bool hasUndefinedCriteria(false);
bool meetsCriteria(false);
if (criterion.first == "ComponentProperty")
{
meetsCriteria = true;
for (auto const & criterionValue : criterion.second) // auto&& preferred?
{
if (criterionValue != "SomeProperty") // e.g. "GradientDescent", "SupportsSparseSamples
{
meetsCriteria = false;
}
}
}
else if (criterion.first == "Dimensionality") //Supports this?
{
meetsCriteria = true;
for (auto const & criterionValue : criterion.second) // auto&& preferred?
{
if (std::stoi(criterionValue) != Self::Dimensionality)
{
meetsCriteria = false;
}
}
}
else if (criterion.first == "PixelType") //Supports this?
{
meetsCriteria = true;
for (auto const & criterionValue : criterion.second) // auto&& preferred?
{
if (criterionValue != Self::GetPixelTypeNameString())
{
meetsCriteria = false;
}
}
}
return meetsCriteria;
}
} //end namespace selx
......@@ -7,31 +7,87 @@
#include "elxMacro.h"
namespace selx
{
template<int Dimensionality, class TPixel>
class ItkImageSourceMovingComponent :
public Implements<
Accepting<>,
Providing< SourceInterface, itkImageSourceMovingInterface<3,double > >
Providing< SourceInterface, itkImageSourceMovingInterface<Dimensionality, TPixel > >
>
{
public:
elxNewMacro(ItkImageSourceMovingComponent, ComponentBase);
itkStaticConstMacro(Dimensionality, unsigned int, Dimensionality);
ItkImageSourceMovingComponent();
virtual ~ItkImageSourceMovingComponent();
typedef itk::ImageSource<itk::Image<double, 3>> ItkImageSourceMovingType;
typedef itk::ImageSource<itk::Image<TPixel, Dimensionality>> ItkImageSourceMovingType;
virtual ItkImageSourceMovingType::Pointer GetItkImageSourceMoving() override;
virtual typename ItkImageSourceMovingType::Pointer GetItkImageSourceMoving() override;
virtual bool ConnectToOverlordSource(itk::Object::Pointer) override;
//int Update();
//virtual bool MeetsCriteria(const CriteriaType &criteria);
virtual bool MeetsCriterion(const CriterionType &criterion) override;
//static const char * GetName() { return "GDOptimizer3rdPartyComponent"; } ;
static const char * GetDescription() { return "ItkImageSourceMoving Component"; };
private:
ItkImageSourceMovingType::Pointer m_Source;
typename ItkImageSourceMovingType::Pointer m_Source;
protected:
/* The following struct returns the string name of computation type */
/* default implementation */
static inline const std::string GetTypeNameString()
{
itkGenericExceptionMacro(<< "Unknown ScalarType" << typeid(TPixel).name());
// TODO: provide the user instructions how to enable the compilation of the component with the required template types (if desired)
// We might define an exception object that can communicate various error messages: for simple user, for developer user, etc
}
static inline const std::string GetPixelTypeNameString()
{
itkGenericExceptionMacro(<< "Unknown PixelType" << typeid(TPixel).name());
// TODO: provide the user instructions how to enable the compilation of the component with the required template types (if desired)
// We might define an exception object that can communicate various error messages: for simple user, for developer user, etc
}
};
template <>
inline const std::string
ItkImageSourceMovingComponent<2, float>
::GetPixelTypeNameString()
{
return std::string("float");
}
template <>
inline const std::string
ItkImageSourceMovingComponent<2, double>
::GetPixelTypeNameString()
{
return std::string("double");
}
template <>
inline const std::string
ItkImageSourceMovingComponent<3, float>
::GetPixelTypeNameString()
{
return std::string("float");
}
template <>
inline const std::string
ItkImageSourceMovingComponent<3, double>
::GetPixelTypeNameString()
{
return std::string("double");
}
} //end namespace selx
#endif // #define GDOptimizer3rdPartyComponent_h
\ No newline at end of file
#ifndef ITK_MANUAL_INSTANTIATION
#include "selxItkImageSourceMoving.hxx"
#endif
#endif // #define selxItkImageSourceMoving_h
\ No newline at end of file
......@@ -2,17 +2,19 @@
namespace selx
{
ItkImageSourceMovingComponent::ItkImageSourceMovingComponent()
template<int Dimensionality, class TPixel>
ItkImageSourceMovingComponent< Dimensionality, TPixel>::ItkImageSourceMovingComponent()
{
this->m_Source = nullptr;
}
ItkImageSourceMovingComponent::~ItkImageSourceMovingComponent()
template<int Dimensionality, class TPixel>
ItkImageSourceMovingComponent< Dimensionality, TPixel>::~ItkImageSourceMovingComponent()
{
}
ItkImageSourceMovingComponent::ItkImageSourceMovingType::Pointer ItkImageSourceMovingComponent::GetItkImageSourceMoving()
template<int Dimensionality, class TPixel>
typename ItkImageSourceMovingComponent< Dimensionality, TPixel>::ItkImageSourceMovingType::Pointer ItkImageSourceMovingComponent< Dimensionality, TPixel>::GetItkImageSourceMoving()
{
if (this->m_Source == nullptr)
{
......@@ -21,14 +23,15 @@ namespace selx
return this->m_Source;
}
bool ItkImageSourceMovingComponent::ConnectToOverlordSource(itk::Object::Pointer object)
template<int Dimensionality, class TPixel>
bool ItkImageSourceMovingComponent< Dimensionality, TPixel>::ConnectToOverlordSource(itk::Object::Pointer object)
{
this->m_Source = dynamic_cast<ItkImageSourceMovingType*>(object.GetPointer());
return (this->m_Source == nullptr);
}
bool ItkImageSourceMovingComponent::MeetsCriterion(const CriterionType &criterion)
template<int Dimensionality, class TPixel>
bool ItkImageSourceMovingComponent< Dimensionality, TPixel>::MeetsCriterion(const CriterionType &criterion)
{
bool hasUndefinedCriteria(false);
bool meetsCriteria(false);
......@@ -43,6 +46,30 @@ bool ItkImageSourceMovingComponent::MeetsCriterion(const CriterionType &criterio
}
}
}
else if (criterion.first == "Dimensionality") //Supports this?
{
meetsCriteria = true;
for (auto const & criterionValue : criterion.second) // auto&& preferred?
{
if (std::stoi(criterionValue) != Self::Dimensionality)
{
meetsCriteria = false;
}
}
}
else if (criterion.first == "PixelType") //Supports this?
{
meetsCriteria = true;
for (auto const & criterionValue : criterion.second) // auto&& preferred?
{
if (criterionValue != Self::GetPixelTypeNameString())
{
meetsCriteria = false;
}
}
}
return meetsCriteria;
}
......
#include "selxItkImageSourceFixed.h"
namespace selx
{
ItkImageSourceFixedComponent::ItkImageSourceFixedComponent()
{
this->m_Source = nullptr;
}
ItkImageSourceFixedComponent::~ItkImageSourceFixedComponent()
{
}
ItkImageSourceFixedComponent::ItkImageSourceFixedType::Pointer ItkImageSourceFixedComponent::GetItkImageSourceFixed()
{
if (this->m_Source == nullptr)
{
itkExceptionMacro("SourceComponent needs to be initialized by ConnectToOverlordSource()");
}
return this->m_Source;
}
bool ItkImageSourceFixedComponent::ConnectToOverlordSource(itk::Object::Pointer object)
{
this->m_Source = dynamic_cast<ItkImageSourceFixedType*>(object.GetPointer());
return (this->m_Source == nullptr);
}
bool ItkImageSourceFixedComponent::MeetsCriterion(const CriterionType &criterion)
{
bool hasUndefinedCriteria(false);
bool meetsCriteria(false);
if (criterion.first == "ComponentProperty")
{
meetsCriteria = true;
for (auto const & criterionValue : criterion.second) // auto&& preferred?
{
if (criterionValue != "SomeProperty") // e.g. "GradientDescent", "SupportsSparseSamples
{
meetsCriteria = false;
}
}
}
return meetsCriteria;
}
} //end namespace selx
......@@ -39,14 +39,24 @@ namespace selx
typedef std::vector<ComponentSelectorPointer> ComponentSelectorContainerType;
typedef ComponentSelectorContainerType::iterator ComponentSelectorIteratorType;
typedef itk::ImageFileReader<itk::Image<double, 3>> ReaderType;
typedef itk::ImageFileWriter<itk::Image<double, 3>> WriterType;
typedef itk::ImageFileReader<itk::Image<float, 2>> Reader2floatType;
typedef itk::ImageFileWriter<itk::Image<float, 2>> Writer2floatType;
typedef itk::VectorContainer <
unsigned int, ReaderType::Pointer > ReaderContainerType;
unsigned int, Reader2floatType::Pointer > Reader2floatContainerType;
typedef itk::VectorContainer <
unsigned int, WriterType::Pointer > WriterContainerType;
unsigned int, Writer2floatType::Pointer > Writer2floatContainerType;
typedef itk::ImageFileReader<itk::Image<double, 3>> Reader3doubleType;
typedef itk::ImageFileWriter<itk::Image<double, 3>> Writer3doubleType;
typedef itk::VectorContainer <
unsigned int, Reader3doubleType::Pointer > Reader3doubleContainerType;
typedef itk::VectorContainer <
unsigned int, Writer3doubleType::Pointer > Writer3doubleContainerType;
// typedef itk::Object::Pointer ObjectPointer;
......@@ -97,8 +107,10 @@ namespace selx
//ObjectContainerType::Pointer m_OutputObjects;
//SinkComponentsContainerType::Pointer m_SinkComponents;
//SourceComponentsContainerType::Pointer m_SourceComponents;
ReaderContainerType::Pointer m_Readers;
WriterContainerType::Pointer m_Writers;
Reader3doubleContainerType::Pointer m_Readers3double;
Writer3doubleContainerType::Pointer m_Writers3double;
Reader2floatContainerType::Pointer m_Readers2float;
Writer2floatContainerType::Pointer m_Writers2float;
ComponentsContainerType::Pointer m_RunRegistrationComponents;
};
......
......@@ -8,8 +8,12 @@ namespace selx
//this->m_SinkComponents = SinkComponentsContainerType::New();
//this->m_SourceComponents = SourceComponentsContainerType::New();
this->m_RunRegistrationComponents = ComponentsContainerType::New();
this->m_Readers = ReaderContainerType::New();
this->m_Writers = WriterContainerType::New();
// temporary solution
this->m_Readers2float = Reader2floatContainerType::New();
this->m_Writers2float = Writer2floatContainerType::New();
this->m_Readers3double = Reader3doubleContainerType::New();
this->m_Writers3double = Writer3doubleContainerType::New();
}
void Overlord::SetBlueprint(const Blueprint::Pointer blueprint)
......@@ -33,11 +37,17 @@ namespace selx
this->ConnectSources();
int numberSources = this->m_Readers->size(); // temporary solution
std::cout << "Found " << numberSources << " Source Components" << std::endl;
int numberSources2float = this->m_Readers2float->size(); // temporary solution
std::cout << "Found " << numberSources2float << " Source Components (2d float)" << std::endl;
int numberSources3double = this->m_Readers3double->size(); // temporary solution
std::cout << "Found " << numberSources3double << " Source Components (3d double)" << std::endl;
this->ConnectSinks();
int numberSinks = this->m_Writers->size(); // temporary solution
std::cout << "Found " << numberSinks << " Sink Components" << std::endl;
int numberSinks2float = this->m_Writers2float->size(); // temporary solution
std::cout << "Found " << numberSinks2float << " Sink Components (2d float)" << std::endl;
int numberSinks3double = this->m_Writers3double->size(); // temporary solution
std::cout << "Found " << numberSinks3double << " Sink Components (3d double)" << std::endl;
......@@ -195,20 +205,45 @@ namespace selx
{
itkExceptionMacro("dynamic_cast<SourceInterface*> fails, but based on component criterion it shouldn't")
}
//TODO: Make these connections available as inputs of the SuperElastix (filter).
// For now, we just create the readers here.
ReaderType::Pointer reader;
reader = ReaderType::New();
std::stringstream filename;
//filename << "C:\\wp\\SuperElastix\\bld2\\SuperElastix-build\\bin\\Debug\\sourceimage" << readercounter << ".mhd";
filename << "sourceimage" << readercounter << ".mhd";
reader->SetFileName(filename.str());
this->m_Readers->push_back(reader);
//TODO which way is preferred?
// provingSourceInterface->ConnectToOverlordSource((itk::Object*)(reader.GetPointer()));
provingSourceInterface->ConnectToOverlordSource((itk::SmartPointer<itk::Object>) reader);
CriteriaType typeCriteria = { { "Dimensionality", { "3" } }, { "PixelType", { "double" } } };
if (component->MeetsCriteria(typeCriteria))
{
// For now, we just create the readers here.
Reader3doubleType::Pointer reader;
reader = Reader3doubleType::New();
std::stringstream filename;
//filename << "C:\\wp\\SuperElastix\\bld2\\SuperElastix-build\\bin\\Debug\\sourceimage" << readercounter << ".mhd";
filename << "source3dimage" << readercounter << ".mhd";
reader->SetFileName(filename.str());
this->m_Readers3double->push_back(reader);
//TODO which way is preferred?
// provingSourceInterface->ConnectToOverlordSource((itk::Object*)(reader.GetPointer()));
provingSourceInterface->ConnectToOverlordSource((itk::SmartPointer<itk::Object>) reader);
}
else if (component->MeetsCriteria({ { "Dimensionality", { "2" } }, { "PixelType", { "float" } } }))
{
// For now, we just create the readers here.
Reader2floatType::Pointer reader;
reader = Reader2floatType::New();
std::stringstream filename;
//filename << "C:\\wp\\SuperElastix\\bld2\\SuperElastix-build\\bin\\Debug\\sourceimage" << readercounter << ".mhd";
filename << "source2dimage" << readercounter << ".mhd";
reader->SetFileName(filename.str());
this->m_Readers2float->push_back(reader);
//TODO which way is preferred?
// provingSourceInterface->ConnectToOverlordSource((itk::Object*)(reader.GetPointer()));
provingSourceInterface->ConnectToOverlordSource((itk::SmartPointer<itk::Object>) reader);
}
else
{
itkExceptionMacro("Overlord implements only 2 float and 3 double for now");
}
++readercounter;
}
}
......@@ -239,18 +274,37 @@ namespace selx
}
//TODO: Make these connections available as outputs of the SuperElastix (filter).
// For now, we just create the writers here.
typedef itk::ImageFileWriter<itk::Image<double, 3>> WriterType;
WriterType::Pointer writer;
writer = WriterType::New();
std::stringstream filename;
filename << "sinkimage" << writercounter << ".mhd";
writer->SetFileName(filename.str());
this->m_Writers->push_back(writer);
// For testing purposes, all Sources are connected to an ImageWriter
provingSinkInterface->ConnectToOverlordSink((itk::SmartPointer<itk::Object>) writer);
if (component->MeetsCriteria({ { "Dimensionality", { "3" } }, { "PixelType", { "double" } } }))
{
// For now, we just create the writers here.
Writer3doubleType::Pointer writer;
writer = Writer3doubleType::New();
std::stringstream filename;
filename << "sink3dimage" << writercounter << ".mhd";
writer->SetFileName(filename.str());
this->m_Writers3double->push_back(writer);
// For testing purposes, all Sources are connected to an ImageWriter
provingSinkInterface->ConnectToOverlordSink((itk::SmartPointer<itk::Object>) writer);
}
else if (component->MeetsCriteria({ { "Dimensionality", { "2" } }, { "PixelType", { "float" } } }))
{
// For now, we just create the writers here.
Writer2floatType::Pointer writer;
writer = Writer2floatType::New();
std::stringstream filename;
filename << "sink2dimage" << writercounter << ".mhd";
writer->SetFileName(filename.str());
this->m_Writers2float->push_back(writer);
// For testing purposes, all Sources are connected to an ImageWriter
provingSinkInterface->ConnectToOverlordSink((itk::SmartPointer<itk::Object>) writer);
}
else
{
itkExceptionMacro("Overlord implements only 2 float and 3 double for now");
}
++writercounter;
}
}
......@@ -295,14 +349,15 @@ namespace selx
}
bool Overlord::Execute()
{
for (auto const & reader : *(this->m_Readers)) // auto&& preferred?
for (auto const & reader : *(this->m_Readers2float)) // auto&& preferred?
{
reader->Update();
}
for (auto const & reader : *(this->m_Readers3double)) // auto&& preferred?
{
char result[MAX_PATH];
std::cout << std::string(result, GetModuleFileName(NULL, result, MAX_PATH));
reader->Update();
}
// RunRegistrations is a simple execution model
// E.g.if the components are true itk Process Object, the don't need an 'Update' call.
// The container of RunRegistrationsInterfaces will therefore be empty, since they will not be added if they don't expose this interface.
......@@ -311,11 +366,15 @@ namespace selx
this->RunRegistrations();
//update all writers...
// should have stored the list of writers in overlord instead of sinkComponents
for (auto const & writer : *(this->m_Writers)) // auto&& preferred?
for (auto const & writer : *(this->m_Writers2float)) // auto&& preferred?
{
writer->Update();
}
for (auto const & writer : *(this->m_Writers3double)) // auto&& preferred?
{
writer->Update();
}
return true;
}
} // end namespace selx
......
......@@ -17,6 +17,8 @@ ExternalProject_Add( ${proj}
-DELASTIX_BUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
-DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
-DITK_DIR:PATH=${ITK_DIR}
# explicitly set the types for 3d
# -DELASTIX_IMAGE_3D_PIXELTYPES:STRING={"float;double"}
# Elastix components configuration
-DUSE_AdaptiveStochasticGradientDescent:BOOL=ON
-DUSE_AdvancedAffineTransformElastix:BOOL=ON
......
......@@ -23,11 +23,15 @@ public:
virtual void SetUp() {
/** register all example components */
ComponentFactory<ElastixComponent<3, double>>::RegisterOneFactory();
ComponentFactory<ElastixComponent<2, float>>::RegisterOneFactory();
ComponentFactory<ItkImageSinkComponent>::RegisterOneFactory();
ComponentFactory<ItkImageSourceFixedComponent>::RegisterOneFactory();
ComponentFactory<ItkImageSourceMovingComponent>::RegisterOneFactory();
ComponentFactory<ItkImageSourceFixedComponent<2, float>>::RegisterOneFactory();
ComponentFactory<ItkImageSourceMovingComponent<2, float>>::RegisterOneFactory();
ComponentFactory<ItkImageSourceFixedComponent<3, double>>::RegisterOneFactory();
ComponentFactory<ItkImageSourceMovingComponent<3, double>>::RegisterOneFactory();
}
......
......@@ -45,8 +45,12 @@ public:
ComponentFactory<ItkImageSinkComponent>::RegisterOneFactory();
ComponentFactory<ItkImageSourceComponent>::RegisterOneFactory();
ComponentFactory<ItkImageSourceFixedComponent>::RegisterOneFactory();
ComponentFactory<ItkImageSourceMovingComponent>::RegisterOneFactory();
ComponentFactory<ItkImageSourceFixedComponent<2, float>>::RegisterOneFactory();
ComponentFactory<ItkImageSourceMovingComponent<2, float>>::RegisterOneFactory();
ComponentFactory<ItkImageSourceFixedComponent<3, double>>::RegisterOneFactory();
ComponentFactory<ItkImageSourceMovingComponent<3, double>>::RegisterOneFactory();
ComponentFactory<ItkSmoothingRecursiveGaussianImageFilterComponent<3, double>>::RegisterOneFactory();
......@@ -79,14 +83,17 @@ TEST_F(RegistrationItkv4Test, ImagesOnly)
ParameterMapType component1Parameters;
component1Parameters["NameOfClass"] = { "ItkImageSourceFixedComponent" };
component1Parameters["Dimensionality"] = { "3" }; // should be derived from the inputs
ComponentIndexType index1 = blueprint->AddComponent(component1Parameters);
ParameterMapType component2Parameters;
component2Parameters["NameOfClass"] = { "ItkImageSourceMovingComponent" };
component2Parameters["Dimensionality"] = { "3" }; // should be derived from the inputs
ComponentIndexType index2 = blueprint->AddComponent(component2Parameters);
ParameterMapType component3Parameters;
component3Parameters["NameOfClass"] = { "ItkImageSinkComponent" };
//component3Parameters["Dimensionality"] = { "3" }; // should be derived from the outputs
ComponentIndexType index3 = blueprint->AddComponent(component3Parameters);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment