Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
907bbc7
ENH: Going public.
Jul 9, 2013
c5f8117
ENH: Change in tests and double-precision detection.
Jul 9, 2013
ac27e65
ENH: Switch ITK_USE_GPU on/off depending on try_run.
Jul 10, 2013
c5d61f4
BUG: Fixed compilation when no OpenCL platform detected.
Jul 12, 2013
0613261
ENH: Remote module / ctest
Jul 17, 2013
ececa8b
BUG: Fix remote test conf.
Jul 17, 2013
6cca123
BUG: Fix ctests.
Jul 22, 2013
d6d5736
ENH: added EXCLUDE_FROM_ALL tag
Jul 24, 2013
e6514f1
ENH: Sleep for stress tests.
Jul 25, 2013
6485c7f
ENH: Use normalised RMS error for ctest.
Jul 26, 2013
02b897f
ENH: Use normalised RMS error for ctest.
Jul 26, 2013
3e9c381
ENH: Merge branch 'master' of github.com:Inria-Asclepios/SmoothingRec…
Jul 26, 2013
6e5f80f
ENH: Merge branch 'master' of github.com:Inria-Asclepios/SmoothingRec…
Jul 26, 2013
e0a33e8
ENH: Merge branch 'master' of github.com:Inria-Asclepios/SmoothingRec…
Jul 26, 2013
5f26231
DOC: Copyright + doxygen doc.
Jul 29, 2013
406bc01
COMP: [CPU] Vectorial images. CMake sets double for CPU by default.
Jul 30, 2013
6ad8051
STYLE: Remove "ITK" from the module name.
XiaoxiaoLiu Aug 26, 2013
c8ced18
ENH: Merge pull request #1 from XiaoxiaoLiu/master
Aug 28, 2013
c33c7c9
BUG: FIX: ITK warnings of deprecated EXCLUDE_FROM_ALL.
XiaoxiaoLiu Sep 12, 2013
5a8151f
ENH: Merge pull request #2 from XiaoxiaoLiu/master
Sep 12, 2013
efa1ce3
BUG: Fix: ITK EXCLUDE_FROM_ALL warning for GPU case.
Jan 14, 2014
634fd17
COMP: Fix compliler warnings
brianhelba Feb 5, 2014
5691c65
COMP: Merge pull request #3 from brianhelba/Warning-Fix
Feb 6, 2014
a91400c
ENH: CPU-YVV: InPlace filter
Feb 26, 2014
08d3274
ENH: uncrustify
Feb 26, 2014
6df664b
BUG: Add itk_module_target call for library.
thewtex Feb 20, 2015
6a79b33
ENH: Merge pull request #4 from thewtex/itk_module_target
ividal Feb 20, 2015
db4f344
ENH: added files for python wrapping of remote module YVV Recursive G…
Jan 8, 2016
5d49867
ENH: Merge pull request #6 from renbem/master
msermesant Feb 5, 2016
c6d8498
STYLE: Use Macro for Function Deletion
zachary-williamson Jun 30, 2016
73705aa
ENH: Merge pull request #7 from zachary-williamson/master
tvercaut Jul 1, 2016
187afde
ENH: ITKv5 override consistency
hjmjohnson Dec 17, 2017
f4c1831
COMP: Use C++11 override directly
hjmjohnson Dec 17, 2017
d4da61e
COMP: Use nullptr instead of 0 or NULL
hjmjohnson Dec 17, 2017
935d03a
COMP: Fix unsigned/signed loop index mismatch.
hjmjohnson Dec 22, 2017
cefcc46
ENH: Merge pull request #1 from InsightSoftwareConsortium/ITKv5_20180…
hjmjohnson Jan 29, 2018
8ab913b
STYLE: Modernize to C++11 conventions
hjmjohnson Feb 12, 2018
019f1c3
STYLE: Merge pull request #10 from InsightSoftwareConsortium/ITKv5Style
tvercaut Feb 12, 2018
97d7317
STYLE: Replace itkStaticConstMacro with static constexpr
hjmjohnson Feb 13, 2018
678ee12
STYLE: Prefer C++11 type alias over typedef
hjmjohnson Feb 13, 2018
7fd8ed2
STYLE: Prefer constexpr for const numeric literals
hjmjohnson Feb 13, 2018
bdce855
COMP: Move ITK_DISALLOW_COPY_AND_ASSIGN calls to public section.
Apr 14, 2018
748943c
ENH: Merge pull request #2 from jhlegarreta/MoveDISALLOWCOPYANDASSIGN…
thewtex Apr 20, 2018
dacc5ae
STYLE: reformatting the tests to be more compliant with ITK style
dzenanz Jul 20, 2018
37eb369
STYLE: adding copyright headers and style-compliant include guards
dzenanz Jul 20, 2018
793f551
STYLE: removing verbose debugging code
dzenanz Jul 20, 2018
47bc5e7
ENH: adapting to new threading mechanism introduced by ITKv5
dzenanz Jul 20, 2018
2c11333
ENH: Merge pull request #3 from dzenanz/itk5threading
dzenanz Jul 25, 2018
886b6b2
COMP: Change the include file style.
jhlegarreta Oct 17, 2018
d8553e1
ENH: Add CI.
jhlegarreta Oct 17, 2018
d9892c2
ENH: Merge pull request #8 from jhlegarreta/AddCI
hjmjohnson Nov 3, 2018
c315247
STYLE: Merge pull request #7 from jhlegarreta/ChangeIncludeStyle
hjmjohnson Nov 3, 2018
b2b939d
STYLE: Prefer error checked std::sto[id] over ato[if].
jhlegarreta Nov 2, 2018
5df3463
COMP: Future proof vnl_math_XXX function usage.
hjmjohnson Nov 3, 2018
a0aa35a
ENH: Merge branch 'master' of https://github.com/Inria-Asclepios/Smoo…
jhlegarreta Nov 6, 2018
afe79c8
ENH: Merge pull request #14 from jhlegarreta/SyncWithInriaRepo
hjmjohnson Nov 6, 2018
5028a47
BUG: Fix test errors.
jhlegarreta Nov 26, 2018
8861900
ENH: Merge pull request #19 from jhlegarreta/FixTestErrors
dzenanz Nov 26, 2018
43aa1f8
STYLE: Conform to modern CMake coding style.
jhlegarreta Nov 26, 2018
02dfe4f
COMP: Merge pull request #18 from jhlegarreta/ConformToCMakeStyle
jhlegarreta Nov 27, 2018
cc87088
STYLE: Make the test arguments be grouped compactly.
jhlegarreta Dec 24, 2018
7465cb2
COMP: Merge pull request #21 from jhlegarreta/ImproveTestingCMakeList…
hjmjohnson Dec 27, 2018
ee56385
ENH: Cast the binary data to the testing framework.
jhlegarreta Dec 24, 2018
0a343f8
ENH: Merge pull request #22 from jhlegarreta/CastDataBinariesToTestin…
jhlegarreta Dec 29, 2018
e9aec33
ENH: Add .gitattributes to allow running ITK clang-formatting scripts
hjmjohnson Feb 20, 2020
18e8028
STYLE: Remove CMake-language block-end command arguments
hjmjohnson Feb 16, 2020
9e44ed2
COMP: Use nullptr instead of 0 or NULL
hjmjohnson Feb 17, 2020
95fe028
STYLE: Use override statements for C++11
hjmjohnson Feb 17, 2020
1b4629e
STYLE: Prefer = default to explicitly trivial implementations
hjmjohnson Feb 17, 2020
903c312
STYLE: Remove redundant void argument lists
hjmjohnson Feb 17, 2020
edec1e1
STYLE: Use auto for variable type matches the type of the initializer
hjmjohnson Feb 18, 2020
3ab6178
DOC: Update copyright assignment to NumFOCUS
hjmjohnson Feb 19, 2020
88aded7
STYLE: Improve variable name description.
hjmjohnson Feb 20, 2020
ec3be42
COMP: Match template style more closely.
hjmjohnson Mar 1, 2020
cd4e681
BUG: Replace throw to ITK_NOEXCEPT to fix compiler warnings
mseng10 Nov 20, 2020
04635d1
ENH: Merge pull request #25 from InsightSoftwareConsortium/github-act…
thewtex Nov 26, 2020
0341c81
STYLE: Rename ITK_DISALLOW_COPY_AND_ASSIGN to ITK_DISALLOW_COPY_AND_MOVE
mseng10 Oct 16, 2020
fa2318a
COMP: Add missing ';' at end of macro
mseng10 Dec 29, 2020
219c19b
COMP: Remove inclusion of .hxx files as headers
hjmjohnson Dec 17, 2021
d885043
ENH: Bump ITK version and change http links to https
tbirdso May 31, 2022
c3d6d51
ENH: Modernize CMake to use itk_module_add_library
blowekamp Jan 27, 2026
07c5055
COMP: Merge pull request #33 from InsightSoftwareConsortium/modernize…
blowekamp Jan 27, 2026
37c51f8
ENH: Ingest ITKSmoothingRecursiveYvvGaussianFilter into Modules/Filte…
hjmjohnson May 9, 2026
c3f9fb3
DOC: Add SmoothingRecursiveYvvGaussianFilter README and in-tree CMake…
hjmjohnson May 9, 2026
3540d84
COMP: Remove SmoothingRecursiveYvvGaussianFilter .remote.cmake (in-tree)
hjmjohnson May 9, 2026
0246315
ENH: Enable Module_SmoothingRecursiveYvvGaussianFilter in configure-ci
hjmjohnson May 9, 2026
dd5c985
STYLE: gersemi-format SmoothingRecursiveYvvGaussianFilter src/CMakeLi…
hjmjohnson May 9, 2026
2bdf168
BUG: Recompute Yvv GPU coefficients against actual input spacing
hjmjohnson May 12, 2026
c2940bf
BUG: Drop itkYvvBenchmark3D — input fixture 256x256x64.tif not available
hjmjohnson May 13, 2026
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
project(SmoothingRecursiveYvvGaussianFilter)

