ITK
4.13.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 | |
typedef Index < itkGetStaticConstMacro(ImageDimension) > | IndexType |
typedef IndexValueType | IndexValueArrayType [ImageDimension] |
typedef IndexType::IndexValueType | IndexValueType |
typedef OffsetValueType | OffsetTableType [ImageDimension+1] |
typedef IndexType::OffsetType | OffsetType |
typedef OffsetType::OffsetValueType | OffsetValueType |
typedef ImageRegion | Self |
typedef Size < itkGetStaticConstMacro(ImageDimension) > | SizeType |
typedef SizeType::SizeValueType | SizeValueType |
typedef ImageRegion < itkGetStaticConstMacro(SliceDimension) > | SliceRegion |
typedef Region | Superclass |
Public Types inherited from itk::Region | |
enum | RegionType { ITK_UNSTRUCTURED_REGION, ITK_STRUCTURED_REGION } |
typedef Region | Self |
Public Member Functions | |
void | ComputeOffsetTable (OffsetTableType offsetTable) const |
virtual const char * | GetNameOfClass () const |
virtual Superclass::RegionType | GetRegionType () const override |
IndexType | GetUpperIndex () const |
ImageRegion () | |
ImageRegion (const Self ®ion) | |
ImageRegion (const IndexType &index, const SizeType &size) | |
ImageRegion (const SizeType &size) | |
void | operator= (const Self ®ion) |
void | SetIndex (const IndexType &index) |
void | SetSize (const SizeType &size) |
void | SetUpperIndex (const IndexType &idx) |
virtual | ~ImageRegion () override |
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 | operator== (const Self ®ion) const |
bool | operator!= (const Self ®ion) 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 () | |
virtual | ~Region () |
Static Public Member Functions | |
static unsigned int | GetImageDimension () |
Static Public Attributes | |
static const unsigned int | ImageDimension = VImageDimension |
static const unsigned int | SliceDimension = ( ImageDimension - ( ImageDimension > 1 ) ) |
IndexType | m_Index |
SizeType | m_Size |
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 |
virtual 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 |
typedef Index< itkGetStaticConstMacro(ImageDimension) > itk::ImageRegion< VImageDimension >::IndexType |
Index typedef support. An index is used to access pixel values.
Definition at line 92 of file itkImageRegion.h.
typedef IndexValueType itk::ImageRegion< VImageDimension >::IndexValueArrayType[ImageDimension] |
Definition at line 94 of file itkImageRegion.h.
typedef IndexType::IndexValueType itk::ImageRegion< VImageDimension >::IndexValueType |
Definition at line 93 of file itkImageRegion.h.
typedef OffsetValueType itk::ImageRegion< VImageDimension >::OffsetTableType[ImageDimension+1] |
Definition at line 97 of file itkImageRegion.h.
typedef IndexType::OffsetType itk::ImageRegion< VImageDimension >::OffsetType |
Definition at line 95 of file itkImageRegion.h.
typedef OffsetType::OffsetValueType itk::ImageRegion< VImageDimension >::OffsetValueType |
Definition at line 96 of file itkImageRegion.h.
typedef ImageRegion itk::ImageRegion< VImageDimension >::Self |
Standard class typedefs.
Definition at line 73 of file itkImageRegion.h.
typedef Size< itkGetStaticConstMacro(ImageDimension) > itk::ImageRegion< VImageDimension >::SizeType |
Size typedef support. A size is used to define region bounds.
Definition at line 100 of file itkImageRegion.h.
typedef SizeType::SizeValueType itk::ImageRegion< VImageDimension >::SizeValueType |
Definition at line 101 of file itkImageRegion.h.
typedef ImageRegion< itkGetStaticConstMacro(SliceDimension) > itk::ImageRegion< VImageDimension >::SliceRegion |
Slice region typedef. SliceRegion is one dimension less than Self.
Definition at line 104 of file itkImageRegion.h.
typedef Region itk::ImageRegion< VImageDimension >::Superclass |
Definition at line 74 of file itkImageRegion.h.
itk::ImageRegion< VImageDimension >::ImageRegion | ( | ) |
Constructor. ImageRegion is a lightweight object that is not reference counted, so the constructor is public.
|
overridevirtual |
Destructor. ImageRegion is a lightweight object that is not reference counted, so the destructor is public.
|
inline |
Copy constructor. ImageRegion is a lightweight object that is not reference counted, so the copy constructor is public.
Definition at line 120 of file itkImageRegion.h.
|
inline |
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.
|
inline |
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 130 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 88 of file itkImageRegion.h.
|
inline |
Get index defining the corner of the region.
Definition at line 143 of file itkImageRegion.h.
Referenced by itk::ImageIORegionAdaptor< VDimension >::Convert(), itk::ImageToImageFilterDetail::ExtractImageFilterCopyRegion(), itk::ImageRegionSplitterBase::GetNumberOfSplits(), itk::ImageRegionSplitter< VImageDimension >::GetSplitInternal(), itk::ImageToImageFilterDetail::ImageToImageFilterDefaultCopyRegion(), and itk::ImageConstIterator< RLEImage< TPixel, VImageDimension, CounterType > >::SetRegion().
|
inline |
Convenience methods to get and set the index of the particular dimension i.
Definition at line 169 of file itkImageRegion.h.
|
inline |
Get index defining the corner of the region.
Definition at line 144 of file itkImageRegion.h.
Referenced by itk::ImageRegionSplitterBase::GetSplit().
|
inline |
Get the size of the region.
Definition at line 154 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.
Referenced by itk::ImageConstIterator< RLEImage< TPixel, VImageDimension, CounterType > >::SetRegion().
|
inlineoverridevirtual |
Return the region type. Images are described with structured regions.
Implements itk::Region.
Definition at line 107 of file itkImageRegion.h.
|
inline |
Get the size of the region.
Definition at line 153 of file itkImageRegion.h.
Referenced by itk::ImageIORegionAdaptor< VDimension >::Convert(), itk::ImageToImageFilterDetail::ExtractImageFilterCopyRegion(), itk::ImageRegionSplitterBase::GetNumberOfSplits(), itk::ImageRegionSplitter< VImageDimension >::GetSplitInternal(), itk::ImageToImageFilterDetail::ImageToImageFilterDefaultCopyRegion(), itk::fem::FEMRegistrationFilter< TMovingImage, TFixedImage, TFemObjectType >::SetDisplacementField(), itk::ImageConstIterator< RLEImage< TPixel, VImageDimension, CounterType > >::SetRegion(), 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 161 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 204 of file itkImageRegion.h.
Referenced by itk::ImageConstIterator< RLEImage< TPixel, VImageDimension, CounterType > >::SetRegion(), 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 227 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 259 of file itkImageRegion.h.
|
inline |
Compare two regions.
Definition at line 194 of file itkImageRegion.h.
|
inline |
operator=. ImageRegion is a lightweight object that is not reference counted, so operator= is public.
Definition at line 135 of file itkImageRegion.h.
|
inline |
Compare two regions.
Definition at line 184 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 139 of file itkImageRegion.h.
Referenced by itk::ImageIORegionAdaptor< VDimension >::Convert(), itk::ImageToImageFilterDetail::ExtractImageFilterCopyRegion(), itk::ImageConstIterator< RLEImage< TPixel, VImageDimension, CounterType > >::GetRegion(), and itk::ImageToImageFilterDetail::ImageToImageFilterDefaultCopyRegion().
|
inline |
Convenience methods to get and set the index of the particular dimension i.
Definition at line 167 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 149 of file itkImageRegion.h.
Referenced by itk::ImageIORegionAdaptor< VDimension >::Convert(), itk::ImageToImageFilterDetail::ExtractImageFilterCopyRegion(), itk::ImageConstIterator< RLEImage< TPixel, VImageDimension, CounterType > >::GetRegion(), itk::ImageToImageFilterDetail::ImageToImageFilterDefaultCopyRegion(), and itk::ImageBase< TImage::ImageDimension >::SetRegions().
|
inline |
Convenience methods to get and set the size of the particular dimension i.
Definition at line 159 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.
|
friend |
Friends of ImageRegion
Definition at line 326 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 322 of file itkImageRegion.h.
|
private |
Friends of ImageRegion
Definition at line 323 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 85 of file itkImageRegion.h.