Skip to content

Commit

Permalink
ENH: Register default curvilinear FFT factory overrides
Browse files Browse the repository at this point in the history
Leverages ITK Python factory updates introduced in 10320a6 to initialize
default backends to run FFT on
`itk::CurvilinearArraySpecialCoordinatesImage` objects. Includes
additional wrappings for image inputs.

Closes issue KitwareMedical#172.
  • Loading branch information
tbirdso committed Mar 8, 2022
1 parent f322308 commit b6f7297
Show file tree
Hide file tree
Showing 11 changed files with 215 additions and 244 deletions.

This file was deleted.

This file was deleted.

80 changes: 80 additions & 0 deletions include/itkCurvilinearFFTImageFilterInitFactory.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/*=========================================================================
*
* Copyright NumFOCUS
*
* 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 itkCurvilinearFFTImageFilterInitFactory_h
#define itkCurvilinearFFTImageFilterInitFactory_h
#include "UltrasoundExport.h"

#include "itkLightObject.h"

namespace itk
{
/**
*\class CurvilinearFFTImageFilterInitFactory
* \brief Initialize FFT image filter factory backends.
*
* The purpose of CurvilinearFFTImageFilterInitFactory is to perform
* one-time registration of factory objects that handle
* creation of FFT image filter classes as applied to
* CurvilinearArraySpecialCoordinatesImage objects
* through the ITK object factory singleton mechanism.
*
* By default ITK registers Vnl FFT backends to operate on
* rectangular `itk::Image` inputs and outputs. ITKUltrasound
* expands default availability to apply FFTs to
* curvilinear images.
*
* \ingroup FourierTransform
* \ingroup ITKFFT
* \ingroup ITKSystemObjects
* \ingroup Ultrasound
*/
class Ultrasound_EXPORT CurvilinearFFTImageFilterInitFactory : public LightObject
{
public:
ITK_DISALLOW_COPY_AND_MOVE(CurvilinearFFTImageFilterInitFactory);

/** Standard class type aliases. */
using Self = CurvilinearFFTImageFilterInitFactory;
using Superclass = LightObject;
using Pointer = SmartPointer<Self>;
using ConstPointer = SmartPointer<const Self>;

/** Method for class instantiation. */
itkFactorylessNewMacro(Self);

/** Run-time type information (and related methods). */
itkTypeMacro(CurvilinearFFTImageFilterInitFactory, LightObject);

/** Mimic factory interface for Python initialization */
static void
RegisterOneFactory()
{
RegisterFactories();
}

/** Register all Curvilinear FFT factories */
static void
RegisterFactories();

protected:
CurvilinearFFTImageFilterInitFactory();
~CurvilinearFFTImageFilterInitFactory() override = default;
};
} // end namespace itk

#endif // itkCurvilinearFFTImageFilterInitFactory_h
2 changes: 2 additions & 0 deletions itk-module.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ itk_module(Ultrasound
TEST_DEPENDS
ITKVideoCore
ITKVideoIO
FACTORY_NAMES
"FFTImageFilterInit::Curvilinear"
EXCLUDE_FROM_DEFAULT
ENABLE_SHARED
DESCRIPTION
Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
set(Ultrasound_SRCS
itkCurvilinearFFTImageFilterInitFactory.cxx
itkHDF5UltrasoundImageIOFactory.cxx
itkHDF5UltrasoundImageIO.cxx
itkTextProgressBarCommand.cxx
Expand Down

0 comments on commit b6f7297

Please sign in to comment.