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