Commit 31faac4b authored by Floris Berendsen's avatar Floris Berendsen
Browse files

WIP: SuperElastix/SuperElastix#19

parent 1e74ac21
......@@ -22,6 +22,7 @@
#include "selxSuperElastixComponent.h"
#include "selxInterfaces.h"
#include "selxSinksAndSourcesInterfaces.h"
#include "itkImageSource.h"
#include "elxElastixFilter.h"
......
/*=========================================================================
*
* Copyright Leiden University Medical Center, Erasmus University Medical
* Center and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
#ifndef selxElastixInterfaces_h
#define selxElastixInterfaces_h
#include "elxElastixFilter.h"
namespace selx
{
template< typename TFixedImage, typename TMovingImage >
class elastixTransformParameterObjectInterface
{
public:
typedef typename elastix::ElastixFilter< TFixedImage, TMovingImage >::ParameterObjectType elastixTransformParameterObject;
virtual elastixTransformParameterObject * GetTransformParameterObject() = 0;
};
} // end namespace selx
#endif // #define selxElastixInterfaces_h
......@@ -22,6 +22,8 @@
#include "selxSuperElastixComponent.h"
#include "selxInterfaces.h"
#include "selxElastixInterfaces.h"
#include "selxSinksAndSourcesInterfaces.h"
#include "itkImageSource.h"
#include "elxElastixFilter.h"
......
......@@ -22,6 +22,8 @@
#include "selxSuperElastixComponent.h"
#include "selxInterfaces.h"
#include "selxElastixInterfaces.h"
#include "selxSinksAndSourcesInterfaces.h"
#include "itkImageSource.h"
#include "elxElastixFilter.h"
......
/*=========================================================================
*
* Copyright Leiden University Medical Center, Erasmus University Medical
* Center and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
#ifndef selxExamplesInterfaces_h
#define selxExamplesInterfaces_h
namespace selx
{
// Define the providing interfaces abstractly
class MetricDerivativeInterface
{
public:
virtual int GetDerivative() = 0;
};
class MetricValueInterface
{
public:
virtual int GetValue() = 0;
};
class OptimizerUpdateInterface
{
public:
virtual int Update() = 0;
};
class TransformedImageInterface
{
public:
virtual int GetTransformedImage() = 0;
};
class ConflictinUpdateInterface
{
public:
// "error" : member function templates cannot be virtual
// template <class ConflictinUpdateInterface> virtual int Update() = 0;
//TODO http://en.cppreference.com/w/cpp/language/member_template
//TODO solution: http://stackoverflow.com/questions/2004820/inherit-interfaces-which-share-a-method-name
//TODO better?: http://stackoverflow.com/questions/18398409/c-inherit-from-multiple-base-classes-with-the-same-virtual-function-name
virtual int Update( ConflictinUpdateInterface * ) = 0;
};
} // end namespace selx
#endif // #define selxExamplesInterfaces_h
......@@ -22,6 +22,7 @@
#include "selxSuperElastixComponent.h"
#include "selxInterfaces.h"
#include "selxExamplesInterfaces.h"
#include "selxExample3rdPartyCode.h"
#include "selxMetric3rdPartyWrapper.h"
#include <string.h>
......
......@@ -22,6 +22,7 @@
#include "selxSuperElastixComponent.h"
#include "selxInterfaces.h"
#include "selxExamplesInterfaces.h"
#include "selxExample4thPartyCode.h"
#include "selxMetric4thPartyWrapper.h"
......
......@@ -22,6 +22,7 @@
#include "selxSuperElastixComponent.h"
#include "selxInterfaces.h"
#include "selxExamplesInterfaces.h"
#include "selxExample3rdPartyCode.h"
namespace selx
......
......@@ -22,6 +22,7 @@
#include "selxComponentBase.h"
#include "selxInterfaces.h"
#include "selxExamplesInterfaces.h"
#include "selxSuperElastixComponent.h"
#include "selxExample4thPartyCode.h"
......
......@@ -22,6 +22,7 @@
#include "selxSuperElastixComponent.h"
#include "selxInterfaces.h"
#include "selxExamplesInterfaces.h"
#include "selxMacro.h"
namespace selx
......
......@@ -22,10 +22,12 @@
#include "selxSuperElastixComponent.h"
#include "selxInterfaces.h"
#include "selxItkRegistrationMethodv4Interfaces.h"
#include "selxSinksAndSourcesInterfaces.h"
#include "itkSmoothingRecursiveGaussianImageFilter.h"
#include "itkImageSource.h"
#include <string.h>
#include "selxMacro.h"
namespace selx
{
template< int Dimensionality, class TPixel >
......
/*=========================================================================
*
* Copyright Leiden University Medical Center, Erasmus University Medical
* Center and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
#ifndef selxSinksAndSourcesInterfaces_h
#define selxSinksAndSourcesInterfaces_h
#include "itkDataObject.h"
#include "selxAnyFileReader.h"
#include "selxAnyFileWriter.h"
namespace selx
{
// Define the providing interfaces abstractly
class SourceInterface
{
// A special interface: the Overlord checks components for this type of interface.
// By this interface only Source Components can to talk to the Overlord.
// How specific Source Components connect to the graph is up to them, i.e. they might adapt the passed Object to other types.
public:
virtual void SetMiniPipelineInput( itk::DataObject::Pointer ) = 0;
virtual AnyFileReader::Pointer GetInputFileReader( void ) = 0;
};
class SinkInterface
{
// A special interface: the Overlord checks components for this type of interface.
// By this interface only Sink Components can to talk to the Overlord
// How specific Sink Components connect to the graph is up to them, i.e. they might adapt the passed Object to other types.
public:
typedef itk::DataObject::Pointer DataObjectPointer;
virtual void SetMiniPipelineOutput( DataObjectPointer ) = 0;
virtual DataObjectPointer GetMiniPipelineOutput( void ) = 0;
virtual AnyFileWriter::Pointer GetOutputFileWriter( void ) = 0;
virtual DataObjectPointer GetInitializedOutput( void ) = 0;
};
} // end namespace selx
#endif // #define selxSinksAndSourcesInterfaces_h
......@@ -20,11 +20,13 @@
#ifndef selxItkANTSNeighborhoodCorrelationImageToImageMetricv4Component_h
#define selxItkANTSNeighborhoodCorrelationImageToImageMetricv4Component_h
#include "selxComponentBase.h"
#include "selxSuperElastixComponent.h"
#include "selxInterfaces.h"
#include "selxItkRegistrationMethodv4Interfaces.h"
#include "selxSinksAndSourcesInterfaces.h"
#include "itkANTSNeighborhoodCorrelationImageToImageMetricv4.h"
#include <string.h>
#include "selxMacro.h"
namespace selx
{
template< int Dimensionality, class TPixel >
......
......@@ -20,11 +20,12 @@
#ifndef selxItkAffineTransformComponent_h
#define selxItkAffineTransformComponent_h
#include "selxComponentBase.h"
#include "selxSuperElastixComponent.h"
#include "selxInterfaces.h"
#include "selxItkRegistrationMethodv4Interfaces.h"
#include "selxSinksAndSourcesInterfaces.h"
#include "itkAffineTransform.h"
#include <string.h>
#include "selxMacro.h"
namespace selx
{
template< class InternalComputationValueType, int Dimensionality >
......
......@@ -20,11 +20,13 @@
#ifndef selxItkCompositeTransformComponent_h
#define selxItkCompositeTransformComponent_h
#include "selxComponentBase.h"
#include "selxSuperElastixComponent.h"
#include "selxInterfaces.h"
#include "selxItkRegistrationMethodv4Interfaces.h"
#include "selxSinksAndSourcesInterfaces.h"
#include "itkCompositeTransform.h"
#include <string.h>
#include "selxMacro.h"
namespace selx
{
template< class InternalComputationValueType, int Dimensionality >
......
......@@ -20,11 +20,13 @@
#ifndef selxItkGaussianExponentialDiffeomorphicTransformComponent_h
#define selxItkGaussianExponentialDiffeomorphicTransformComponent_h
#include "selxComponentBase.h"
#include "selxSuperElastixComponent.h"
#include "selxInterfaces.h"
#include "selxItkRegistrationMethodv4Interfaces.h"
#include "selxSinksAndSourcesInterfaces.h"
#include "itkGaussianExponentialDiffeomorphicTransform.h"
#include <string.h>
#include "selxMacro.h"
namespace selx
{
template< class InternalComputationValueType, int Dimensionality >
......
......@@ -22,13 +22,13 @@
#include "selxSuperElastixComponent.h"
#include "selxInterfaces.h"
#include "selxItkRegistrationMethodv4Interfaces.h"
#include "selxSinksAndSourcesInterfaces.h"
#include "itkImageRegistrationMethodv4.h"
#include "itkGradientDescentOptimizerv4.h"
#include "itkImageSource.h"
#include <itkTransformToDisplacementFieldFilter.h>
#include <string.h>
#include "selxMacro.h"
#include "itkTransformToDisplacementFieldFilter.h"
#include "itkComposeDisplacementFieldsImageFilter.h"
#include "itkGaussianExponentialDiffeomorphicTransform.h"
#include "itkGaussianExponentialDiffeomorphicTransformParametersAdaptor.h"
......
......@@ -20,11 +20,12 @@
#ifndef selxItkGradientDescentOptimizerv4Component_h
#define selxItkGradientDescentOptimizerv4Component_h
#include "selxComponentBase.h"
#include "selxSuperElastixComponent.h"
#include "selxInterfaces.h"
#include "selxItkRegistrationMethodv4Interfaces.h"
#include "selxSinksAndSourcesInterfaces.h"
#include "itkGradientDescentOptimizerv4.h"
#include <string.h>
#include "selxMacro.h"
namespace selx
{
......
......@@ -22,13 +22,13 @@
#include "selxSuperElastixComponent.h"
#include "selxInterfaces.h"
#include "selxItkRegistrationMethodv4Interfaces.h"
#include "selxSinksAndSourcesInterfaces.h"
#include "itkImageRegistrationMethodv4.h"
#include "itkGradientDescentOptimizerv4.h"
#include "itkImageSource.h"
#include <itkTransformToDisplacementFieldFilter.h>
#include <string.h>
#include "selxMacro.h"
#include "itkTransformToDisplacementFieldFilter.h"
#include "itkComposeDisplacementFieldsImageFilter.h"
namespace selx
......
......@@ -20,11 +20,13 @@
#ifndef selxItkMeanSquaresImageToImageMetricv4Component_h
#define selxItkMeanSquaresImageToImageMetricv4Component_h
#include "selxComponentBase.h"
#include "selxSuperElastixComponent.h"
#include "selxInterfaces.h"
#include "selxItkRegistrationMethodv4Interfaces.h"
#include "selxSinksAndSourcesInterfaces.h"
#include "itkMeanSquaresImageToImageMetricv4.h"
#include <string.h>
#include "selxMacro.h"
namespace selx
{
template< int Dimensionality, class TPixel, class InternalComputationValueType >
......
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