18#ifndef itkValarrayImageContainer_h
19#define itkValarrayImageContainer_h
47template <
typename TElementIdentifier,
typename TElement>
50 ,
private std::valarray<TElement>
104 if (this->
Size() > 0)
106 return &(this->ValarrayType::operator[](0));
119 return static_cast<unsigned long>(this->ValarrayType::size());
129 this->ValarrayType::resize(num);
138 this->ValarrayType::resize(this->ValarrayType::size());
145 this->ValarrayType::resize(0);
152 this->ValarrayType::operator=(value);
165 os << indent <<
"Pointer: " <<
const_cast<ValarrayImageContainer *
>(
this)->GetBufferPointer() << std::endl;
168 os << indent <<
"Size: " << this->
Size() << std::endl;
Control indentation during Print() invocation.
Light weight base class for most itk classes.
Base class for most ITK classes.
void PrintSelf(std::ostream &os, Indent indent) const override
Defines a front-end to the std\::<valarray> container that conforms to the ImageContainerInterface.
TElement & operator[](const ElementIdentifier id)
void Fill(const TElement &value)
ValarrayImageContainer(unsigned long n)
std::valarray< Element > ValarrayType
TElement * GetBufferPointer()
TElementIdentifier ElementIdentifier
ValarrayImageContainer(unsigned long n, const Element &x)
ValarrayImageContainer(const Self &r)
unsigned long Size() const
void Reserve(ElementIdentifier num)
const TElement & operator[](const ElementIdentifier id) const
void PrintSelf(std::ostream &os, Indent indent) const override
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Represent a n-dimensional size (bounds) of a n-dimensional image.