ITK
4.6.0
Insight Segmentation and Registration Toolkit
|
#include <itkBinShrinkImageFilter.h>
Reduce the size of an image by an integer factor in each dimension while performing averaging of an input neighborhood.
The output image size in each dimension is given by:
outputSize[j] = max( std::floor(inputSize[j]/shrinkFactor[j]), 1 );
The algorithm implemented can be describe with the following equation for 2D:
This filter is implemented so that the starting extent of the first pixel of the output matches that of the input.
This code was contributed in the Insight Journal paper: "BinShrink: A multi-resolution filter with cache efficient averaging" by Lowekamp B., Chen D. http://hdl.handle.net/10380/3450
Definition at line 58 of file itkBinShrinkImageFilter.h.
Static Public Member Functions | |
static Pointer | New () |
Static Public Member Functions inherited from itk::Object | |
static bool | GetGlobalWarningDisplay () |
static void | GlobalWarningDisplayOff () |
static void | GlobalWarningDisplayOn () |
static Pointer | New () |
static void | SetGlobalWarningDisplay (bool flag) |
Static Public Member Functions inherited from itk::LightObject | |
static void | BreakOnError () |
static Pointer | New () |
Static Public Attributes | |
static const unsigned int | ImageDimension = TInputImage::ImageDimension |
static const unsigned int | OutputImageDimension = TOutputImage::ImageDimension |
Static Public Attributes inherited from itk::ImageToImageFilter< TInputImage, TOutputImage > | |
static const unsigned int | InputImageDimension = TInputImage::ImageDimension |
static const unsigned int | OutputImageDimension = TOutputImage::ImageDimension |
Static Public Attributes inherited from itk::ImageSource< TOutputImage > | |
static const unsigned int | OutputImageDimension = TOutputImage::ImageDimension |
Private Member Functions | |
BinShrinkImageFilter (const Self &) | |
void | operator= (const Self &) |
template<class TOutputType , class TInputType > | |
EnableIfC< std::numeric_limits < TOutputType >::is_integer, TOutputType >::Type | RoundIfInteger (TInputType input) |
template<class TOutputType , class TInputType > | |
DisableIfC < std::numeric_limits < TOutputType >::is_integer, TOutputType >::Type | RoundIfInteger (const TInputType &input,...) |
Private Attributes | |
ShrinkFactorsType | m_ShrinkFactors |
typedef SmartPointer<const Self> itk::BinShrinkImageFilter< TInputImage, TOutputImage >::ConstPointer |
Definition at line 66 of file itkBinShrinkImageFilter.h.
typedef InputImageType::ConstPointer itk::BinShrinkImageFilter< TInputImage, TOutputImage >::InputImageConstPointer |
Definition at line 79 of file itkBinShrinkImageFilter.h.
typedef InputImageType::Pointer itk::BinShrinkImageFilter< TInputImage, TOutputImage >::InputImagePointer |
Definition at line 78 of file itkBinShrinkImageFilter.h.
typedef TInputImage itk::BinShrinkImageFilter< TInputImage, TOutputImage >::InputImageType |
Definition at line 76 of file itkBinShrinkImageFilter.h.
typedef TInputImage::IndexType itk::BinShrinkImageFilter< TInputImage, TOutputImage >::InputIndexType |
Definition at line 83 of file itkBinShrinkImageFilter.h.
typedef OutputImageType::Pointer itk::BinShrinkImageFilter< TInputImage, TOutputImage >::OutputImagePointer |
Definition at line 77 of file itkBinShrinkImageFilter.h.
typedef TOutputImage::RegionType itk::BinShrinkImageFilter< TInputImage, TOutputImage >::OutputImageRegionType |
Typedef to describe the output image region type.
Definition at line 86 of file itkBinShrinkImageFilter.h.
typedef TOutputImage itk::BinShrinkImageFilter< TInputImage, TOutputImage >::OutputImageType |
Typedef to images
Definition at line 72 of file itkBinShrinkImageFilter.h.
typedef TOutputImage::IndexType itk::BinShrinkImageFilter< TInputImage, TOutputImage >::OutputIndexType |
Definition at line 82 of file itkBinShrinkImageFilter.h.
typedef TOutputImage::OffsetType itk::BinShrinkImageFilter< TInputImage, TOutputImage >::OutputOffsetType |
Definition at line 81 of file itkBinShrinkImageFilter.h.
typedef SmartPointer<Self> itk::BinShrinkImageFilter< TInputImage, TOutputImage >::Pointer |
Definition at line 65 of file itkBinShrinkImageFilter.h.
typedef BinShrinkImageFilter itk::BinShrinkImageFilter< TInputImage, TOutputImage >::Self |
Standard class typedefs.
Definition at line 63 of file itkBinShrinkImageFilter.h.
typedef FixedArray< unsigned int, ImageDimension > itk::BinShrinkImageFilter< TInputImage, TOutputImage >::ShrinkFactorsType |
Definition at line 95 of file itkBinShrinkImageFilter.h.
typedef ImageToImageFilter<TInputImage,TOutputImage> itk::BinShrinkImageFilter< TInputImage, TOutputImage >::Superclass |
Definition at line 64 of file itkBinShrinkImageFilter.h.
|
protected |
End concept checking
|
private |
|
virtual |
Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.
Reimplemented from itk::Object.
|
virtual |
BinShrinkImageFilter needs a larger input requested region than the output requested region. As such, BinShrinkImageFilter needs to provide an implementation for GenerateInputRequestedRegion() in order to inform the pipeline execution model.
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
|
virtual |
Generate the information describing the output data. The default implementation of this method will copy information from the input to the output. A filter may override this method if its output will have different information than its input. For instance, a filter that shrinks an image will need to provide an implementation for this method that changes the spacing of the pixels. Such filters should call their superclass' implementation of this method prior to changing the information values they need (i.e. GenerateOutputInformation() should call Superclass::GenerateOutputInformation() prior to changing the information.
Reimplemented from itk::ProcessObject.
|
virtual |
Run-time type information (and related methods).
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
|
virtual |
Get the shrink factors.
|
static |
Method for creation through the object factory.
|
private |
|
protectedvirtual |
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
|
inlineprivate |
Round different pixel types.
Definition at line 143 of file itkBinShrinkImageFilter.h.
|
inlineprivate |
Definition at line 152 of file itkBinShrinkImageFilter.h.
void itk::BinShrinkImageFilter< TInputImage, TOutputImage >::SetShrinkFactor | ( | unsigned int | i, |
unsigned int | factor | ||
) |
Set the shrink factors. Values are clamped to a minimum value of 1. Default is 1 for all dimensions.
|
virtual |
Set the shrink factors. Values are clamped to a minimum value of 1. Default is 1 for all dimensions.
void itk::BinShrinkImageFilter< TInputImage, TOutputImage >::SetShrinkFactors | ( | unsigned int | factor | ) |
Set the shrink factors. Values are clamped to a minimum value of 1. Default is 1 for all dimensions.
|
protectedvirtual |
If an imaging filter can be implemented as a multithreaded algorithm, the filter will provide an implementation of ThreadedGenerateData(). This superclass will automatically split the output image into a number of pieces, spawn multiple threads, and call ThreadedGenerateData() in each thread. Prior to spawning threads, the BeforeThreadedGenerateData() method is called. After all the threads have completed, the AfterThreadedGenerateData() method is called. If an image processing filter cannot support threading, that filter should provide an implementation of the GenerateData() method instead of providing an implementation of ThreadedGenerateData(). If a filter provides a GenerateData() method as its implementation, then the filter is responsible for allocating the output data. If a filter provides a ThreadedGenerateData() method as its implementation, then the output memory will allocated automatically by this superclass. The ThreadedGenerateData() method should only produce the output specified by "outputThreadRegion" parameter. ThreadedGenerateData() cannot write to any other portion of the output image (as this is responsibility of a different thread).
Reimplemented from itk::ImageSource< TOutputImage >.
itk::BinShrinkImageFilter< TInputImage, TOutputImage >::typedef | ( | Concept::Convertible< typename TInputImage::PixelType, typename TOutputImage::PixelType > | ) |
Begin concept checking This class requires InputConvertibleToOutputCheck in the form of (Concept::Convertible<typename TInputImage::PixelType, typename TOutputImage::PixelType>)
itk::BinShrinkImageFilter< TInputImage, TOutputImage >::typedef | ( | Concept::SameDimension< ImageDimension, OutputImageDimension > | ) |
This class requires SameDimensionCheck in the form of (Concept::SameDimension<ImageDimension, OutputImageDimension>)
|
static |
ImageDimension enumeration.
Definition at line 90 of file itkBinShrinkImageFilter.h.
|
private |
Definition at line 138 of file itkBinShrinkImageFilter.h.
|
static |
ImageDimension enumeration.
Definition at line 92 of file itkBinShrinkImageFilter.h.