itk_module_impl()
29 changes: 29 additions & 0 deletions Modules/Filtering/SmoothingRecursiveYvvGaussianFilter/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# SmoothingRecursiveYvvGaussianFilter

In-tree ITK module providing the Vliet/Young/Verbeek recursive
Gaussian smoothing approximation as a drop-in alternative to the
canonical `itk::SmoothingRecursiveGaussianImageFilter`. The flagship
classes are
`itk::SmoothingRecursiveYvvGaussianImageFilter`,
`itk::RecursiveLineYvvGaussianImageFilter`, and the
`ITK_USE_GPU`-gated
`itk::GPUSmoothingRecursiveYvvGaussianImageFilter`.

## Origin

Ingested from the standalone remote module
[**InsightSoftwareConsortium/ITKSmoothingRecursiveYvvGaussianFilter**](https://github.com/InsightSoftwareConsortium/ITKSmoothingRecursiveYvvGaussianFilter)
on 2026-05-08, following the v4 ingestion guidelines defined in
InsightSoftwareConsortium/ITK#6204. The upstream repository will be
archived read-only after this PR merges; it remains reachable at the
URL above for historical reference (notably the `doc/` directory and
the upstream's bespoke top-level OpenCL detection, which were
intentionally not ingested — ITK's in-tree GPU support is provided
by `ITKGPUCommon`).

## References

- Bouilhol G., Pop C., Sarrut D.
*Recursive Implementation of Vliet/Young/Verbeek Gaussian Smoothing.*
The Insight Journal. January-December. 2013.
<https://doi.org/10.54294/2pejyl>
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
/*=========================================================================
*
* 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
*
* https://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 itkGPUSmoothingRecursiveYvvGaussianImageFilter_h
#define itkGPUSmoothingRecursiveYvvGaussianImageFilter_h

#ifdef GPU

# include "itkImage.h"
# include "itkPixelTraits.h"
# include "itkCommand.h"
# include "itkFixedArray.h"
# include "itkSmoothingRecursiveYvvGaussianImageFilter.h"
# include "itkOpenCLUtil.h"
# include "itkGPUImageToImageFilter.h"

namespace itk
{
/**
* \class GPUSmoothingRecursiveYvvGaussianImageFilter
* \brief Recursive Gaussian blur based on Young-Van Vliet's algorithm and
* implemented for GPU.
*
* The GPU implementation is more efficient than the CPU
* the bigger the image is; use the benchmark tests to establish the size for which
* the GPU performs better for your particular hardware configuration.
*
* More information in the Insight Journal publication:
* https://hdl.handle.net/10380/3425
*
* \ingroup SmoothingRecursiveYvvGaussianFilter
*/

itkGPUKernelClassMacro(GPUSmoothingRecursiveYvvGaussianImageFilterKernel);

template <typename TInputImage, typename TOutputImage = TInputImage>
class ITK_EXPORT GPUSmoothingRecursiveYvvGaussianImageFilter
: public GPUImageToImageFilter<TInputImage,
TOutputImage,
SmoothingRecursiveYvvGaussianImageFilter<TInputImage, TOutputImage>>
{
public:
ITK_DISALLOW_COPY_AND_MOVE(GPUSmoothingRecursiveYvvGaussianImageFilter);

/** Standard class type alias. */
using Self = GPUSmoothingRecursiveYvvGaussianImageFilter;
// typedef SmoothingRecursiveYvvGaussianImageFilter<TInputImage,TOutputImage>
// CPUSuperclass;
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 */
using InputImageType = TInputImage;
using OutputImageType = TOutputImage;
using PixelType = typename TInputImage::PixelType;
# ifdef WITH_DOUBLE
using RealType = typename NumericTraits<PixelType>::RealType;
using ScalarRealType = typename NumericTraits<PixelType>::ScalarRealType;
# else
using RealType = typename NumericTraits<PixelType>::FloatType;
using ScalarRealType = typename NumericTraits<PixelType>::FloatType;
# endif

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

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

/** Image dimension. */
static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;

/** Define the type for the sigma array */
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. */

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

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

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

/** Set Sigma value. Sigma is measured in the units of image spacing. You
may use the method SetSigma to set the same value across each axis or
use the method SetSigmaArray if you need different values along each
axis. */
void
SetSigmaArray(const SigmaArrayType & sigmas);

void
SetSigma(ScalarRealType sigma);

SigmaArrayType
GetSigmaArray() const;

ScalarRealType
GetSigma() const;

/** Define which normalization factor will be used for the Gaussian */
void
SetNormalizeAcrossScale(bool normalizeInScaleSpace);

itkGetConstMacro(NormalizeAcrossScale, bool);

virtual void
SetUp(ScalarRealType spacing);

# ifdef ITK_USE_CONCEPT_CHECKING
/** Begin concept checking */
itkConceptMacro(InputHasNumericTraitsCheck, (Concept::HasNumericTraits<PixelType>));
/** End concept checking */
# endif
/** Get OpenCL Kernel source as a string, creates a GetOpenCLSource method */
itkGetOpenCLSourceFromKernelMacro(GPUSmoothingRecursiveYvvGaussianImageFilterKernel);
void
SetInput(const TInputImage * input) override;
using Superclass::SetInput;

protected:
GPUSmoothingRecursiveYvvGaussianImageFilter();
~GPUSmoothingRecursiveYvvGaussianImageFilter() override = default;
void
PrintSelf(std::ostream & os, Indent indent) const override;

/** Generate Data */
void
GPUGenerateData() override;

/** GPUSmoothingRecursiveYvvGaussianImageFilter needs all of the input to produce an
* output. Therefore, GPUSmoothingRecursiveYvvGaussianImageFilter needs to provide
* an implementation for GenerateInputRequestedRegion in order to inform
* the pipeline execution model.
* \sa ImageToImageFilter::GenerateInputRequestedRegion() */
void
GenerateInputRequestedRegion() ITK_NOEXCEPT override;

// Override since the filter produces the entire dataset
void
EnlargeOutputRequestedRegion(DataObject * output) override;

void
AllocateGPUCoefficients();

std::ostringstream defines;

ScalarRealType m_B1;
ScalarRealType m_B2;
ScalarRealType m_B3;
ScalarRealType m_B;
ScalarRealType * m_Bvalues;

// Initialization matrix for anti-causal pass
ScalarRealType * m_CPUMatrix;

using GPUDataPointer = GPUDataManager::Pointer;

GPUDataPointer m_GPUMMatrixDataManager;
GPUDataPointer m_GPUBCoefficientsDataManager;
GPUDataPointer m_GPULocalDataManager;

private:
void
BuildKernel();

/** Normalize the image across scale space */
bool m_NormalizeAcrossScale;

int m_FilterGPUKernelHandle;
typename GPUInputImage::Pointer inPtr;
typename GPUOutputImage::Pointer otPtr;
typename GPUOutputImage::SizeType m_requestedSize;
/** Standard deviation of the gaussian used for smoothing */
SigmaArrayType m_Sigma;
};
} // end namespace itk

# ifndef ITK_MANUAL_INSTANTIATION
# include "itkGPUSmoothingRecursiveYvvGaussianImageFilter.hxx"
# endif

#endif // GPU

#endif // itkGPUSmoothingRecursiveYvvGaussianImageFilter_h
Loading
Loading