ITK
5.0.0
Insight Segmentation and Registration Toolkit
|
#include <itkImageRegion.h>
An image region represents a structured region of data.
ImageRegion is an class that represents some structured portion or piece of an Image. The ImageRegion is represented with an index and a size in each of the n-dimensions of the image. (The index is the corner of the image, the size is the lengths of the image in each of the topological directions.)
Definition at line 69 of file itkImageRegion.h.
Public Types | |
using | IndexType = Index< Self::ImageDimension > |
typedef IndexValueType | IndexValueArrayType [ImageDimension] |
using | IndexValueType = typename IndexType::IndexValueType |
typedef OffsetValueType | OffsetTableType [ImageDimension+1] |
using | OffsetType = typename IndexType::OffsetType |
using | OffsetValueType = typename OffsetType::OffsetValueType |
using | Self = ImageRegion |
using | SizeType = Size< Self::ImageDimension > |
using | SizeValueType = typename SizeType::SizeValueType |
using | SliceRegion = ImageRegion< Self::SliceDimension > |
using | Superclass = Region |
Public Types inherited from itk::Region | |
enum | RegionType { ITK_UNSTRUCTURED_REGION, ITK_STRUCTURED_REGION } |
using | Self = Region |
Public Member Functions | |
void | ComputeOffsetTable (OffsetTableType offsetTable) const |
virtual const char * | GetNameOfClass () const |
Superclass::RegionType | GetRegionType () const override |
IndexType | GetUpperIndex () const |
ImageRegion () noexcept=default | |
ImageRegion (const Self &) noexcept=default | |
ImageRegion (const IndexType &index, const SizeType &size) noexcept | |
ImageRegion (const SizeType &size) noexcept | |
bool | operator!= (const Self ®ion) const noexcept |
Self & | operator= (const Self &) noexcept=default |
bool | operator== (const Self ®ion) const noexcept |
void | SetIndex (const IndexType &index) |
void | SetSize (const SizeType &size) |
void | SetUpperIndex (const IndexType &idx) |
~ImageRegion () override=default | |
const IndexType & | GetIndex () const |
IndexType & | GetModifiableIndex () |
const SizeType & | GetSize () const |
SizeType & | GetModifiableSize () |
void | SetSize (unsigned int i, SizeValueType sze) |
SizeValueType | GetSize (unsigned int i) const |
void | SetIndex (unsigned int i, IndexValueType sze) |
IndexValueType | GetIndex (unsigned int i) const |
bool | IsInside (const IndexType &index) const |
Public Member Functions inherited from itk::Region | |
itkTypeMacroNoParent (Region) | |
virtual void | Print (std::ostream &os, Indent indent=0) const |
Region ()=default | |
virtual | ~Region ()=default |
Static Public Member Functions | |
static unsigned int | GetImageDimension () |
Static Public Attributes | |
static constexpr unsigned int | ImageDimension = VImageDimension |
static constexpr unsigned int | SliceDimension = ImageDimension - ( ImageDimension > 1 ) |
IndexType | m_Index = {{0}} |
SizeType | m_Size = {{0}} |
class | ImageBase< VImageDimension > |
template<typename TCoordRepType > | |
bool | IsInside (const ContinuousIndex< TCoordRepType, VImageDimension > &index) const |
bool | IsInside (const Self ®ion) const |
SizeValueType | GetNumberOfPixels () const |
void | PadByRadius (OffsetValueType radius) |
void | PadByRadius (const IndexValueArrayType radius) |
void | PadByRadius (const SizeType &radius) |
bool | ShrinkByRadius (OffsetValueType radius) |
bool | ShrinkByRadius (const IndexValueArrayType radius) |
bool | ShrinkByRadius (const SizeType &radius) |
bool | Crop (const Self ®ion) |
SliceRegion | Slice (const unsigned int dim) const |
void | PrintSelf (std::ostream &os, Indent indent) const override |
Additional Inherited Members | |
Protected Member Functions inherited from itk::Region | |
virtual void | PrintHeader (std::ostream &os, Indent indent) const |
virtual void | PrintTrailer (std::ostream &os, Indent indent) const |
using itk::ImageRegion< VImageDimension >::IndexType = Index< Self::ImageDimension > |
Index type alias support An index is used to access pixel values.
Definition at line 91 of file itkImageRegion.h.
typedef IndexValueType itk::ImageRegion< VImageDimension >::IndexValueArrayType[ImageDimension] |
Definition at line 95 of file itkImageRegion.h.
using itk::ImageRegion< VImageDimension >::IndexValueType = typename IndexType::IndexValueType |
Definition at line 92 of file itkImageRegion.h.
typedef OffsetValueType itk::ImageRegion< VImageDimension >::OffsetTableType[ImageDimension+1] |
Definition at line 96 of file itkImageRegion.h.
using itk::ImageRegion< VImageDimension >::OffsetType = typename IndexType::OffsetType |
Definition at line 93 of file itkImageRegion.h.
using itk::ImageRegion< VImageDimension >::OffsetValueType = typename OffsetType::OffsetValueType |
Definition at line 94 of file itkImageRegion.h.
using itk::ImageRegion< VImageDimension >::Self = ImageRegion |
Standard class type aliases.
Definition at line 73 of file itkImageRegion.h.
using itk::ImageRegion< VImageDimension >::SizeType = Size< Self::ImageDimension > |
Size type alias support A size is used to define region bounds.
Definition at line 99 of file itkImageRegion.h.
using itk::ImageRegion< VImageDimension >::SizeValueType = typename SizeType::SizeValueType |
Definition at line 100 of file itkImageRegion.h.
using itk::ImageRegion< VImageDimension >::SliceRegion = ImageRegion< Self::SliceDimension > |
Slice region type alias. SliceRegion is one dimension less than Self.
Definition at line 103 of file itkImageRegion.h.
using itk::ImageRegion< VImageDimension >::Superclass = Region |
Definition at line 74 of file itkImageRegion.h.
|
defaultnoexcept |
Constructor. ImageRegion is a lightweight object that is not reference counted, so the constructor is public. Its two data members are filled with zeros (using C++11 default member initializers).
|
overridedefault |
Destructor. ImageRegion is a lightweight object that is not reference counted, so the destructor is public.
|
defaultnoexcept |
Copy constructor. ImageRegion is a lightweight object that is not reference counted, so the copy constructor is public.
|
inlinenoexcept |
Constructor that takes an index and size. ImageRegion is a lightweight object that is not reference counted, so this constructor is public.
Definition at line 124 of file itkImageRegion.h.
|
inlinenoexcept |
Constructor that takes a size and assumes an index of zeros. ImageRegion is lightweight object that is not reference counted so this constructor is public.
Definition at line 136 of file itkImageRegion.h.
void itk::ImageRegion< VImageDimension >::ComputeOffsetTable | ( | OffsetTableType | offsetTable | ) | const |
Compute an offset table based on the Size.
bool itk::ImageRegion< VImageDimension >::Crop | ( | const Self & | region | ) |
Crop a region by another region. If this region is outside of the crop, this method returns false and does not modify the region. Otherwise, this method returns true and the region is modified to reflect the crop.
|
inlinestatic |
Dimension of the image available at run time.
Definition at line 87 of file itkImageRegion.h.
|
inline |
Get index defining the corner of the region.
Definition at line 152 of file itkImageRegion.h.
Referenced by itk::ImageIORegionAdaptor< VDimension >::Convert(), itk::ImageToImageFilterDetail::ExtractImageFilterCopyRegion(), itk::ImageRegionSplitterBase::GetNumberOfSplits(), itk::ImageToImageFilterDetail::ImageToImageFilterDefaultCopyRegion(), itk::MultiThreaderBase::ParallelizeImageRegion(), and itk::MultiThreaderBase::ParallelizeImageRegionRestrictDirection().
|
inline |
Convenience methods to get and set the index of the particular dimension i.
Definition at line 178 of file itkImageRegion.h.
|
inline |
Get index defining the corner of the region.
Definition at line 153 of file itkImageRegion.h.
Referenced by itk::ImageRegionSplitterBase::GetSplit().
|
inline |
Get the size of the region.
Definition at line 163 of file itkImageRegion.h.
Referenced by itk::ImageRegionSplitterBase::GetSplit().
|
virtual |
Standard part of all itk objects.
SizeValueType itk::ImageRegion< VImageDimension >::GetNumberOfPixels | ( | ) | const |
Get the number of pixels contained in this region. This just multiplies the size components.
|
inlineoverridevirtual |
Return the region type. Images are described with structured regions.
Implements itk::Region.
Definition at line 106 of file itkImageRegion.h.
|
inline |
Get the size of the region.
Definition at line 162 of file itkImageRegion.h.
Referenced by itk::ImageIORegionAdaptor< VDimension >::Convert(), itk::ImageToImageFilterDetail::ExtractImageFilterCopyRegion(), itk::ImageRegionSplitterBase::GetNumberOfSplits(), itk::ImageToImageFilterDetail::ImageToImageFilterDefaultCopyRegion(), itk::MultiThreaderBase::ParallelizeImageRegion(), itk::MultiThreaderBase::ParallelizeImageRegionRestrictDirection(), itk::ScanlineFilterCommon< TInputImage, TOutputImage >::SetupLineOffsets(), itk::PhasedArray3DSpecialCoordinatesImage< TPixel >::TransformContinuousIndexToPhysicalPoint(), itk::PhasedArray3DSpecialCoordinatesImage< TPixel >::TransformIndexToPhysicalPoint(), itk::PhasedArray3DSpecialCoordinatesImage< TPixel >::TransformPhysicalPointToContinuousIndex(), and itk::PhasedArray3DSpecialCoordinatesImage< TPixel >::TransformPhysicalPointToIndex().
|
inline |
Convenience methods to get and set the size of the particular dimension i.
Definition at line 170 of file itkImageRegion.h.
IndexType itk::ImageRegion< VImageDimension >::GetUpperIndex | ( | ) | const |
Get index defining the upper corner of the region.
|
inline |
Test if an index is inside
Definition at line 207 of file itkImageRegion.h.
Referenced by itk::PhasedArray3DSpecialCoordinatesImage< TPixel >::TransformPhysicalPointToContinuousIndex(), and itk::PhasedArray3DSpecialCoordinatesImage< TPixel >::TransformPhysicalPointToIndex().
|
inline |
Test if a continuous index is inside the region. We take into account the fact that each voxel has its center at the integer coordinate and extends half way to the next integer coordinate.
Definition at line 230 of file itkImageRegion.h.
|
inline |
Test if a region (the argument) is completely inside of this region. If the region that is passed as argument to this method, has a size of value zero, then it will not be considered to be inside of the current region, even its starting index is inside.
Definition at line 262 of file itkImageRegion.h.
|
inlinenoexcept |
Compare two regions.
Definition at line 200 of file itkImageRegion.h.
|
defaultnoexcept |
operator=. ImageRegion is a lightweight object that is not reference counted, so operator= is public.
|
inlinenoexcept |
Compare two regions.
Definition at line 193 of file itkImageRegion.h.
void itk::ImageRegion< VImageDimension >::PadByRadius | ( | OffsetValueType | radius | ) |
Pad an image region by the specified radius. Region can be padded uniformly in all dimensions or can be padded by different amounts in each dimension.
void itk::ImageRegion< VImageDimension >::PadByRadius | ( | const IndexValueArrayType | radius | ) |
Friends of ImageRegion
void itk::ImageRegion< VImageDimension >::PadByRadius | ( | const SizeType & | radius | ) |
Friends of ImageRegion
|
overrideprotectedvirtual |
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::Region.
|
inline |
Set the index defining the corner of the region.
Definition at line 148 of file itkImageRegion.h.
Referenced by itk::BoxMeanCalculatorFunction(), itk::BoxSigmaCalculatorFunction(), itk::ImageIORegionAdaptor< VDimension >::Convert(), itk::ImageToImageFilterDetail::ExtractImageFilterCopyRegion(), itk::ImageConstIterator< RLEImage< TPixel, VImageDimension, CounterType > >::GetRegion(), itk::ImageToImageFilterDetail::ImageToImageFilterDefaultCopyRegion(), itk::MultiThreaderBase::ParallelizeImageRegion(), and itk::MultiThreaderBase::ParallelizeImageRegionRestrictDirection().
|
inline |
Convenience methods to get and set the index of the particular dimension i.
Definition at line 176 of file itkImageRegion.h.
|
inline |
Set the size of the region. This plus the index determines the rectangular shape, or extent, of the region.
Definition at line 158 of file itkImageRegion.h.
Referenced by itk::BoxMeanCalculatorFunction(), itk::BoxSigmaCalculatorFunction(), itk::ImageIORegionAdaptor< VDimension >::Convert(), itk::ImageToImageFilterDetail::ExtractImageFilterCopyRegion(), itk::ImageToImageFilterDetail::ImageToImageFilterDefaultCopyRegion(), itk::MultiThreaderBase::ParallelizeImageRegion(), itk::MultiThreaderBase::ParallelizeImageRegionRestrictDirection(), and itk::ImageBase< TImage::ImageDimension >::SetRegions().
|
inline |
Convenience methods to get and set the size of the particular dimension i.
Definition at line 168 of file itkImageRegion.h.
void itk::ImageRegion< VImageDimension >::SetUpperIndex | ( | const IndexType & | idx | ) |
Modify the Size of the ImageRegion so that the provided index will be the upper corner index.
bool itk::ImageRegion< VImageDimension >::ShrinkByRadius | ( | OffsetValueType | radius | ) |
Shrink an image region by the specified radius. The region can be shrunk uniformly in all dimension or can be shink by different amounts in each direction. If the shink operation fails because the radius is too large, this method returns false.
bool itk::ImageRegion< VImageDimension >::ShrinkByRadius | ( | const IndexValueArrayType | radius | ) |
Friends of ImageRegion
bool itk::ImageRegion< VImageDimension >::ShrinkByRadius | ( | const SizeType & | radius | ) |
Friends of ImageRegion
SliceRegion itk::ImageRegion< VImageDimension >::Slice | ( | const unsigned int | dim | ) | const |
Slice a region, producing a region that is one dimension lower than the current region. Parameter "dim" specifies which dimension to remove.
Referenced by itk::RLEImage< TPixel, VImageDimension, CounterType >::SetBufferedRegion(), itk::RLEImage< TPixel, VImageDimension, CounterType >::SetLargestPossibleRegion(), and itk::RLEImage< TPixel, VImageDimension, CounterType >::SetRequestedRegion().
|
friend |
Friends of ImageRegion
Definition at line 329 of file itkImageRegion.h.
|
static |
Dimension of the image available at compile time.
Definition at line 80 of file itkImageRegion.h.
|
private |
Friends of ImageRegion
Definition at line 325 of file itkImageRegion.h.
|
private |
Friends of ImageRegion
Definition at line 326 of file itkImageRegion.h.
|
static |
Dimension one lower than the image unless the image is one dimensional in which case the SliceDimension is also one dimensional.
Definition at line 84 of file itkImageRegion.h.