ITK  5.2.0
Insight Toolkit
Public Types | Public Member Functions | List of all members
itk::ImageIORegion Class Reference

#include <itkImageIORegion.h>

+ Inheritance diagram for itk::ImageIORegion:
+ Collaboration diagram for itk::ImageIORegion:

Public Types

using IndexType = std::vector< IndexValueType >
 
using IndexValueType = ::itk::IndexValueType
 
using OffsetValueType = ::itk::OffsetValueType
 
using RegionType = Superclass::RegionEnum
 
using Self = ImageIORegion
 
using SizeType = std::vector< SizeValueType >
 
using SizeValueType = ::itk::SizeValueType
 
using Superclass = Region
 
- Public Types inherited from itk::Region
using RegionEnum = ObjectEnums::RegionEnum
 
using Self = Region
 

Public Member Functions

unsigned int GetImageDimension () const
 
virtual const char * GetNameOfClass () const
 
unsigned int GetRegionDimension () const
 
RegionType GetRegionType () const override
 
 ImageIORegion ()=default
 
 ImageIORegion (const Self &)=default
 
 ImageIORegion (Self &&)=default
 
 ImageIORegion (unsigned int dimension)
 
Selfoperator= (const Self &region)
 
Selfoperator= (Self &&)=default
 
void SetIndex (const IndexType &index)
 
 ~ImageIORegion () override
 
- Public Member Functions inherited from itk::Region
 itkTypeMacroNoParent (Region)
 
virtual void Print (std::ostream &os, Indent indent=0) const
 
 Region ()=default
 
virtual ~Region ()=default
 
unsigned int m_ImageDimension { 2 }
 
IndexType m_Index { IndexType(2) }
 
SizeType m_Size { SizeType(2) }
 
const IndexTypeGetIndex () const
 
IndexTypeGetModifiableIndex ()
 
void SetSize (const SizeType &size)
 
const SizeTypeGetSize () const
 
SizeTypeGetModifiableSize ()
 
SizeValueType GetSize (unsigned long i) const
 
IndexValueType GetIndex (unsigned long i) const
 
void SetSize (const unsigned long i, SizeValueType size)
 
void SetIndex (const unsigned long i, IndexValueType idx)
 
bool operator== (const Self &region) const
 
bool operator!= (const Self &region) const
 
bool IsInside (const IndexType &index) const
 
bool IsInside (const Self &region) const
 
SizeValueType GetNumberOfPixels () 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
 

Detailed Description

An ImageIORegion represents a structured region of data.

ImageIORegion is an class that represents some structured portion or piece of an Image. The ImageIORegion 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.) ImageIORegion is not templated over dimension, but uses dynamic arrays instead.

The first pixel of an image always have a Zero index. Therefore the index values of ImageIORegion may not directly correspond to those of ImageRegion. When translation between the two is performed one much consider the largest possible region who has a non-zero starting index for the image.

See also
Region
ImageRegion
Index
Size
MeshRegion
Examples
Examples/IO/VisibleHumanPasteWrite.cxx.

Definition at line 52 of file itkImageIORegion.h.

Member Typedef Documentation

◆ IndexType

Index type alias support An index is used to access pixel values.

Definition at line 66 of file itkImageIORegion.h.

◆ IndexValueType

Definition at line 62 of file itkImageIORegion.h.

◆ OffsetValueType

Definition at line 63 of file itkImageIORegion.h.

◆ RegionType

Region type taken from the superclass

Definition at line 72 of file itkImageIORegion.h.

◆ Self

Standard class type aliases.

Definition at line 56 of file itkImageIORegion.h.

◆ SizeType

Size type alias support A size is used to define region bounds.

Definition at line 69 of file itkImageIORegion.h.

◆ SizeValueType

these types correspond to those of itk::Size, itk::Offset and itk::Index

Definition at line 61 of file itkImageIORegion.h.

◆ Superclass

Definition at line 57 of file itkImageIORegion.h.

Constructor & Destructor Documentation

◆ ImageIORegion() [1/4]

itk::ImageIORegion::ImageIORegion ( unsigned int  dimension)

Constructor. ImageIORegion is a lightweight object that is not reference counted, so the constructor is public.

◆ ImageIORegion() [2/4]

itk::ImageIORegion::ImageIORegion ( )
default

Constructor. ImageIORegion is a lightweight object that is not reference counted, so the constructor is public. Default dimension is 2.

◆ ~ImageIORegion()

itk::ImageIORegion::~ImageIORegion ( )
override

Destructor. ImageIORegion is a lightweight object that is not reference counted, so the destructor is public.

◆ ImageIORegion() [3/4]

itk::ImageIORegion::ImageIORegion ( const Self )
default

Copy constructor. ImageIORegion is a lightweight object that is not reference counted, so the copy constructor is public.

