Skip to main content

AcquiredPoints

Namespace: UTILSLIB  ·  Library: Utilities Library

#include <utils/acquired_points.h>

class UTILSLIB::AcquiredPoints

In-memory store of all points captured during a session.

The wizard hands one of these to the 3-D view (for visualisation) and later to the export step (for FIFF write). Single-threaded, no locking.

src/examples/ex_utils/main.cpp
AcquiredPoints points;
points.append({PointKind::HeadShape, "HSP-1", 1, QVector3D(0.0f, 0.08f, 0.05f)});
points.append({PointKind::Eeg, "Cz", 1, QVector3D(0.0f, 0.0f, 0.09f)});
points.undoLast(PointKind::HeadShape);
const DigitizedPoint& kept = points.points().first(); // kind, label, FIFF ident, position (m)

Inheritance​


Public Methods​

AcquiredPoints(parent)​


points()​


append(p)​

Append a new point and emit UTILSLIB::AcquiredPoints::pointsChanged "pointsChanged".

Parameters:


undoLast(kind)​

Remove the most recently captured point matching kind, if any.

Parameters:

  • kind : PointKind Point kind whose most recent entry is removed.

clear()​

Drop every captured point.


fiducial(id)​

Convenience accessor: returns the captured fiducial position for id, or a default-constructed QVector3D if not yet captured.

Parameters:

  • id : FiducialId Fiducial to look up.

Returns:

  • QVector3D — Captured fiducial position, or a zero vector if not yet captured.

hasFiducial(id)​

True iff a fiducial of the given id has been captured.

Parameters:

  • id : FiducialId Fiducial to check.

Returns:

  • bool — True if the fiducial has been captured, false otherwise.

removeFiducial(id)​

Remove a previously captured fiducial so it can be re-recorded.

Parameters:

  • id : FiducialId Fiducial whose captured points are all removed.

hasAllFiducials()​

True iff all three cardinal fiducials have been captured.

Returns:

  • bool — True if NAS, LPA, and RPA have all been captured.

countOf(kind)​


setPosition(index, pos)​


emitChanged()​


setTwinFiducial(id, pos)​


clearTwinFiducial(id)​


hasTwinFiducial(id)​


twinFiducial(id)​


hasAllTwinFiducials()​


Example​

Used in examples​

ex_utils​

Utilities library: buffers, observers, logging, file formats, montages, layouts and reports.

src/examples/ex_utils/main.cpp, line 303
AcquiredPoints points;
points.append({PointKind::HeadShape, "HSP-1", 1, QVector3D(0.0f, 0.08f, 0.05f)});
points.append({PointKind::Eeg, "Cz", 1, QVector3D(0.0f, 0.0f, 0.09f)});
points.undoLast(PointKind::HeadShape);
const DigitizedPoint& kept = points.points().first(); // kind, label, FIFF ident, position (m)
ok &= expect(points.points().size() == 1 && kept.label == "Cz" && kept.position.z() == 0.09f && points.countOf(PointKind::Eeg) == 1 && !points.hasAllFiducials(), "AcquiredPoints keeps Cz after undoing the head-shape point");

Authors of this file​