Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync with inria repo #14

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 26 additions & 29 deletions include/itkGPUSmoothingRecursiveYvvGaussianImageFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,58 +54,55 @@ class ITK_EXPORT GPUSmoothingRecursiveYvvGaussianImageFilter:
SmoothingRecursiveYvvGaussianImageFilter< TInputImage, TOutputImage > >
{
public:
ITK_DISALLOW_COPY_AND_ASSIGN(GPUSmoothingRecursiveYvvGaussianImageFilterKernel);
ITK_DISALLOW_COPY_AND_ASSIGN(GPUSmoothingRecursiveYvvGaussianImageFilter);

/** Standard class typedefs. */
typedef GPUSmoothingRecursiveYvvGaussianImageFilter Self;
/** Standard class type alias. */
using Self = GPUSmoothingRecursiveYvvGaussianImageFilter;
//typedef SmoothingRecursiveYvvGaussianImageFilter<TInputImage,TOutputImage>
// CPUSuperclass;
typedef GPUImageToImageFilter< TInputImage, TOutputImage,
SmoothingRecursiveYvvGaussianImageFilter< TInputImage, TOutputImage > > Superclass;
typedef GPUImageToImageFilter< TInputImage, TOutputImage,
SmoothingRecursiveYvvGaussianImageFilter< TInputImage, TOutputImage > > GPUSuperclass;
typedef SmartPointer< Self >
Pointer;
typedef SmartPointer< const Self >
ConstPointer;
using Superclass = GPUImageToImageFilter< TInputImage, TOutputImage,
SmoothingRecursiveYvvGaussianImageFilter< TInputImage, TOutputImage > >;
using GPUSuperclass = GPUImageToImageFilter< TInputImage, TOutputImage,
SmoothingRecursiveYvvGaussianImageFilter< TInputImage, TOutputImage > >;
using Pointer = SmartPointer< Self >;
using ConstPointer = SmartPointer< const Self >;

/** Pixel Type of the input image */
typedef TInputImage InputImageType;
typedef TOutputImage OutputImageType;
typedef typename TInputImage::PixelType PixelType;
using InputImageType = TInputImage;
using OutputImageType = TOutputImage;
using PixelType = typename TInputImage::PixelType;
#ifdef WITH_DOUBLE
typedef typename NumericTraits< PixelType >::RealType RealType;
typedef typename NumericTraits< PixelType >::ScalarRealType ScalarRealType;
using RealType = typename NumericTraits< PixelType >::RealType;
using ScalarRealType = typename NumericTraits< PixelType >::ScalarRealType;
#else
typedef typename NumericTraits< PixelType >::FloatType RealType;
typedef typename NumericTraits< PixelType >::FloatType ScalarRealType;
using RealType = typename NumericTraits< PixelType >::FloatType;
using ScalarRealType = typename NumericTraits< PixelType >::FloatType;
#endif

typedef typename itk::GPUTraits< TInputImage >::Type GPUInputImage;
typedef typename itk::GPUTraits< TOutputImage >::Type GPUOutputImage;
using GPUInputImage = typename itk::GPUTraits< TInputImage >::Type;
using GPUOutputImage = typename itk::GPUTraits< TOutputImage >::Type;

/** Runtime information support. */
itkTypeMacro(GPUSmoothingRecursiveYvvGaussianImageFilter,
GPUImageToImageFilter);

/** Image dimension. */
itkStaticConstMacro(ImageDimension, unsigned int,
TInputImage::ImageDimension);
static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;

/** Define the type for the sigma array */
typedef FixedArray< ScalarRealType,
itkGetStaticConstMacro(ImageDimension) > SigmaArrayType;
using SigmaArrayType = FixedArray< ScalarRealType,
itkGetStaticConstMacro(ImageDimension) >;

/** Define the image type for internal computations
RealType is usually 'double' in NumericTraits.
Here we prefer float in order to save memory. */

typedef typename NumericTraits< PixelType >::FloatType InternalRealType;
typedef GPUImage< InternalRealType,
itkGetStaticConstMacro(ImageDimension) > RealImageType;
using InternalRealType = typename NumericTraits< PixelType >::FloatType;
using RealImageType = GPUImage< InternalRealType,
itkGetStaticConstMacro(ImageDimension) >;

/** Pointer to the Output Image */
typedef typename OutputImageType::Pointer OutputImagePointer;
using OutputImagePointer = typename OutputImageType::Pointer;

/** Method for creation through the object factory. */
itkNewMacro(Self);
Expand Down Expand Up @@ -170,7 +167,7 @@ class ITK_EXPORT GPUSmoothingRecursiveYvvGaussianImageFilter:
// Initialization matrix for anti-causal pass
ScalarRealType *m_CPUMatrix;

typedef GPUDataManager::Pointer GPUDataPointer;
using GPUDataPointer = GPUDataManager::Pointer;

GPUDataPointer m_GPUMMatrixDataManager;
GPUDataPointer m_GPUBCoefficientsDataManager;
Expand Down
6 changes: 3 additions & 3 deletions include/itkGPUSmoothingRecursiveYvvGaussianImageFilter.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,9 @@ GPUSmoothingRecursiveYvvGaussianImageFilter< TInputImage, TOutputImage >
this->BuildKernel();
}

