18 #ifndef itkValarrayImageContainer_h
19 #define itkValarrayImageContainer_h
48 typename TElementIdentifier,
53 private std::valarray< TElement >
94 {
return this->ValarrayType::operator[](
id); }
98 {
return this->ValarrayType::operator[](
id); }
104 if ( this->
Size() > 0 )
106 return & ( this->ValarrayType::operator[](0) );
117 {
return static_cast< unsigned long >( this->ValarrayType::size() ); }
124 { this->ValarrayType::resize(num); }
130 { this->ValarrayType::resize( this->ValarrayType::size() ); }
134 { this->ValarrayType::resize(0); }
137 void Fill(
const TElement & value)
138 { this->ValarrayType::operator=(value); }
149 os << indent <<
"Pointer: "
154 os << indent <<
"Size: " << this->
Size() << std::endl;
Light weight base class for most itk classes.
TElement & operator[](const ElementIdentifier id)
Represent the size (bounds) of a n-dimensional image.
SmartPointer< Self > Pointer
ValarrayImageContainer(const Self &r)
void Reserve(ElementIdentifier num)
unsigned long Size(void) const
TElement * GetBufferPointer()
std::valarray< Element > ValarrayType
SmartPointer< const Self > ConstPointer
ValarrayImageContainer Self
Defines a front-end to the std\::<valarray> container that conforms to the ImageContainerInterface.
ValarrayImageContainer(unsigned long n)
TElementIdentifier ElementIdentifier
void Fill(const TElement &value)
Control indentation during Print() invocation.
virtual void PrintSelf(std::ostream &os, Indent indent) const override
ValarrayImageContainer(unsigned long n, const Element &x)
Base class for most ITK classes.
const TElement & operator[](const ElementIdentifier id) const
virtual void PrintSelf(std::ostream &os, Indent indent) const override