Image concepts¶
Table of Contents
Image¶
Let Ima be a type that models Image (details).
Types
Then we can define :
| Definition | Description | Requirement |
|---|---|---|
| Ima::pixel_type | type of a pixel | models Pixel concept |
| Ima::const_pixel_type | type of a const pixel | models Pixel concept |
| Ima::domain_type | type of the domain | models Domain concept |
| Ima::index_type | type of the index to access a value | models Index concept |
| Ima::difference_type | type of the difference between 2 indexes | |
| Ima::const_pixel_range | type of the range to iterate over all the pixels | models ForwardRange concept |
| Ima::const_value_range | type of the range to iterate over all the values | models ForwardRange concept |
| Ima::point_type | type of a point | models Point concept |
| Ima::value_type | type of a value |
|
| Ima::const_reference | type of a const reference on a value |
Expressions
- Let :
cimabe an instance of const Ima.imabe an instance of Imapbe an instance of Ima::point_typekbe an instance of Ima::index_type
Then we have the following valid expressions :
| Expression | Return type | Pre-condition | Post-condition | Description |
|---|---|---|---|---|
cima[k] |
const_reference | none | none | Return const reference of the value at index k |
cima.pixels() |
const_pixel_range | none | none | Return a range of pixels to iterate over it |
cima.values() |
const_value_range | none | none | Return a range of values to iterate over it |
cima.domain() |
domain_type | none | none | Return the current domain of the image |
cima.index_of_point(p) |
index_type | none | none | Return the index of the point p |
cima.point_of_index(k) |
point_type | none | none | Return the point at the index k |
cima.delta_index(p) |
difference_type | none | none | Return a delta (?) from point p |
cima.is_concrete() |
bool | none | constexpr function | Check if the image is concrete |
cima.to_concrete() |
/* implementation defined */ | cima.is_concrete() == true |
none | Return type models ConcreteImage |
ConcreteImage¶
Let ConcIma be a type that models ConcreteImage (details).
Then ConcIma also models Image and Semiregular (fundamentals).
Types
Let ConcIma inherit all types defined for Image.
Expressions
Let ConcIma inherit all valid expressions defined for Image.
- Let :
concimabe an instance of ConcIma.concima_cpybe an instance of ConcIma.cconcimabe an instance of const ConcIma.kbe an instance of ConcIma::index_typedbe an instance of ConcIma::domain_typevbe an instance of ConcIma::value_type.
Then we have the following valid expressions :
| Expression | Return type | Pre-condition | Post-condition | Description |
|---|---|---|---|---|
concima() |
ConcIma | none | none | Constructs an image concima of type ConcIma |
cconcima() |
const ConcIma | none | none | Constructs an image cconcima of type ConcIma |
concima_cpy(concima) |
ConcIma | none | none | Copy-constructs an image concima_cpy from concima |
concima_cpy(cconcima) |
ConcIma | none | none | Copy-constructs an image concima_cpy from cconcima |
concima_cpy(move(pnt)) |
ConcIma | none | none | Move-constructs an image concima_cpy from concima |
concima_cpy = concima |
ConcIma& | none | none | Assign concima to concima_cpy |
concima_cpy = cconcima |
ConcIma& | none | none | Assign cconcima to concima_cpy |
concima_cpy = move(concima) |
ConcIma& | none | none | Move-assign concima to concima_cpy |
concima.resize(d) |
void | none | none | Resize concima to fit the domain d |
concima.resize(d, v) |
void | none | none | Resize concima to fit the domain d |
concima.reindex(k) |
void | none | none | Affects the index k to the first pixel |
WritableImage¶
Let WIma be a type that models WritableImage (details).
Then WIma also models Image.
Types
Let WIma inherit all types defined for Image.
Then we can define :
| Definition | Description | Requirement |
|---|---|---|
| WIma::pixel_range | type of the range to iterate over all the pixels | models ForwardRange and OutputRange concept |
| WIma::value_range | type of the range to iterate over all the values | models ForwardRange and OutputRange concept |
| WIma::reference | type of a reference on a value |
Expressions
Let WIma inherit all valid expressions defined for Image.
- Let :
wimabe an instance of WImakbe an instance of WIma::index_type.
Then we have the following valid expressions :
| Expression | Return type | Pre-condition | Post-condition | Description |
|---|---|---|---|---|
wima[k] |
reference | none | none | Return reference of the value at index k |
wima.pixels() |
pixel_range | none | none | Return a range of pixels to iterate over it |
wima.values() |
value_range | none | none | Return a range of values to iterate over it |
BidirectionalImage¶
Let BidirIma be a type that models BidirectionalImage (details).
Then BidirIma also models Image.
Types
Let BidirIma inherit all types defined for Image.
Then we can define :
| Definition | Description | Requirement |
|---|---|---|
| BidirIma::const_pixel_range | type of the range to iterate over all the pixels | models BidirectionalRange concept |
| BidirIma::const_value_range | type of the range to iterate over all the values | models BidirectionalRange concept |
Expressions
Let BidirIma inherit all valid expressions defined for Image.
WritableBidirectionalImage¶
Let WBidirIma be a type that models WritableBidirectionalImage (details).
Then WBidirIma also models WritableImage and BidirectionalImage.
Types
Let WBidirIma inherit all types defined for WritableImage.
Let WBidirIma inherit all types defined for BidirectionalImage.
Then we can define :
| Definition | Description | Requirement |
|---|---|---|
| WBidirIma::pixel_range | type of the range to iterate over all the pixels | models BidirectionalRange and OutputRange concept |
| WBidirIma::value_range | type of the range to iterate over all the values | models BidirectionalRange and OutputRange concept |
Expressions
Let WBidirIma inherit all valid expressions defined for WritableImage.
Let WBidirIma inherit all valid expressions defined for BidirectionalImage.
AccessibleImage¶
Let AccIma be a type that models AccessibleImage (details).
Then AccIma also models Image.
Types
Let AccIma inherit all types defined for Image.
Expressions
Let AccIma inherit all valid expressions defined for Image.
- Let :
caccimabe an instance of const AccImapbe an instance of Ima::point_type
Then we have the following valid expressions :
| Expression | Return type | Pre-condition | Post-condition | Description |
|---|---|---|---|---|
caccima(p) |
AccIma::const_reference | none | Bound checking | Return the value at point p |
caccima.pixel(p) |
AccIma::const_pixel_type | none | Bound checking | Return the pixel at point p |
caccima.at(p) |
AccIma::const_reference | none | No bound checking | Return the value at point p |
caccima.pixel_at(p) |
AccIma::const_pixel_type | none | No bound checking | Return the pixel at point p |
WritableAccessibleImage¶
Let WAccIma be a type that models WritableAccessibleImage (details).
Then WAccIma also models WritableImage and AccessibleImage.
Types
Let WAccIma inherit all types defined for WritableImage.
Let WAccIma inherit all types defined for AccessibleImage.
Expressions
Let WAccIma inherit all valid expressions defined for WritableImage.
Let WAccIma inherit all valid expressions defined for AccessibleImage.
- Let :
wcaccimabe an instance of WAccImapbe an instance of Ima::point_type
Then we have the following valid expressions :
| Expression | Return type | Pre-condition | Post-condition | Description |
|---|---|---|---|---|
wcaccima(p) |
WAccIma::reference | none | Bound checking | Return the value at point p |
wcaccima.pixel(p) |
WAccIma::pixel_type | none | Bound checking | Return the pixel at point p |
wcaccima.at(p) |
WAccIma::reference | none | No bound checking | Return the value at point p |
wcaccima.pixel_at(p) |
WAccIma::pixel_type | none | No bound checking | Return the pixel at point p |
RandomAccessImage¶
Let RndAccIma be a type that models RandomAccessImage (details).
Then RndAccIma also models BidirectionalImage and AccessibleImage.
Types
Let RndAccIma inherit all types defined for BidirectionalImage.
Let RndAccIma inherit all types defined for AccessibleImage.
Then we can define :
| Definition | Description | Requirement |
|---|---|---|
| RndAccIma::const_pixel_range | type of the range to iterate over all the pixels | models both RandomAccessRange and SizedRange concepts |
| RndAccIma::const_value_range | type of the range to iterate over all the values | models both RandomAccessRange and SizedRange concepts |
Expressions
Let RndAccIma inherit all valid expressions defined for BidirectionalImage.
Let RndAccIma inherit all valid expressions defined for AccessibleImage.
WritableRandomAccessImage¶
Let WRndAccIma be a type that models WritableRandomAccessImage (details).
Then WRndAccIma also models RandomAccessImage, WritableBidirectionalImage and WritableAccessibleImage.
Types
Let WRndAccIma inherit all types defined for RandomAccessImage.
Let WRndAccIma inherit all types defined for WritableBidirectionalImage.
Let WRndAccIma inherit all types defined for WritableAccessibleImage.
Then we can define :
| Definition | Description | Requirement |
|---|---|---|
| WRndAccIma::pixel_range | type of the range to iterate over all the pixels | models both RandomAccessRange and SizedRange concepts |
| WRndAccIma::value_range | type of the range to iterate over all the values | models both RandomAccessRange and SizedRange concepts |
Expressions
Let WRndAccIma inherit all valid expressions defined for RandomAccessImage.
Let WRndAccIma inherit all valid expressions defined for WritableBidirectionalImage.
Let WRndAccIma inherit all valid expressions defined for WritableAccessibleImage.