Skip to content
Snippets Groups Projects
Commit 9bb41c0a authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

ENH: rename AutoencoderModelFactoryBase into AutoencoderModelFactory to match filename

parent 9a93d74e
No related branches found
No related tags found
No related merge requests found
......@@ -30,11 +30,11 @@ namespace otb
{
template <class TInputValue, class TTargetValue, class NeuronType>
class ITK_EXPORT AutoencoderModelFactoryBase : public itk::ObjectFactoryBase
class ITK_EXPORT AutoencoderModelFactory : public itk::ObjectFactoryBase
{
public:
/** Standard class typedefs. */
typedef AutoencoderModelFactoryBase Self;
typedef AutoencoderModelFactory Self;
typedef itk::ObjectFactoryBase Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
......@@ -47,21 +47,21 @@ public:
itkFactorylessNewMacro(Self);
/** Run-time type information (and related methods). */
itkTypeMacro(AutoencoderModelFactoryBase, itk::ObjectFactoryBase);
itkTypeMacro(AutoencoderModelFactory, itk::ObjectFactoryBase);
/** Register one factory of this type */
static void RegisterOneFactory(void)
{
Pointer AEFactory = AutoencoderModelFactoryBase::New();
Pointer AEFactory = AutoencoderModelFactory::New();
itk::ObjectFactoryBase::RegisterFactory(AEFactory);
}
protected:
AutoencoderModelFactoryBase();
~AutoencoderModelFactoryBase() ITK_OVERRIDE;
AutoencoderModelFactory();
~AutoencoderModelFactory() ITK_OVERRIDE;
private:
AutoencoderModelFactoryBase(const Self &); //purposely not implemented
AutoencoderModelFactory(const Self &); //purposely not implemented
void operator =(const Self&); //purposely not implemented
};
......
......@@ -30,7 +30,7 @@
namespace otb
{
template <class TInputValue, class TOutputValue, class NeuronType>
AutoencoderModelFactoryBase<TInputValue,TOutputValue, NeuronType>::AutoencoderModelFactoryBase()
AutoencoderModelFactory<TInputValue,TOutputValue, NeuronType>::AutoencoderModelFactory()
{
std::string classOverride = std::string("DimensionalityReductionModel");
......@@ -45,18 +45,18 @@ AutoencoderModelFactoryBase<TInputValue,TOutputValue, NeuronType>::AutoencoderMo
}
template <class TInputValue, class TOutputValue, class NeuronType>
AutoencoderModelFactoryBase<TInputValue,TOutputValue, NeuronType>::~AutoencoderModelFactoryBase()
AutoencoderModelFactory<TInputValue,TOutputValue, NeuronType>::~AutoencoderModelFactory()
{
}
template <class TInputValue, class TOutputValue, class NeuronType>
const char* AutoencoderModelFactoryBase<TInputValue,TOutputValue, NeuronType>::GetITKSourceVersion(void) const
const char* AutoencoderModelFactory<TInputValue,TOutputValue, NeuronType>::GetITKSourceVersion(void) const
{
return ITK_SOURCE_VERSION;
}
template <class TInputValue, class TOutputValue, class NeuronType>
const char* AutoencoderModelFactoryBase<TInputValue,TOutputValue, NeuronType>::GetDescription() const
const char* AutoencoderModelFactory<TInputValue,TOutputValue, NeuronType>::GetDescription() const
{
return "Autoencoder model factory";
}
......
......@@ -38,7 +38,7 @@ namespace otb
template <class TInputValue, class TTargetValue>
using AutoencoderModelFactory = AutoencoderModelFactoryBase<TInputValue, TTargetValue, shark::LogisticNeuron> ;
using LogAutoencoderModelFactory = AutoencoderModelFactory<TInputValue, TTargetValue, shark::LogisticNeuron> ;
template <class TInputValue, class TTargetValue>
......@@ -121,7 +121,7 @@ DimensionalityReductionModelFactory<TInputValue,TOutputValue>
#ifdef OTB_USE_SHARK
RegisterFactory(PCAModelFactory<TInputValue,TOutputValue>::New());
RegisterFactory(AutoencoderModelFactory<TInputValue,TOutputValue>::New());
RegisterFactory(LogAutoencoderModelFactory<TInputValue,TOutputValue>::New());
// RegisterFactory(TiedAutoencoderModelFactory<TInputValue,TOutputValue>::New());
#endif
......@@ -188,8 +188,8 @@ DimensionalityReductionModelFactory<TInputValue,TOutputValue>
#ifdef OTB_USE_SHARK
AutoencoderModelFactory<TInputValue,TOutputValue> *aeFactory =
dynamic_cast<AutoencoderModelFactory<TInputValue,TOutputValue> *>(*itFac);
LogAutoencoderModelFactory<TInputValue,TOutputValue> *aeFactory =
dynamic_cast<LogAutoencoderModelFactory<TInputValue,TOutputValue> *>(*itFac);
if (aeFactory)
{
itk::ObjectFactoryBase::UnRegisterFactory(aeFactory);
......
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