const unsigned int X = 0;
const unsigned int Y = 1;
const unsigned int Z = 2;
constexpr unsigned int X = 0;
constexpr unsigned int Y = 1;
constexpr unsigned int Z = 2;
// arguments set up
int argidx = 0;
const int ndim = (int)TInputImage::ImageDimension;
Expand Down
32 changes: 16 additions & 16 deletions include/itkRecursiveLineYvvGaussianImageFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,43 +48,43 @@ class ITK_EXPORT RecursiveLineYvvGaussianImageFilter:
public:
ITK_DISALLOW_COPY_AND_ASSIGN(RecursiveLineYvvGaussianImageFilter);

/** Standard class typedefs. */
typedef RecursiveLineYvvGaussianImageFilter Self;
typedef InPlaceImageFilter< TInputImage, TOutputImage > Superclass;
typedef SmartPointer< Self > Pointer;
typedef SmartPointer< const Self > ConstPointer;
/** Standard class type alias. */
using Self = RecursiveLineYvvGaussianImageFilter;
using Superclass = InPlaceImageFilter< TInputImage, TOutputImage >;
using Pointer = SmartPointer< Self >;
using ConstPointer = SmartPointer< const Self >;

/** Method for creation through the object factory. */
itkNewMacro(Self);

/** Type macro that defines a name for this class. */
itkTypeMacro(RecursiveLineYvvGaussianImageFilter, InPlaceImageFilter);

/** Smart pointer typedef support. */
typedef typename TInputImage::Pointer InputImagePointer;
typedef typename TInputImage::ConstPointer InputImageConstPointer;
/** Smart pointer type alias support. */
using InputImagePointer = typename TInputImage::Pointer;
using InputImageConstPointer = typename TInputImage::ConstPointer;

/** Real type to be used in internal computations. RealType in general is
* templated over the pixel type. (For example for vector or tensor pixels,
* RealType is a vector or a tensor of doubles.) ScalarRealType is a type
* meant for scalars.
*/
typedef typename TInputImage::PixelType InputPixelType;
using InputPixelType = typename TInputImage::PixelType;
#ifdef WITH_DOUBLE
typedef typename NumericTraits< InputPixelType >::RealType RealType;
typedef typename NumericTraits< InputPixelType >::ScalarRealType ScalarRealType;
using RealType = typename NumericTraits< InputPixelType >::RealType;
using ScalarRealType = typename NumericTraits< InputPixelType >::ScalarRealType;
#else
typedef typename NumericTraits< InputPixelType >::FloatType RealType;
typedef typename NumericTraits< InputPixelType >::FloatType ScalarRealType;
using RealType = typename NumericTraits< InputPixelType >::FloatType;
using ScalarRealType = typename NumericTraits< InputPixelType >::FloatType;
#endif

