Skip to main content

src/DataObjects/Points/Point_Data.hpp

src/DataObjects/Points/Point_Data.hpp

Classes

Name
class PointData
PointData.
struct PointData::DataTraits
Type traits for PointData.

Types

Name
using DataEntry< Point2D< float > > PointEntry
using RaggedTimeSeriesView< Point2D< float > > PointDataView

Types Documentation

using PointEntry

using PointEntry =  DataEntry<Point2D<float>>;

using PointDataView

using PointDataView =  RaggedTimeSeriesView<Point2D<float>>;

Source code

#ifndef POINT_DATA_HPP
#define POINT_DATA_HPP

#include "CoreGeometry/ImageSize.hpp"
#include "CoreGeometry/points.hpp"
#include "Entity/EntityRegistry.hpp"
#include "Entity/EntityTypes.hpp"
#include "Observer/Observer_Data.hpp"
#include "TimeFrame/TimeFrame.hpp"
#include "TimeFrame/interval_data.hpp"
#include "TypeTraits/DataTypeTraits.hpp"
#include "RaggedTimeSeries/RaggedTimeSeries.hpp"

#include <map>
#include <optional>
#include <ranges>
#include <unordered_set>
#include <vector>


using PointEntry = DataEntry<Point2D<float>>;

class PointData : public RaggedTimeSeries<Point2D<float>> {
public:
    // ========== Type Traits ==========
    struct DataTraits : Neuralyzer::TypeTraits::DataTypeTraitsBase<PointData, Point2D<float>> {
        static constexpr bool is_ragged = true;
        static constexpr bool is_temporal = true;
        static constexpr bool has_entity_ids = true;
        static constexpr bool is_spatial = true;
    };

    // ========== Constructors ==========
    PointData() = default;

    explicit PointData(std::map<TimeFrameIndex, Point2D<float>> const & data);

    explicit PointData(std::map<TimeFrameIndex, std::vector<Point2D<float>>> const & data);

    // Inherit range constructor from base class for view-based construction
    using RaggedTimeSeries<Point2D<float>>::RaggedTimeSeries;

    // ========== Image Size ==========
    /*
    Image size is used to store the size of the image that the points belong to.
    */

    void setImageSize(ImageSize const & image_size) { _image_size = image_size; }

    void changeImageSize(ImageSize const & image_size);
};

using PointDataView = RaggedTimeSeriesView<Point2D<float>>;

#endif// POINT_DATA_HPP

Updated on 2026-11-13 at 20:25:43 +0000