ITK
6.0.0
Insight Toolkit
|
#include <itkBSplineDownsampleImageFilter.h>
Down-samples an image by a factor of 2 using B-Spline filter interpolation.
This class is the public interface for spline down-sampling as defined by the ResamplerType. Requires the use of a resampler type. If in doubt, the basic itkBSplineResampleImageFilterBase should work fine for most applications.
This class may also be used to create a smoother by combining it with the upSampler as in the following example: using ResamplerType = itk::BSplineResampleImageFilterBase<ImageType2D, ImageType2D>; using DownsamplerType2D = itk::BSplineDownsampleImageFilter<ImageType2D,ImageType2D,ResamplerType>; using UpsamplerType2D = itk::BSplineUpsampleImageFilter<ImageType2D,ImageType2D,ResamplerType>;
auto downSampler = DownsamplerType2D::New(); UpsamplerType2D::Pointer upSampler = UpsamplerType2D::New(); int splineOrder = 3; downSampler->SetSplineOrder(splineOrder); upSampler->SetSplineOrder(splineOrder);
downSampler->SetInput(image); downSampler->Update();
upSampler->SetInput( downSampler->GetOutput() ); // output of downSampler is input to upSampler upSampler->Update();
ImageTypePtr2D outImage2 = upSampler->GetOutput(); // outImage2 is the smoothed imaged
Limitations: This class requires specification of a resampler type which may be one of: itkBSplineResampleImageFilterBase, itkBSplineL2ResampleImageFilterBase itkBSplineSplineCenteredResampleImageFilterBase, itkBSplineCenteredL2ResampleImageFilterBase The limitations of these resampler types will apply to this filter. Down-samples only by a factor of 2.
Definition at line 92 of file itkBSplineDownsampleImageFilter.h.
Static Public Member Functions | |
static Pointer | New () |
Static Public Member Functions inherited from itk::ImageToImageFilter< TInputImage, TOutputImage > | |
static double | GetGlobalDefaultCoordinateTolerance () |
static double | GetGlobalDefaultDirectionTolerance () |
static void | SetGlobalDefaultCoordinateTolerance (double) |
static void | SetGlobalDefaultDirectionTolerance (double) |
Static Public Member Functions inherited from itk::Object | |
static bool | GetGlobalWarningDisplay () |
static void | GlobalWarningDisplayOff () |
static void | GlobalWarningDisplayOn () |
static Pointer | New () |
static void | SetGlobalWarningDisplay (bool val) |
Static Public Member Functions inherited from itk::LightObject | |
static void | BreakOnError () |
static Pointer | New () |
Additional Inherited Members | |
Static Public Attributes inherited from itk::BSplineResampleImageFilterBase< TInputImage, TOutputImage > | |
static constexpr unsigned int | ImageDimension = TInputImage::ImageDimension |
Static Public Attributes inherited from itk::ImageToImageFilter< TInputImage, TOutputImage > | |
static constexpr unsigned int | InputImageDimension = TInputImage::ImageDimension |
static constexpr unsigned int | OutputImageDimension = TOutputImage::ImageDimension |
Static Public Attributes inherited from itk::ImageSource< TOutputImage > | |
static constexpr unsigned int | OutputImageDimension = TOutputImage::ImageDimension |
Protected Types inherited from itk::ImageToImageFilter< TInputImage, TOutputImage > | |
using | InputToOutputRegionCopierType = ImageToImageFilterDetail::ImageRegionCopier< Self::OutputImageDimension, Self::InputImageDimension > |
using | OutputToInputRegionCopierType = ImageToImageFilterDetail::ImageRegionCopier< Self::InputImageDimension, Self::OutputImageDimension > |
Static Protected Member Functions inherited from itk::ImageSource< TOutputImage > | |
static const ImageRegionSplitterBase * | GetGlobalDefaultSplitter () |
static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION | ThreaderCallback (void *arg) |
Static Protected Member Functions inherited from itk::ProcessObject | |
template<typename TSourceObject > | |
static void | MakeRequiredOutputs (TSourceObject &sourceObject, const DataObjectPointerArraySizeType numberOfRequiredOutputs) |
static constexpr float | progressFixedToFloat (uint32_t fixed) |
static uint32_t | progressFloatToFixed (float f) |
Protected Attributes inherited from itk::BSplineResampleImageFilterBase< TInputImage, TOutputImage > | |
std::vector< double > | m_G {} |
int | m_GSize {} |
std::vector< double > | m_H {} |
int | m_HSize {} |
int | m_SplineOrder {} |
Protected Attributes inherited from itk::ImageSource< TOutputImage > | |
bool | m_DynamicMultiThreading { true } |
Protected Attributes inherited from itk::ProcessObject | |
TimeStamp | m_OutputInformationMTime {} |
bool | m_Updating {} |
Protected Attributes inherited from itk::LightObject | |
std::atomic< int > | m_ReferenceCount {} |
using itk::BSplineDownsampleImageFilter< TInputImage, TOutputImage, ResamplerType >::ConstPointer = SmartPointer<const Self> |
Definition at line 101 of file itkBSplineDownsampleImageFilter.h.
using itk::BSplineDownsampleImageFilter< TInputImage, TOutputImage, ResamplerType >::Pointer = SmartPointer<Self> |
Definition at line 100 of file itkBSplineDownsampleImageFilter.h.
using itk::BSplineDownsampleImageFilter< TInputImage, TOutputImage, ResamplerType >::Self = BSplineDownsampleImageFilter |
Standard class type aliases.
Definition at line 98 of file itkBSplineDownsampleImageFilter.h.
using itk::BSplineDownsampleImageFilter< TInputImage, TOutputImage, ResamplerType >::Superclass = ResamplerType |
Definition at line 99 of file itkBSplineDownsampleImageFilter.h.
|
protecteddefault |
|
overrideprotecteddefault |
|
overrideprotectedvirtual |
Give the process object a chance to indicate that it will produce more output than it was requested to produce. For example, many imaging filters must compute the entire output at once or can only produce output in complete slices. Such filters cannot handle smaller requested regions. These filters must provide an implementation of this method, setting the output requested region to the size they will produce. By default, a process object does not modify the size of the output requested region.
Reimplemented from itk::ProcessObject.
|
overrideprotectedvirtual |
A version of GenerateData() specific for image processing filters. This implementation will split the processing across multiple threads. The buffer is allocated by this method. Then the BeforeThreadedGenerateData() method is called (if provided). Then, a series of threads are spawned each calling DynamicThreadedGenerateData(). After all the threads have completed processing, the AfterThreadedGenerateData() method is called (if provided). If an image processing filter cannot be threaded, the filter should provide an implementation of GenerateData(). That implementation is responsible for allocating the output buffer. If a filter can be threaded, it should NOT provide a GenerateData() method but should provide a DynamicThreadedGenerateData() instead.
Reimplemented from itk::ImageSource< TOutputImage >.
|
overridevirtual |
This filter requires all of the input image
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
|
overridevirtual |
Creates an image half the size of the input image with spacing twice the input image.
Reimplemented from itk::ProcessObject.
|
overridevirtual |
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
|
static |
New macro for creation of through a Smart Pointer