9#include "../_cexports/c_img.h"
10#include "../_cexports/c_utilities.h"
12#include "../global.hpp"
13#include "../point_2d.hpp"
15#include "../data_type.hpp"
16#include "../iarray.hpp"
17#include "../image_plane_contiguous_iterator.hpp"
18#include "../image_plane_linear_iterator.hpp"
19#include "../image_plane_vpat_iterator.hpp"
70 void*
Handle()
const noexcept override;
122 int Rank() const noexcept
override
179 template <
class Type>
189 template <
class Type>
199 template <
class Type>
209 template <
class Type>
219 template <
class Type>
229 template <
class Type>
232 return CBeginContiguous<Type>();
242 template <
class Type>
252 template <
class Type>
255 return CEndContiguous<Type>();
265 template <
class Type>
275 template <
class Type>
278 return CRBeginContiguous<Type>();
288 template <
class Type>
298 template <
class Type>
301 return CEndContiguous<Type>();
311 template <
class Type>
321 template <
class Type>
331 template <
class Type>
341 template <
class Type>
351 template <
class Type>
361 template <
class Type>
364 return CBeginLinear<Type>();
374 template <
class Type>
384 template <
class Type>
387 return CEndLinear<Type>();
397 template <
class Type>
407 template <
class Type>
410 return CRBeginLinear<Type>();
420 template <
class Type>
430 template <
class Type>
433 return CREndLinear<Type>();
443 template <
class Type>
453 template <
class Type>
463 template <
class Type>
473 template <
class Type>
483 template <
class Type>
493 template <
class Type>
496 return CBeginVpat<Type>();
506 template <
class Type>
507 VpatConstIterator<Type>
CEndVpat()
const;
516 template <
class Type>
519 return CEndVpat<Type>();
529 template <
class Type>
539 template <
class Type>
542 return CRBeginVpat<Type>();
552 template <
class Type>
562 template <
class Type>
565 return CREndVpat<Type>();
574 , parentImage_(&image)
580 const Image * parentImage_ =
nullptr;
586struct PlaneTraits<ImagePlane>
588 using PlaneT = ImagePlane;
592 static constexpr bool HasVpat =
true;
594 static int GetWidth(
const ImagePlane &plane);
595 static int GetHeight(
const ImagePlane &plane);
599 return plane.DataType();
602 static constexpr int GetRank(
const ImagePlane &)
607 static Cvb::Vpat GetVpat(
const ImagePlane &plane)
Data type description for an image plane.
Definition: data_type.hpp:28
Array interface.
Definition: iarray.hpp:16
The Common Vision Blox image.
Definition: decl_image.hpp:45
Image plane information container.
Definition: decl_image_plane.hpp:33
std::uint8_t * ContiguousAccess() const
Attempt a contiguous access on the plane's pixels.
Definition: detail_image_plane.hpp:56
VpatConstIterator< Type > EndVpat() const
Get iterator access to the plane.
Definition: decl_image_plane.hpp:517
VpatConstIterator< Type > BeginVpat() const
Get iterator access to the plane.
Definition: decl_image_plane.hpp:494
std::reverse_iterator< LinearConstIterator< Type > > REndLinear() const
Get iterator access to the plane.
Definition: decl_image_plane.hpp:431
VpatIterator< Type > EndVpat()
Get iterator access to the plane.
Definition: detail_image_plane.hpp:295
LinearConstIterator< Type > BeginLinear() const
Get iterator access to the plane.
Definition: decl_image_plane.hpp:362
ContiguousConstIterator< Type > CBeginContiguous() const
Get iterator access to the plane.
Definition: detail_image_plane.hpp:214
std::reverse_iterator< LinearIterator< Type > > RBeginLinear()
Get iterator access to the plane.
Definition: detail_image_plane.hpp:252
std::reverse_iterator< ContiguousConstIterator< Type > > RBeginContiguous() const
Get iterator access to the plane.
Definition: decl_image_plane.hpp:276
std::reverse_iterator< ContiguousIterator< Type > > REndContiguous()
Get iterator access to the plane.
Definition: detail_image_plane.hpp:208
VpatConstIterator< Type > CEndVpat() const
Get iterator access to the plane.
Definition: detail_image_plane.hpp:321
ContiguousIterator< Type > BeginContiguous()
Get iterator access to the plane.
Definition: detail_image_plane.hpp:189
ContiguousIterator< Type > EndContiguous()
Get iterator access to the plane.
Definition: detail_image_plane.hpp:195
std::reverse_iterator< VpatConstIterator< Type > > RBeginVpat() const
Get iterator access to the plane.
Definition: decl_image_plane.hpp:540
LinearAccessData LinearAccess() const
Attempt a linear access on the plane's pixels.
Definition: detail_image_plane.hpp:79
LinearConstIterator< Type > EndLinear() const
Get iterator access to the plane.
Definition: decl_image_plane.hpp:385
bool TryLinearAccess(LinearAccessData &linearAccessData) const noexcept
Attempt a linear access on the plane's pixels.
Definition: detail_image_plane.hpp:64
int Rank() const noexcept override
Gets the number of dimensions for this array.
Definition: decl_image_plane.hpp:122
std::reverse_iterator< VpatConstIterator< Type > > CRBeginVpat() const
Get iterator access to the plane.
Definition: detail_image_plane.hpp:328
VpatConstIterator< Type > CBeginVpat() const
Get iterator access to the plane.
Definition: detail_image_plane.hpp:315
std::reverse_iterator< LinearConstIterator< Type > > CREndLinear() const
Get iterator access to the plane.
Definition: detail_image_plane.hpp:283
LinearConstIterator< Type > CEndLinear() const
Get iterator access to the plane.
Definition: detail_image_plane.hpp:270
VpatIterator< Type > BeginVpat()
Get iterator access to the plane.
Definition: detail_image_plane.hpp:289
std::reverse_iterator< LinearConstIterator< Type > > CRBeginLinear() const
Get iterator access to the plane.
Definition: detail_image_plane.hpp:277
std::reverse_iterator< VpatConstIterator< Type > > CREndVpat() const
Get iterator access to the plane.
Definition: detail_image_plane.hpp:334
std::reverse_iterator< LinearConstIterator< Type > > RBeginLinear() const
Get iterator access to the plane.
Definition: decl_image_plane.hpp:408
std::reverse_iterator< ContiguousConstIterator< Type > > CRBeginContiguous() const
Get iterator access to the plane.
Definition: detail_image_plane.hpp:227
LinearIterator< Type > EndLinear()
Get iterator access to the plane.
Definition: detail_image_plane.hpp:245
std::unique_ptr< Image > Map() const
Create a map from a single image plane that shares its memory with the original plane.
Definition: detail_image_plane.hpp:100
ContiguousConstIterator< Type > BeginContiguous() const
Get iterator access to the plane.
Definition: decl_image_plane.hpp:230
void * Handle() const noexcept override
Classic API image handle.
Definition: detail_image_plane.hpp:36
bool TryContiguousAccess(std::uint8_t *&basePtr) const noexcept
Attempt a contiguous access on the plane's pixels.
Definition: detail_image_plane.hpp:41
std::reverse_iterator< VpatIterator< Type > > REndVpat()
Get iterator access to the plane.
Definition: detail_image_plane.hpp:308
ImagePlane(const class Plane &plane)
Implicitly convert a plane to an image plane.
Definition: detail_image_plane.hpp:27
std::reverse_iterator< ContiguousIterator< Type > > RBeginContiguous()
Get iterator access to the plane.
Definition: detail_image_plane.hpp:202
std::reverse_iterator< VpatConstIterator< Type > > REndVpat() const
Get iterator access to the plane.
Definition: decl_image_plane.hpp:563
double GetPixel(Point2D< int > position) const
Gets the pixel value at the given position.
Definition: detail_image_plane.hpp:108
ContiguousConstIterator< Type > CEndContiguous() const
Get iterator access to the plane.
Definition: detail_image_plane.hpp:220
ContiguousConstIterator< Type > EndContiguous() const
Get iterator access to the plane.
Definition: decl_image_plane.hpp:253
std::reverse_iterator< VpatIterator< Type > > RBeginVpat()
Get iterator access to the plane.
Definition: detail_image_plane.hpp:302
const Image & Parent() const noexcept
Image to which this plane descriptor refers to.
Definition: detail_image_plane.hpp:87
LinearIterator< Type > BeginLinear()
Get iterator access to the plane.
Definition: detail_image_plane.hpp:239
LinearConstIterator< Type > CBeginLinear() const
Get iterator access to the plane.
Definition: detail_image_plane.hpp:264
std::reverse_iterator< LinearIterator< Type > > REndLinear()
Get iterator access to the plane.
Definition: detail_image_plane.hpp:258
std::reverse_iterator< ContiguousConstIterator< Type > > REndContiguous() const
Get iterator access to the plane.
Definition: decl_image_plane.hpp:299
std::reverse_iterator< ContiguousConstIterator< Type > > CREndContiguous() const
Get iterator access to the plane.
Definition: detail_image_plane.hpp:233
Linear access properties.
Definition: decl_linear_access.hpp:25
Plane information container.
Definition: decl_plane.hpp:28
Multi-purpose 2D vector class.
Definition: point_2d.hpp:20
Virtual Pixel Access Table.
Definition: decl_vpat.hpp:24
Root namespace for the Image Manager interface.
Definition: c_barcode.h:15