◆ ImageIORegion() [4/4]

itk::ImageIORegion::ImageIORegion ( Self &&  )
default

Move-constructor. Fast and non-throwing.

Member Function Documentation

◆ GetImageDimension()

unsigned int itk::ImageIORegion::GetImageDimension ( ) const

◆ GetIndex() [1/2]

const IndexType& itk::ImageIORegion::GetIndex ( ) const

Get index defining the corner of the region.

Referenced by itk::ImageIORegionAdaptor< VDimension >::Convert(), and itk::ImageRegionSplitterBase::GetNumberOfSplits().

◆ GetIndex() [2/2]

IndexValueType itk::ImageIORegion::GetIndex ( unsigned long  i) const

Get index defining the corner of the region.

◆ GetModifiableIndex()

IndexType& itk::ImageIORegion::GetModifiableIndex ( )

Get index defining the corner of the region.

Referenced by itk::ImageRegionSplitterBase::GetSplit().

◆ GetModifiableSize()

SizeType& itk::ImageIORegion::GetModifiableSize ( )

Get index defining the corner of the region.

Referenced by itk::ImageRegionSplitterBase::GetSplit().

◆ GetNameOfClass()

virtual const char* itk::ImageIORegion::GetNameOfClass ( ) const
virtual

Standard part of all itk objects.

◆ GetNumberOfPixels()

SizeValueType itk::ImageIORegion::GetNumberOfPixels ( ) const

Get the number of pixels contained in this region. This just multiplies the size components.

◆ GetRegionDimension()

unsigned int itk::ImageIORegion::GetRegionDimension ( ) const

Dimension of the region to be written. This differs from the the image dimension and is calculated at run-time by examining the size of the image in each coordinate direction.

◆ GetRegionType()

RegionType itk::ImageIORegion::GetRegionType ( ) const
overridevirtual

Return the region type. Images are described with structured regions.

Implements itk::Region.

◆ GetSize() [1/2]

const SizeType& itk::ImageIORegion::GetSize ( ) const

◆ GetSize() [2/2]

SizeValueType itk::ImageIORegion::GetSize ( unsigned long  i) const

Convenience methods to get the size of the image in a particular coordinate direction i. Do not try to access image sizes beyond the the ImageDimension.

◆ IsInside() [1/2]

bool itk::ImageIORegion::IsInside ( const IndexType index) const

Test if an index is inside

◆ IsInside() [2/2]

bool itk::ImageIORegion::IsInside ( const Self region) const

Test if a region (the argument) is completly inside of this region

◆ operator!=()

bool itk::ImageIORegion::operator!= ( const Self region) const

Compare two regions.

◆ operator=() [1/2]

Self& itk::ImageIORegion::operator= ( const Self region)

Copy-assignment operator. ImageIORegion is a lightweight object that is not reference counted, so operator= is public.

◆ operator=() [2/2]

Self& itk::ImageIORegion::operator= ( Self &&  )
default

Move-assignment operator. Fast and non-throwing.

◆ operator==()

bool itk::ImageIORegion::operator== ( const Self region) const

Compare two regions.

◆ PrintSelf()

void itk::ImageIORegion::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
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.

◆ SetIndex() [1/2]

void itk::ImageIORegion::SetIndex ( const IndexType index)

Set the index defining the corner of the region.

Examples
Examples/IO/VisibleHumanPasteWrite.cxx.

Referenced by itk::ImageIORegionAdaptor< VDimension >::Convert().

◆ SetIndex() [2/2]

void itk::ImageIORegion::SetIndex ( const unsigned long  i,
IndexValueType  idx 
)

Get index defining the corner of the region.

◆ SetSize() [1/2]

void itk::ImageIORegion::SetSize ( const SizeType size)

Set the size of the region. This plus the index determines the rectangular shape, or extent, of the region.

Examples
Examples/IO/VisibleHumanPasteWrite.cxx.

Referenced by itk::ImageIORegionAdaptor< VDimension >::Convert().

◆ SetSize() [2/2]

void itk::ImageIORegion::SetSize ( const unsigned long  i,
SizeValueType  size 
)

Get index defining the corner of the region.

Member Data Documentation

◆ m_ImageDimension

unsigned int itk::ImageIORegion::m_ImageDimension { 2 }
private

Get index defining the corner of the region.

Definition at line 187 of file itkImageIORegion.h.

◆ m_Index

IndexType itk::ImageIORegion::m_Index { IndexType(2) }
private

Get index defining the corner of the region.

Definition at line 188 of file itkImageIORegion.h.

◆ m_Size

SizeType itk::ImageIORegion::m_Size { SizeType(2) }
private

Get index defining the corner of the region.

Definition at line 189 of file itkImageIORegion.h.


The documentation for this class was generated from the following file: