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
a2e92f5
ENH: Going public.
Jul 9, 2013
a825d31
ENH: Change in tests and double-precision detection.
Jul 9, 2013
6485fb8
ENH: Switch ITK_USE_GPU on/off depending on try_run.
Jul 10, 2013
a9cb120
BUG: Fixed compilation when no OpenCL platform detected.
Jul 12, 2013
69c2e3e
ENH: Remote module / ctest
Jul 17, 2013
ad69488
BUG: Fix remote test conf.
Jul 17, 2013
57d7da3
BUG: Fix ctests.
Jul 22, 2013
01b85f6
ENH: added EXCLUDE_FROM_ALL tag
Jul 24, 2013
82f6864
ENH: Sleep for stress tests.
Jul 25, 2013
83a1efe
ENH: Use normalised RMS error for ctest.
Jul 26, 2013
4d39532
ENH: Use normalised RMS error for ctest.
Jul 26, 2013
ab0379e
ENH: Merge branch 'master' of github.com:Inria-Asclepios/SmoothingRec…
Jul 26, 2013
a097591
ENH: Merge branch 'master' of github.com:Inria-Asclepios/SmoothingRec…
Jul 26, 2013
f8a0fa3
ENH: Merge branch 'master' of github.com:Inria-Asclepios/SmoothingRec…
Jul 26, 2013
89fe814
DOC: Copyright + doxygen doc.
Jul 29, 2013
3f96a70
COMP: [CPU] Vectorial images. CMake sets double for CPU by default.
Jul 30, 2013
211667f
STYLE: Remove "ITK" from the module name.
XiaoxiaoLiu Aug 26, 2013
af32913
ENH: Merge pull request #1 from XiaoxiaoLiu/master
Aug 28, 2013
79039dd
BUG: FIX: ITK warnings of deprecated EXCLUDE_FROM_ALL.
XiaoxiaoLiu Sep 12, 2013
6f4dd5a
ENH: Merge pull request #2 from XiaoxiaoLiu/master
Sep 12, 2013
9394677
BUG: Fix: ITK EXCLUDE_FROM_ALL warning for GPU case.
Jan 14, 2014
e9a2a44
COMP: Fix compliler warnings
brianhelba Feb 5, 2014
9c305a0
COMP: Merge pull request #3 from brianhelba/Warning-Fix
Feb 6, 2014
2124020
ENH: CPU-YVV: InPlace filter
Feb 26, 2014
863b3d2
ENH: uncrustify
Feb 26, 2014
f825970
BUG: Add itk_module_target call for library.
thewtex Feb 20, 2015
90e4ac7
ENH: Merge pull request #4 from thewtex/itk_module_target
ividal Feb 20, 2015
78b42ab
ENH: added files for python wrapping of remote module YVV Recursive G…
Jan 8, 2016
3b07d59
ENH: Merge pull request #6 from renbem/master
msermesant Feb 5, 2016
0cca10a
STYLE: Use Macro for Function Deletion
zachary-williamson Jun 30, 2016
464edad
ENH: Merge pull request #7 from zachary-williamson/master
tvercaut Jul 1, 2016
3a4f101
ENH: ITKv5 override consistency
hjmjohnson Dec 17, 2017
979dbbe
COMP: Use C++11 override directly
hjmjohnson Dec 17, 2017
2b9b77b
COMP: Use nullptr instead of 0 or NULL
hjmjohnson Dec 17, 2017
46146d2
COMP: Fix unsigned/signed loop index mismatch.
hjmjohnson Dec 22, 2017
1b46fdc
ENH: Merge pull request #1 from InsightSoftwareConsortium/ITKv5_20180…
hjmjohnson Jan 29, 2018
07e5b88
STYLE: Modernize to C++11 conventions
hjmjohnson Feb 12, 2018
4f4ec39
STYLE: Merge pull request #10 from InsightSoftwareConsortium/ITKv5Style
tvercaut Feb 12, 2018
7bbebb6
STYLE: Replace itkStaticConstMacro with static constexpr
hjmjohnson Feb 13, 2018
195620b
STYLE: Prefer C++11 type alias over typedef
hjmjohnson Feb 13, 2018
4fba298
STYLE: Prefer constexpr for const numeric literals
hjmjohnson Feb 13, 2018
fea3fe9
COMP: Move ITK_DISALLOW_COPY_AND_ASSIGN calls to public section.
Apr 14, 2018
2693ba8
ENH: Merge pull request #2 from jhlegarreta/MoveDISALLOWCOPYANDASSIGN…
thewtex Apr 20, 2018
3ab4497
STYLE: reformatting the tests to be more compliant with ITK style
dzenanz Jul 20, 2018
1842baf
STYLE: adding copyright headers and style-compliant include guards
dzenanz Jul 20, 2018
3a5de12
STYLE: removing verbose debugging code
dzenanz Jul 20, 2018
98d8d6d
ENH: adapting to new threading mechanism introduced by ITKv5
dzenanz Jul 20, 2018
1bebf35
ENH: Merge pull request #3 from dzenanz/itk5threading
dzenanz Jul 25, 2018
75a60d1
COMP: Change the include file style.
jhlegarreta Oct 17, 2018
551cf1d
ENH: Add CI.
jhlegarreta Oct 17, 2018
44d9f79
ENH: Merge pull request #8 from jhlegarreta/AddCI
hjmjohnson Nov 3, 2018
48bf50c
STYLE: Merge pull request #7 from jhlegarreta/ChangeIncludeStyle
hjmjohnson Nov 3, 2018
bdee7c6
STYLE: Prefer error checked std::sto[id] over ato[if].
jhlegarreta Nov 2, 2018
269d0d3
COMP: Future proof vnl_math_XXX function usage.
hjmjohnson Nov 3, 2018
d8022c6
ENH: Merge branch 'master' of https://github.com/Inria-Asclepios/Smoo…
jhlegarreta Nov 6, 2018
f7b604b
ENH: Merge pull request #14 from jhlegarreta/SyncWithInriaRepo
hjmjohnson Nov 6, 2018
8967bed
BUG: Fix test errors.
jhlegarreta Nov 26, 2018
b76272e
ENH: Merge pull request #19 from jhlegarreta/FixTestErrors
dzenanz Nov 26, 2018
51e81ab
STYLE: Conform to modern CMake coding style.
jhlegarreta Nov 26, 2018
a3b3b73
COMP: Merge pull request #18 from jhlegarreta/ConformToCMakeStyle
jhlegarreta Nov 27, 2018
ac6c5ed
STYLE: Make the test arguments be grouped compactly.
jhlegarreta Dec 24, 2018
5d0e039
COMP: Merge pull request #21 from jhlegarreta/ImproveTestingCMakeList…
hjmjohnson Dec 27, 2018
f94f555
ENH: Cast the binary data to the testing framework.
jhlegarreta Dec 24, 2018
a006030
ENH: Merge pull request #22 from jhlegarreta/CastDataBinariesToTestin…
jhlegarreta Dec 29, 2018
bdc295a
ENH: Add .gitattributes to allow running ITK clang-formatting scripts
hjmjohnson Feb 20, 2020
0019fe4
STYLE: Remove CMake-language block-end command arguments
hjmjohnson Feb 16, 2020
a6d826e
COMP: Use nullptr instead of 0 or NULL
hjmjohnson Feb 17, 2020
d9ddc14
STYLE: Use override statements for C++11
hjmjohnson Feb 17, 2020
144b4d4
STYLE: Prefer = default to explicitly trivial implementations
hjmjohnson Feb 17, 2020
8ee5df3
STYLE: Remove redundant void argument lists
hjmjohnson Feb 17, 2020
3939fbb
STYLE: Use auto for variable type matches the type of the initializer
hjmjohnson Feb 18, 2020
525513c
DOC: Update copyright assignment to NumFOCUS
hjmjohnson Feb 19, 2020
739e008
STYLE: Improve variable name description.
hjmjohnson Feb 20, 2020
87043d5
COMP: Match template style more closely.
hjmjohnson Mar 1, 2020
f2bfacf
BUG: Replace throw to ITK_NOEXCEPT to fix compiler warnings
mseng10 Nov 20, 2020
03b58d3
ENH: Merge pull request #25 from InsightSoftwareConsortium/github-act…
thewtex Nov 26, 2020
7f614d9
STYLE: Rename ITK_DISALLOW_COPY_AND_ASSIGN to ITK_DISALLOW_COPY_AND_MOVE
mseng10 Oct 16, 2020
716a87d
COMP: Add missing ';' at end of macro
mseng10 Dec 29, 2020
1217156
COMP: Remove inclusion of .hxx files as headers
hjmjohnson Dec 17, 2021
33b1b1c
ENH: Bump ITK version and change http links to https
tbirdso May 31, 2022
238bdab
ENH: Modernize CMake to use itk_module_add_library
blowekamp Jan 27, 2026
5fb36da
COMP: Merge pull request #33 from InsightSoftwareConsortium/modernize…
blowekamp Jan 27, 2026
1cc6e45
ENH: Ingest ITKSmoothingRecursiveYvvGaussianFilter into Modules/Filte…
hjmjohnson May 9, 2026
44e3d56
DOC: Add SmoothingRecursiveYvvGaussianFilter README and in-tree CMake…
hjmjohnson May 9, 2026
44c5176
COMP: Remove SmoothingRecursiveYvvGaussianFilter .remote.cmake (in-tree)
hjmjohnson May 9, 2026
2801abe
ENH: Enable Module_SmoothingRecursiveYvvGaussianFilter in configure-ci
hjmjohnson May 9, 2026
57695a8
STYLE: gersemi-format SmoothingRecursiveYvvGaussianFilter src/CMakeLi…
hjmjohnson May 9, 2026
53f020e
STYLE: Address Greptile review on SmoothingRecursiveYvvGaussianFilter
hjmjohnson May 9, 2026
a1f3462
Merge remote-tracking branch 'upstream/main' into triage-6243-rebase
hjmjohnson May 9, 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,211 @@
/*=========================================================================
*
* 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"
# include <vector>

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;
std::vector<ScalarRealType> m_Bvalues;

// Initialization matrix for anti-causal pass
std::vector<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