typedef typename TOutputImage::RegionType OutputImageRegionType;
using OutputImageRegionType = typename TOutputImage::RegionType;

/** Type of the input image */
typedef TInputImage InputImageType;
using InputImageType = TInputImage;

/** Type of the output image */
typedef TOutputImage OutputImageType;
using OutputImageType = TOutputImage;

/** Get the direction in which the filter is to be applied. */
itkGetConstMacro(Direction, unsigned int);
Expand Down
12 changes: 6 additions & 6 deletions include/itkRecursiveLineYvvGaussianImageFilter.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ void
RecursiveLineYvvGaussianImageFilter< TInputImage, TOutputImage >
::EnlargeOutputRequestedRegion(DataObject *output)
{
TOutputImage *out = dynamic_cast< TOutputImage * >( output );
auto *out = dynamic_cast< TOutputImage * >( output );

if ( out )
{
Expand Down Expand Up @@ -277,7 +277,7 @@ void
RecursiveLineYvvGaussianImageFilter< TInputImage, TOutputImage >
::BeforeThreadedGenerateData()
{
typedef ImageRegion< TInputImage::ImageDimension > RegionType;
using RegionType = ImageRegion< TInputImage::ImageDimension >;

typename TInputImage::ConstPointer inputImage( this->GetInputImage () );
typename TOutputImage::Pointer outputImage( this->GetOutput() );
Expand Down Expand Up @@ -315,12 +315,12 @@ void
RecursiveLineYvvGaussianImageFilter< TInputImage, TOutputImage >
::ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId)
{
typedef typename TOutputImage::PixelType OutputPixelType;
using OutputPixelType = typename TOutputImage::PixelType;

typedef ImageLinearConstIteratorWithIndex< TInputImage > InputConstIteratorType;
typedef ImageLinearIteratorWithIndex< TOutputImage > OutputIteratorType;
using InputConstIteratorType = ImageLinearConstIteratorWithIndex< TInputImage >;
using OutputIteratorType = ImageLinearIteratorWithIndex< TOutputImage >;

typedef ImageRegion< TInputImage::ImageDimension > RegionType;
using RegionType = ImageRegion< TInputImage::ImageDimension >;

typename TInputImage::ConstPointer inputImage( this->GetInputImage () );
typename TOutputImage::Pointer outputImage( this->GetOutput() );
Expand Down
43 changes: 21 additions & 22 deletions include/itkSmoothingRecursiveYvvGaussianImageFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,42 +51,41 @@ class ITK_EXPORT SmoothingRecursiveYvvGaussianImageFilter:
public:
ITK_DISALLOW_COPY_AND_ASSIGN(SmoothingRecursiveYvvGaussianImageFilter);

/** Standard class typedefs. */
typedef SmoothingRecursiveYvvGaussianImageFilter Self;
typedef InPlaceImageFilter< TInputImage, TOutputImage > Superclass;
typedef SmartPointer< Self > Pointer;
typedef SmartPointer< const Self > ConstPointer;
/** Standard class type alias. */
using Self = SmoothingRecursiveYvvGaussianImageFilter;
using Superclass = InPlaceImageFilter< TInputImage, TOutputImage >;
using Pointer = SmartPointer< Self >;
using ConstPointer = SmartPointer< const Self >;

/** Pixel Type of the input image */
typedef TInputImage InputImageType;
typedef TOutputImage OutputImageType;
typedef typename TInputImage::PixelType PixelType;
using InputImageType = TInputImage;
using OutputImageType = TOutputImage;
using PixelType = typename TInputImage::PixelType;
#ifdef WITH_DOUBLE
typedef typename NumericTraits< PixelType >::RealType RealType;
typedef typename NumericTraits< PixelType >::ScalarRealType ScalarRealType;
using RealType = typename NumericTraits< PixelType >::RealType;
using ScalarRealType = typename NumericTraits< PixelType >::ScalarRealType;
#else
typedef typename NumericTraits< PixelType >::FloatType RealType;
typedef typename NumericTraits< PixelType >::FloatType ScalarRealType;
using RealType = typename NumericTraits< PixelType >::FloatType;
using ScalarRealType = typename NumericTraits< PixelType >::FloatType;
#endif

/** Runtime information support. */
itkTypeMacro(SmoothingRecursiveYvvGaussianImageFilter,
InPlaceImageFilter);

/** Image dimension. */
itkStaticConstMacro(ImageDimension, unsigned int,
TInputImage::ImageDimension);
static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;

/** Define the type for the sigma array */
typedef FixedArray< ScalarRealType,
itkGetStaticConstMacro(ImageDimension) > SigmaArrayType;
using SigmaArrayType = FixedArray< ScalarRealType,
itkGetStaticConstMacro(ImageDimension) >;

/** Define the image type for internal computations
RealType is usually 'double' in NumericTraits.
Here we prefer float in order to save memory. */

typedef typename NumericTraits< PixelType >::FloatType InternalRealType;
typedef typename InputImageType::template Rebind< InternalRealType >::Type RealImageType;
using InternalRealType = typename NumericTraits< PixelType >::FloatType;
using RealImageType = typename InputImageType::template Rebind< InternalRealType >::Type;

/** The first in the pipeline */
typedef RecursiveLineYvvGaussianImageFilter<
Expand All @@ -107,16 +106,16 @@ class ITK_EXPORT SmoothingRecursiveYvvGaussianImageFilter:
> CastingFilterType;

/** Pointer to a gaussian filter. */
typedef typename InternalGaussianFilterType::Pointer InternalGaussianFilterPointer;
using InternalGaussianFilterPointer = typename InternalGaussianFilterType::Pointer;

/** Pointer to the first gaussian filter. */
typedef typename FirstGaussianFilterType::Pointer FirstGaussianFilterPointer;
using FirstGaussianFilterPointer = typename FirstGaussianFilterType::Pointer;

/** Pointer to the last filter, casting */
typedef typename CastingFilterType::Pointer CastingFilterPointer;
using CastingFilterPointer = typename CastingFilterType::Pointer;

/** Pointer to the Output Image */
typedef typename OutputImageType::Pointer OutputImagePointer;
using OutputImagePointer = typename OutputImageType::Pointer;

/** Method for creation through the object factory. */
itkNewMacro(Self);
Expand Down
2 changes: 1 addition & 1 deletion include/itkSmoothingRecursiveYvvGaussianImageFilter.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ void
SmoothingRecursiveYvvGaussianImageFilter< TInputImage, TOutputImage >
::EnlargeOutputRequestedRegion(DataObject *output)
{
TOutputImage *out = dynamic_cast< TOutputImage * >( output );
auto *out = dynamic_cast< TOutputImage * >( output );

if ( out )
{
Expand Down
4 changes: 2 additions & 2 deletions test/itkCPURecursiveYvvGaussianImageFilterTest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
#include <iostream>

#ifdef WITH_DOUBLE
typedef double PixelType;
using PixelType = double;
#else
typedef float PixelType;
using PixelType = float;
#endif

int itkCPURecursiveYvvGaussianImageFilterTest( int argc, char* argv[] )
Expand Down
4 changes: 2 additions & 2 deletions test/itkGPURecursiveYvvGaussianImageFilterTest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
#endif

#ifdef WITH_DOUBLE
typedef double PixelType;
using PixelType = double;
#else
typedef float PixelType;
using PixelType = float;
#endif

int itkGPURecursiveYvvGaussianImageFilterTest( int argc, char* argv[] )
Expand Down
4 changes: 2 additions & 2 deletions test/itkYvvBenchmark.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
#endif

#ifdef WITH_DOUBLE
typedef double PixelType;
using PixelType = double;
#else
typedef float PixelType;
using PixelType = float;
#endif

int itkYvvBenchmark( int argc, char* argv[] )
Expand Down
Loading