|
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));
127 return static_cast<unsigned long>(this->ValarrayType::size());
137 this->ValarrayType::resize(num);
146 this->ValarrayType::resize(this->ValarrayType::size());
153 this->ValarrayType::resize(0);
160 this->ValarrayType::operator=(value);
173 os << indent <<
"Pointer: " << const_cast<ValarrayImageContainer *>(
this)->GetBufferPointer() << std::endl;
176 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