GCC Code Coverage Report


Directory: libimgdoc2/
File: libimgdoc2/src/doc/documentRead3d.h
Date: 2025-02-03 12:41:04
Exec Total Coverage
Lines: 2 2 100.0%
Functions: 1 1 100.0%
Branches: 0 0 -%

Line Branch Exec Source
1 // SPDX-FileCopyrightText: 2023 Carl Zeiss Microscopy GmbH
2 //
3 // SPDX-License-Identifier: MIT
4
5 #pragma once
6
7 #include <utility>
8 #include <memory>
9 #include <map>
10 #include <vector>
11 #include <imgdoc2.h>
12 #include "document.h"
13 #include "documentReadBase.h"
14 #include "ITileCoordinate.h"
15
16 class DocumentRead3d : public DocumentReadBase, public imgdoc2::IDocRead3d
17 {
18 public:
19 68 explicit DocumentRead3d(std::shared_ptr<Document> document) : DocumentReadBase(std::move(document))
20 68 {}
21
22 // interface IDocQuery3d
23 void ReadBrickInfo(imgdoc2::dbIndex idx, imgdoc2::ITileCoordinateMutate* coordinate, imgdoc2::LogicalPositionInfo3D* info, imgdoc2::BrickBlobInfo* brick_blob_info) override;
24 void Query(const imgdoc2::IDimCoordinateQueryClause* coordinate_clause, const imgdoc2::ITileInfoQueryClause* tileinfo_clause, const std::function<bool(imgdoc2::dbIndex)>& func) override;
25 void GetTilesIntersectingCuboid(const imgdoc2::CuboidD& cuboid, const imgdoc2::IDimCoordinateQueryClause* coordinate_clause, const imgdoc2::ITileInfoQueryClause* tileinfo_clause, const std::function<bool(imgdoc2::dbIndex)>& func) override;
26 void GetTilesIntersectingPlane(const imgdoc2::Plane_NormalAndDistD& plane, const imgdoc2::IDimCoordinateQueryClause* coordinate_clause, const imgdoc2::ITileInfoQueryClause* tileinfo_clause, const std::function<bool(imgdoc2::dbIndex)>& func) override;
27 void ReadBrickData(imgdoc2::dbIndex idx, imgdoc2::IBlobOutput* data) override;
28
29 // interface IDocInfo
30 void GetTileDimensions(imgdoc2::Dimension* dimensions, std::uint32_t& count) override;
31 std::map<imgdoc2::Dimension, imgdoc2::Int32Interval> GetMinMaxForTileDimension(const std::vector<imgdoc2::Dimension>& dimensions_to_query_for) override;
32 std::uint64_t GetTotalTileCount() override;
33 std::map<int, std::uint64_t> GetTileCountPerLayer() override;
34
35 // interface IDocInfo3d
36 void GetBricksBoundingBox(imgdoc2::DoubleInterval* bounds_x, imgdoc2::DoubleInterval* bounds_y, imgdoc2::DoubleInterval* bounds_z) override;
37 private:
38 std::shared_ptr<IDbStatement> GetReadBrickInfo_Statement(bool include_brick_coordinates, bool include_logical_position_info, bool include_brick_blob_info);
39 std::shared_ptr<IDbStatement> CreateQueryStatement(const imgdoc2::IDimCoordinateQueryClause* coordinate_clause, const imgdoc2::ITileInfoQueryClause* tileinfo_clause);
40 std::shared_ptr<IDbStatement> GetTilesIntersectingCuboidQueryWithSpatialIndex(const imgdoc2::CuboidD& cuboid) const;
41 std::shared_ptr<IDbStatement> GetTilesIntersectingCuboidQuery(const imgdoc2::CuboidD& cuboid);
42 std::shared_ptr<IDbStatement> GetTilesIntersectingCuboidQueryAndCoordinateAndInfoQueryClauseWithSpatialIndex(const imgdoc2::CuboidD& cuboid, const imgdoc2::IDimCoordinateQueryClause* coordinate_clause, const imgdoc2::ITileInfoQueryClause* tileinfo_clause);
43 std::shared_ptr<IDbStatement> GetTilesIntersectingCuboidQueryAndCoordinateAndInfoQueryClause(const imgdoc2::CuboidD& cuboid, const imgdoc2::IDimCoordinateQueryClause* coordinate_clause, const imgdoc2::ITileInfoQueryClause* tileinfo_clause);
44 std::shared_ptr<IDbStatement> GetReadBrickDataQueryStatement(imgdoc2::dbIndex idx);
45
46 std::shared_ptr<IDbStatement> GetTilesIntersectingWithPlaneQueryAndCoordinateAndInfoQueryClauseWithSpatialIndex(const imgdoc2::Plane_NormalAndDistD& plane, const imgdoc2::IDimCoordinateQueryClause* coordinate_clause, const imgdoc2::ITileInfoQueryClause* tileinfo_clause) const;
47 std::shared_ptr<IDbStatement> GetTilesIntersectingWithPlaneQueryAndCoordinateAndInfoQueryClause(const imgdoc2::Plane_NormalAndDistD& plane, const imgdoc2::IDimCoordinateQueryClause* coordinate_clause, const imgdoc2::ITileInfoQueryClause* tileinfo_clause) const;
48
49 std::shared_ptr<IDbStatement> CreateQueryTilesBoundingBoxStatement(bool include_x, bool include_y, bool include_z) const;
50 };
51