Commit 83d27ecf authored by Floris Berendsen's avatar Floris Berendsen
Browse files

STYLE: added "component" suffix to files according to class name #38

Additionally: renamed ItkNiftiImageSourceReferenceComponent to
ItkNiftiImageSourceComponent, since it serves as any of reference, floating and
warped. Removed includes for ItkImageSourceFixedComponent and
ItkImageSourceMovingComponent, since ItkImageSourceComponent serves both
purposes
parent c77ab06c
......@@ -17,8 +17,8 @@
*
*=========================================================================*/
#ifndef selxRegistrationController_h
#define selxRegistrationController_h
#ifndef selxRegistrationControllerComponent_h
#define selxRegistrationControllerComponent_h
#include "selxSuperElastixComponent.h"
//#include "selxInterfaces.h"
......@@ -88,6 +88,6 @@ protected:
};
} //end namespace selx
#ifndef ITK_MANUAL_INSTANTIATION
#include "selxRegistrationController.hxx"
#include "selxRegistrationControllerComponent.hxx"
#endif
#endif // #define selxRegistrationController_h
#endif // #define selxRegistrationControllerComponent_h
......@@ -17,7 +17,7 @@
*
*=========================================================================*/
#include "selxRegistrationController.h"
#include "selxRegistrationControllerComponent.h"
#include "selxCheckTemplateProperties.h"
namespace selx
......
......@@ -119,6 +119,6 @@ protected:
};
} //end namespace selx
#ifndef ITK_MANUAL_INSTANTIATION
#include "selxMonolithicElastix.hxx"
#include "selxMonolithicElastixComponent.hxx"
#endif
#endif // #define selxMonolithicElastix_h
......@@ -17,7 +17,7 @@
*
*=========================================================================*/
#include "selxMonolithicElastix.h"
#include "selxMonolithicElastixComponent.h"
#include "selxCheckTemplateProperties.h"
namespace selx
......
......@@ -116,6 +116,6 @@ protected:
};
} //end namespace selx
#ifndef ITK_MANUAL_INSTANTIATION
#include "selxMonolithicTransformix.hxx"
#include "selxMonolithicTransformixComponent.hxx"
#endif
#endif // #define GDOptimizer3rdPartyComponent_h
#endif // #define selxMonolithicTransformixComponent_h
......@@ -17,7 +17,7 @@
*
*=========================================================================*/
#include "selxMonolithicTransformix.h"
#include "selxMonolithicTransformixComponent.h"
#include "selxCheckTemplateProperties.h"
#include <string>
......
......@@ -21,13 +21,11 @@
#include "elxParameterObject.h"
#include "selxElastixComponent.h"
#include "selxMonolithicElastix.h"
#include "selxMonolithicTransformix.h"
#include "selxItkImageSink.h"
#include "selxItkImageSource.h"
#include "selxItkImageSourceFixed.h"
#include "selxItkImageSourceMoving.h"
#include "selxRegistrationController.h"
#include "selxMonolithicElastixComponent.h"
#include "selxMonolithicTransformixComponent.h"
#include "selxItkImageSinkComponent.h"
#include "selxItkImageSourceComponent.h"
#include "selxRegistrationControllerComponent.h"
#include "itkImageFileReader.h"
#include "itkImageFileWriter.h"
......
......@@ -17,8 +17,8 @@
*
*=========================================================================*/
#ifndef selxItkToNiftiImageSourceReferenceComponent_h
#define selxItkToNiftiImageSourceReferenceComponent_h
#ifndef selxItkToNiftiImageSourceComponent_h
#define selxItkToNiftiImageSourceComponent_h
#include "selxSuperElastixComponent.h"
#include "selxInterfaces.h"
......@@ -37,7 +37,7 @@
namespace selx
{
template< int Dimensionality, class TPixel >
class ItkToNiftiImageSourceReferenceComponent :
class ItkToNiftiImageSourceComponent :
public SuperElastixComponent<
Accepting< >,
Providing< SourceInterface, NiftyregReferenceImageInterface< TPixel >, NiftyregFloatingImageInterface< TPixel >, NiftyregWarpedImageInterface< TPixel >, itkImageDomainFixedInterface<Dimensionality> >
......@@ -46,7 +46,7 @@ class ItkToNiftiImageSourceReferenceComponent :
public:
/** Standard ITK typedefs. */
typedef ItkToNiftiImageSourceReferenceComponent< Dimensionality, TPixel > Self;
typedef ItkToNiftiImageSourceComponent< Dimensionality, TPixel > Self;
typedef SuperElastixComponent<
Accepting< >,
Providing< SourceInterface, NiftyregReferenceImageInterface< TPixel >, NiftyregFloatingImageInterface< TPixel >, NiftyregWarpedImageInterface< TPixel >, itkImageDomainFixedInterface<Dimensionality> >
......@@ -62,8 +62,8 @@ public:
using ItkImageDomainType = typename itkImageDomainFixedInterface<Dimensionality>::ItkImageDomainType;
ItkToNiftiImageSourceReferenceComponent( const std::string & name, const LoggerInterface & logger );
virtual ~ItkToNiftiImageSourceReferenceComponent();
ItkToNiftiImageSourceComponent( const std::string & name, const LoggerInterface & logger );
virtual ~ItkToNiftiImageSourceComponent();
// providing interfaces
//virtual std::shared_ptr<nifti_image> GetFloatingNiftiImage() override;
......@@ -92,11 +92,11 @@ protected:
// return the class name and the template arguments to uniquely identify this component.
static inline const std::map< std::string, std::string > TemplateProperties()
{
return{ { keys::NameOfClass, "ItkToNiftiImageSourceReferenceComponent" }, { keys::PixelType, PodString< TPixel >::Get() }, { keys::Dimensionality, std::to_string(Dimensionality) } };
return{ { keys::NameOfClass, "ItkToNiftiImageSourceComponent" }, { keys::PixelType, PodString< TPixel >::Get() }, { keys::Dimensionality, std::to_string(Dimensionality) } };
}
};
} //end namespace selx
#ifndef ITK_MANUAL_INSTANTIATION
#include "selxItkToNiftiImageSourceReferenceComponent.hxx"
#include "selxItkToNiftiImageSourceComponent.hxx"
#endif
#endif // #define selxItkToNiftiImageSourceReferenceComponent_h
#endif // #define selxItkToNiftiImageSourceComponent_h
......@@ -17,20 +17,20 @@
*
*=========================================================================*/
#include "selxItkToNiftiImageSourceReferenceComponent.h"
#include "selxItkToNiftiImageSourceComponent.h"
#include "selxCheckTemplateProperties.h"
namespace selx
{
template< int Dimensionality, class TPixel >
ItkToNiftiImageSourceReferenceComponent< Dimensionality, TPixel >::ItkToNiftiImageSourceReferenceComponent(const std::string & name, const LoggerInterface & logger) : Superclass(name,
ItkToNiftiImageSourceComponent< Dimensionality, TPixel >::ItkToNiftiImageSourceComponent(const std::string & name, const LoggerInterface & logger) : Superclass(name,
logger), m_Image(nullptr)
{
}
template< int Dimensionality, class TPixel >
ItkToNiftiImageSourceReferenceComponent< Dimensionality, TPixel >::~ItkToNiftiImageSourceReferenceComponent()
ItkToNiftiImageSourceComponent< Dimensionality, TPixel >::~ItkToNiftiImageSourceComponent()
{
}
......@@ -38,7 +38,7 @@ ItkToNiftiImageSourceReferenceComponent< Dimensionality, TPixel >::~ItkToNiftiIm
template< int Dimensionality, class TPixel >
std::shared_ptr<nifti_image>
ItkToNiftiImageSourceReferenceComponent< Dimensionality, TPixel >::GetReferenceNiftiImage()
ItkToNiftiImageSourceComponent< Dimensionality, TPixel >::GetReferenceNiftiImage()
{
if( this->m_Image == nullptr )
{
......@@ -59,7 +59,7 @@ ItkToNiftiImageSourceReferenceComponent< Dimensionality, TPixel >::GetReferenceN
template< int Dimensionality, class TPixel >
std::shared_ptr<nifti_image>
ItkToNiftiImageSourceReferenceComponent< Dimensionality, TPixel >::GetFloatingNiftiImage()
ItkToNiftiImageSourceComponent< Dimensionality, TPixel >::GetFloatingNiftiImage()
{
if (this->m_Image == nullptr)
{
......@@ -80,7 +80,7 @@ ItkToNiftiImageSourceReferenceComponent< Dimensionality, TPixel >::GetFloatingNi
template< int Dimensionality, class TPixel >
std::shared_ptr<nifti_image>
ItkToNiftiImageSourceReferenceComponent< Dimensionality, TPixel >::GetWarpedNiftiImage()
ItkToNiftiImageSourceComponent< Dimensionality, TPixel >::GetWarpedNiftiImage()
{
if (this->m_Image == nullptr)
{
......@@ -101,7 +101,7 @@ ItkToNiftiImageSourceReferenceComponent< Dimensionality, TPixel >::GetWarpedNift
template< int Dimensionality, class TPixel >
void
ItkToNiftiImageSourceReferenceComponent< Dimensionality, TPixel >
ItkToNiftiImageSourceComponent< Dimensionality, TPixel >
::SetMiniPipelineInput( itk::DataObject::Pointer object )
{
this->m_Image = dynamic_cast< ItkImageType * >( object.GetPointer() );
......@@ -115,7 +115,7 @@ ItkToNiftiImageSourceReferenceComponent< Dimensionality, TPixel >
template< int Dimensionality, class TPixel >
typename AnyFileReader::Pointer
ItkToNiftiImageSourceReferenceComponent< Dimensionality, TPixel >::GetInputFileReader()
ItkToNiftiImageSourceComponent< Dimensionality, TPixel >::GetInputFileReader()
{
// Instanstiate an image file reader, decorated such that it can be implicitly cast to an AnyFileReaderType
return DecoratedReaderType::New().GetPointer();
......@@ -123,8 +123,8 @@ ItkToNiftiImageSourceReferenceComponent< Dimensionality, TPixel >::GetInputFileR
template< int Dimensionality, class TPixel >
typename ItkToNiftiImageSourceReferenceComponent< Dimensionality, TPixel >::ItkImageDomainType::Pointer
ItkToNiftiImageSourceReferenceComponent< Dimensionality, TPixel >
typename ItkToNiftiImageSourceComponent< Dimensionality, TPixel >::ItkImageDomainType::Pointer
ItkToNiftiImageSourceComponent< Dimensionality, TPixel >
::GetItkImageDomainFixed()
{
if (this->m_Image == nullptr)
......@@ -137,7 +137,7 @@ ItkToNiftiImageSourceReferenceComponent< Dimensionality, TPixel >
template< int Dimensionality, class TPixel >
bool
ItkToNiftiImageSourceReferenceComponent< Dimensionality, TPixel >::MeetsCriterion(const ComponentBase::CriterionType & criterion)
ItkToNiftiImageSourceComponent< Dimensionality, TPixel >::MeetsCriterion(const ComponentBase::CriterionType & criterion)
{
bool hasUndefinedCriteria( false );
bool meetsCriteria( false );
......
......@@ -19,14 +19,14 @@
#include "selxSuperElastixFilterCustomComponents.h"
#include "selxRegistrationController.h"
#include "selxRegistrationControllerComponent.h"
#include "selxNiftyregReadImageComponent.h"
#include "selxNiftyregWriteImageComponent.h"
#include "selxNiftyregWriteImageComponent.h"
#include "selxItkToNiftiImageSourceReferenceComponent.h"
#include "selxItkToNiftiImageSourceComponent.h"
#include "selxNiftiToItkImageSinkComponent.h"
#include "selxItkImageSource.h"
#include "selxItkImageSourceComponent.h"
#include "itkImageFileReader.h"
#include "itkImageFileWriter.h"
#include "selxNiftyregf3dComponent.h"
......@@ -50,10 +50,10 @@ public:
typedef TypeList < Niftyregf3dComponent< float >,
NiftyregReadImageComponent< float >,
NiftyregWriteImageComponent< float >,
ItkToNiftiImageSourceReferenceComponent< 2, float >,
ItkToNiftiImageSourceComponent< 2, float >,
NiftiToItkImageSinkComponent<2, float>,
ItkImageSourceComponent<2, float>,
ItkToNiftiImageSourceReferenceComponent< 3, float >,
ItkToNiftiImageSourceComponent< 3, float >,
NiftiToItkImageSinkComponent<3, float>,
ItkImageSourceComponent<3, float>,
RegistrationControllerComponent< >> RegisterComponents;
......@@ -111,7 +111,7 @@ TEST_F(NiftyregComponentTest, ItkToNiftiImage)
{
/** make example blueprint configuration */
BlueprintPointer blueprint = BlueprintPointer(new Blueprint());
blueprint->SetComponent("FixedImage", { { "NameOfClass", { "ItkToNiftiImageSourceReferenceComponent" } }, { "Dimensionality", { "3" } }, { "PixelType", { "float" } } } );
blueprint->SetComponent("FixedImage", { { "NameOfClass", { "ItkToNiftiImageSourceComponent" } }, { "Dimensionality", { "3" } }, { "PixelType", { "float" } } } );
blueprint->SetComponent("ResultImage", { { "NameOfClass", { "NiftyregWriteImageComponent" } }, { "FileName", { this->dataManager->GetOutputFile("ItkToNiftiImage_converted.nii.gz") } } });
blueprint->SetComponent("Controller", { { "NameOfClass", { "RegistrationControllerComponent" } } });
......@@ -185,8 +185,8 @@ TEST_F(NiftyregComponentTest, Register2d_itkImages)
{ "Optimizer", { "Gradient" } },
{ "GridSpacingInVoxels", { "8", "8" } } });
blueprint->SetComponent("FixedImage", { { "NameOfClass", { "ItkToNiftiImageSourceReferenceComponent" } }, { "Dimensionality", { "2" } }, { "PixelType", { "float" } } });
blueprint->SetComponent("MovingImage", { { "NameOfClass", { "ItkToNiftiImageSourceReferenceComponent" } }, { "Dimensionality", { "2" } }, { "PixelType", { "float" } } });
blueprint->SetComponent("FixedImage", { { "NameOfClass", { "ItkToNiftiImageSourceComponent" } }, { "Dimensionality", { "2" } }, { "PixelType", { "float" } } });
blueprint->SetComponent("MovingImage", { { "NameOfClass", { "ItkToNiftiImageSourceComponent" } }, { "Dimensionality", { "2" } }, { "PixelType", { "float" } } });
blueprint->SetComponent("ResultImage", { { "NameOfClass", { "NiftiToItkImageSinkComponent" } }, { "Dimensionality", { "2" } }, { "PixelType", { "float" } } });
blueprint->SetComponent("Controller", { { "NameOfClass", { "RegistrationControllerComponent" } } });
......@@ -240,8 +240,8 @@ TEST_F(NiftyregComponentTest, WBIRDemo)
blueprint->SetComponent("RegistrationMethod", { { "NameOfClass", { "Niftyregf3dComponent" } } });
blueprint->SetComponent("FixedImage", { { "NameOfClass", { "ItkToNiftiImageSourceReferenceComponent" } }, { "Dimensionality", { "2" } }, { "PixelType", { "float" } } });
blueprint->SetComponent("MovingImage", { { "NameOfClass", { "ItkToNiftiImageSourceReferenceComponent" } }, { "Dimensionality", { "2" } }, { "PixelType", { "float" } } });
blueprint->SetComponent("FixedImage", { { "NameOfClass", { "ItkToNiftiImageSourceComponent" } }, { "Dimensionality", { "2" } }, { "PixelType", { "float" } } });
blueprint->SetComponent("MovingImage", { { "NameOfClass", { "ItkToNiftiImageSourceComponent" } }, { "Dimensionality", { "2" } }, { "PixelType", { "float" } } });
blueprint->SetComponent("ResultImage", { { "NameOfClass", { "NiftiToItkImageSinkComponent" } }, { "Dimensionality", { "2" } }, { "PixelType", { "float" } } });
blueprint->SetComponent("Controller", { { "NameOfClass", { "RegistrationControllerComponent" } } });
......
......@@ -92,6 +92,6 @@ protected:
};
} //end namespace selx
#ifndef ITK_MANUAL_INSTANTIATION
#include "selxDisplacementFieldItkImageFilterSink.hxx"
#include "selxDisplacementFieldItkImageFilterSinkComponent.hxx"
#endif
#endif // #define selxDisplacementFieldItkImageFilterSink_h
#endif // #define selxDisplacementFieldItkImageFilterSinkComponent_h
......@@ -17,7 +17,7 @@
*
*=========================================================================*/
#include "selxDisplacementFieldItkImageFilterSink.h"
#include "selxDisplacementFieldItkImageFilterSinkComponent.h"
#include "selxCheckTemplateProperties.h"
namespace selx
......
......@@ -17,8 +17,8 @@
*
*=========================================================================*/
#ifndef selxItkImageSink_h
#define selxItkImageSink_h
#ifndef selxItkImageSinkComponent_h
#define selxItkImageSinkComponent_h
#include "selxSuperElastixComponent.h"
#include "selxSinksAndSourcesInterfaces.h"
......@@ -89,6 +89,6 @@ protected:
};
} //end namespace selx
#ifndef ITK_MANUAL_INSTANTIATION
#include "selxItkImageSink.hxx"
#include "selxItkImageSinkComponent.hxx"
#endif
#endif // #define selxItkImageSink_h
#endif // #define selxItkImageSinkComponent_h
......@@ -17,7 +17,7 @@
*
*=========================================================================*/
#include "selxItkImageSink.h"
#include "selxItkImageSinkComponent.h"
#include "selxCheckTemplateProperties.h"
namespace selx
......
......@@ -17,8 +17,8 @@
*
*=========================================================================*/
#ifndef selxItkImageSource_h
#define selxItkImageSource_h
#ifndef selxItkImageSourceComponent_h
#define selxItkImageSourceComponent_h
#include "selxSuperElastixComponent.h"
#include "selxSinksAndSourcesInterfaces.h"
......@@ -92,6 +92,6 @@ protected:
};
} //end namespace selx
#ifndef ITK_MANUAL_INSTANTIATION
#include "selxItkImageSource.hxx"
#include "selxItkImageSourceComponent.hxx"
#endif
#endif // #define selxItkImageSource_h
......@@ -17,7 +17,7 @@
*
*=========================================================================*/
#include "selxItkImageSource.h"
#include "selxItkImageSourceComponent.h"
#include "selxCheckTemplateProperties.h"
namespace selx
......
......@@ -17,8 +17,8 @@
*
*=========================================================================*/
#ifndef selxItkImageSourceFixed_h
#define selxItkImageSourceFixed_h
#ifndef selxItkImageSourceFixedComponent_h
#define selxItkImageSourceFixedComponent_h
#include "selxSuperElastixComponent.h"
#include "selxSinksAndSourcesInterfaces.h"
......@@ -89,6 +89,6 @@ protected:
};
} //end namespace selx
#ifndef ITK_MANUAL_INSTANTIATION
#include "selxItkImageSourceFixed.hxx"
#include "selxItkImageSourceFixedComponent.hxx"
#endif
#endif // #define selxItkImageSourceFixed_h
#endif // #define selxItkImageSourceFixedComponent_h
......@@ -17,7 +17,7 @@
*
*=========================================================================*/
#include "selxItkImageSourceFixed.h"
#include "selxItkImageSourceFixedComponent.h"
#include "selxCheckTemplateProperties.h"
namespace selx
......
......@@ -17,8 +17,8 @@
*
*=========================================================================*/
#ifndef selxItkImageSourceMoving_h
#define selxItkImageSourceMoving_h
#ifndef selxItkImageSourceMovingComponent_h
#define selxItkImageSourceMovingComponent_h
#include "selxSuperElastixComponent.h"
#include "selxSinksAndSourcesInterfaces.h"
......@@ -80,6 +80,6 @@ protected:
};
} //end namespace selx
#ifndef ITK_MANUAL_INSTANTIATION
#include "selxItkImageSourceMoving.hxx"
#include "selxItkImageSourceMovingComponent.hxx"
#endif
#endif // #define selxItkImageSourceMoving_h
#endif // #define selxItkImageSourceMovingComponent_h
......@@ -17,7 +17,7 @@
*
*=========================================================================*/
#include "selxItkImageSourceMoving.h"
#include "selxItkImageSourceMovingComponent.h"
#include "selxCheckTemplateProperties.h"
namespace selx
......
Markdown is supported
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