|
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>
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;
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