28 #ifndef __itkImageBase_h
29 #define __itkImageBase_h
43 #include "vnl/vnl_matrix_fixed.txx"
51 template<
unsigned int NImageDimension,
unsigned int R,
unsigned int C,
typename TPo
intValue,
typename TMatrixValue >
111 template<
unsigned int VImageDimension = 2 >
171 {
return VImageDimension; }
178 virtual void SetOrigin(
const double origin[VImageDimension]);
179 virtual void SetOrigin(
const float origin[VImageDimension]);
229 itkGetConstReferenceMacro(Origin,
PointType);
403 virtual void SetSpacing(
const double spacing[VImageDimension]);
404 virtual void SetSpacing(
const float spacing[VImageDimension]);
411 template<
typename TCoordRep >
449 template<
typename TCoordRep,
typename TIndexRep >
456 for (
unsigned int k = 0; k < VImageDimension; k++ )
458 cvector[k] = point[k] - this->
m_Origin[k];
461 for (
unsigned int i = 0; i < VImageDimension; i++ )
463 index[i] =
static_cast< TIndexRep
>( cvector[i] );
476 template<
typename TCoordRep,
typename TIndexRep >
481 for (
unsigned int r = 0; r < VImageDimension; r++ )
484 for (
unsigned int c = 0; c < VImageDimension; c++ )
498 template<
typename TCoordRep >
536 template<
typename TCoordRep >
547 for (
unsigned int i = 0; i < VImageDimension; i++ )
551 for (
unsigned int j = 0; j < VImageDimension; j++ )
553 sum += direction[i][j] * inputGradient[j];
555 outputGradient[i] =
static_cast< TCoordRep
>( sum );
567 template<
typename TCoordRep >
578 for (
unsigned int i = 0; i < VImageDimension; i++ )
582 for (
unsigned int j = 0; j < VImageDimension; j++ )
584 sum += inverseDirection[i][j] * inputGradient[j];
586 outputGradient[i] =
static_cast< TCoordRep
>( sum );
727 template <
typename TSpacingValue>
744 #ifndef ITK_MANUAL_INSTANTIATION
745 #include "itkImageBase.hxx"
void SetSize(const SizeType &size)
virtual void SetRegions(const RegionType ®ion)
virtual const DirectionType & GetInverseDirection()
OffsetValueType m_OffsetTable[VImageDimension+1]
const OffsetValueType * GetOffsetTable() const
Index< VImageDimension > IndexType
const IndexType & GetIndex() const
virtual void Graft(const DataObject *data)
void operator=(const Self &)
Represent the offset between two n-dimensional indexes in a n-dimensional image.
static void ComputeOffset(const IndexType &bufferedRegionIndex, const IndexType &index, const OffsetValueType offsetTable[], OffsetValueType &offset)
itk::SizeValueType SizeValueType
virtual void PrintSelf(std::ostream &os, Indent indent) const
Represent the size (bounds) of a n-dimensional image.
RegionType m_BufferedRegion
virtual void SetDirection(const DirectionType &direction)
bool IsInside(const IndexType &index) const
virtual const RegionType & GetLargestPossibleRegion() const
virtual const DirectionType & GetDirection()
An image region represents a structured region of data.
RegionType m_RequestedRegion
SpacePrecisionType SpacingValueType
virtual void SetRequestedRegionToLargestPossibleRegion()
void TransformIndexToPhysicalPoint(const IndexType &index, Point< TCoordRep, VImageDimension > &point) const
virtual bool VerifyRequestedRegion()
DirectionType m_IndexToPhysicalPoint
static void ComputeIndex(const IndexType &bufferedRegionIndex, OffsetValueType offset, const OffsetValueType offsetTable[], IndexType &index)
Size< VImageDimension > SizeType
DirectionType m_InverseDirection
virtual bool RequestedRegionIsOutsideOfTheBufferedRegion()
Point< PointValueType, VImageDimension > PointType
virtual void SetSpacing(const SpacingType &spacing)
Matrix< SpacePrecisionType, VImageDimension, VImageDimension > DirectionType
Simulate a standard C array with copy semnatics.
virtual void SetRegions(const SizeType &size)
IndexType ComputeIndex(OffsetValueType offset) const
DirectionType m_Direction
::itk::IndexValueType IndexValueType
bool TransformPhysicalPointToContinuousIndex(const Point< TCoordRep, VImageDimension > &point, ContinuousIndex< TIndexRep, VImageDimension > &index) const
Get the continuous index from a physical point.
virtual void SetNumberOfComponentsPerPixel(unsigned int)
void ComputeOffsetTable()
virtual const RegionType & GetBufferedRegion() const
Offset< VImageDimension > OffsetType
SmartPointer< const Self > ConstPointer
virtual void CopyInformation(const DataObject *data)
virtual unsigned int GetNumberOfComponentsPerPixel() const
Vector< SpacingValueType, VImageDimension > SpacingType
void TransformLocalVectorToPhysicalVector(const FixedArray< TCoordRep, VImageDimension > &inputGradient, FixedArray< TCoordRep, VImageDimension > &outputGradient) const
void CastFrom(const Vector< TCoordRepB, NVectorDimension > &pa)
void TransformPhysicalVectorToLocalVector(const FixedArray< TCoordRep, VImageDimension > &inputGradient, FixedArray< TCoordRep, VImageDimension > &outputGradient) const
static unsigned int GetImageDimension()
virtual void UpdateOutputData()
virtual void InitializeBufferedRegion(void)
SmartPointer< Self > Pointer
SizeType::SizeValueType SizeValueType
OffsetType::OffsetValueType OffsetValueType
void InternalSetSpacing(const TSpacingValue spacing[VImageDimension])
virtual void SetLargestPossibleRegion(const RegionType ®ion)
Base class for templated image classes.
A templated class holding a point in n-Dimensional image space.
void TransformContinuousIndexToPhysicalPoint(const ContinuousIndex< TIndexRep, VImageDimension > &index, Point< TCoordRep, VImageDimension > &point) const
DirectionType m_PhysicalPointToIndex
virtual const RegionType & GetRequestedRegion() const
virtual void ComputeIndexToPhysicalPointMatrices()
Control indentation during Print() invocation.
void InternalSetSpacing(const SpacingValueType spacing[VImageDimension])
OffsetValueType ComputeOffset(const IndexType &ind) const
double SpacePrecisionType
Define additional traits for native types such as int or float.
ImageRegion< VImageDimension > RegionType
itk::OffsetValueType OffsetValueType
virtual void UpdateOutputInformation()
SpacePrecisionType PointValueType
static const unsigned int ImageDimension
Base class for all data objects in ITK.
IndexType::IndexValueType IndexValueType
RegionType m_LargestPossibleRegion
bool TransformPhysicalPointToIndex(const Point< TCoordRep, VImageDimension > &point, IndexType &index) const
virtual void SetRequestedRegion(const RegionType ®ion)
virtual void SetBufferedRegion(const RegionType ®ion)
virtual void SetOrigin(PointType _arg)