Commit 38fd0b1b authored by Floris Berendsen's avatar Floris Berendsen
Browse files

WIP: experimental interface property traits

parent a8d02ea8
......@@ -260,6 +260,37 @@ struct InterfaceName< InterfaceAcceptor< InterfaceType >>
return InterfaceName< InterfaceType >::Get();
}
};
} // end namespace selx
//************experimental**********
template< typename T >
struct Properties
{
//static_assert(StaticErrorMessageRevealT<T>::False, "Please Implement InterfaceProperties<InterfaceType> for this InterfaceType");
static const std::map<std::string, std::string> Get()
{
return{ { "Name", InterfaceName< T >::Get() } };
}
};
// The specializations for each type of Interface supported by the toolbox
template< int D, class TPixel >
struct Properties< itkImageFixedInterface< D, TPixel >>
{
static const std::map<std::string, std::string> Get()
{
return{ { "Name", InterfaceName< itkImageFixedInterface< D, TPixel> >::Get() }, { "Dimensionality", "3" }, { "PixelType", "float" } };
}
};
template< >
struct Properties< MetricValueInterface >
{
static const std::map<std::string, std::string> Get()
{
return{ { "Name", "MetricValueInterface" } };
}
};
} // end namespace selx
#endif // #define InterfaceTraits_h
......@@ -20,8 +20,17 @@
#include "selxOverlord.h"
#include "selxKeys.h"
//todo remove
#include "selxInterfaces.h"
#include "selxSuperElastixComponent.h"
namespace selx
{
//todo remove
auto && properties1 = Properties < itkImageFixedInterface< 3, float >>::Get();
auto && properties2 = Properties < itkGaussianExponentialDiffeomorphicTransformParametersAdaptorsContainerInterface< double, 2 >>::Get();
Overlord::Overlord() : m_isConfigured( false )
{
}
......
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