[trackingdata] more logging, cleanup
This commit is contained in:
parent
4762921ccd
commit
c231b52876
@ -61,7 +61,7 @@ class TrackingData(QObject):
|
|||||||
self._indices = np.where((self._data[col] >= self._start) & (self._data[col] < self._stop))[0]
|
self._indices = np.where((self._data[col] >= self._start) & (self._data[col] < self._stop))[0]
|
||||||
|
|
||||||
def selectedData(self, col):
|
def selectedData(self, col):
|
||||||
return self._data[col][self._indices]
|
return self[col][self._indices]
|
||||||
|
|
||||||
def setUserSelection(self, ids):
|
def setUserSelection(self, ids):
|
||||||
"""
|
"""
|
||||||
@ -84,14 +84,20 @@ class TrackingData(QObject):
|
|||||||
userFlag : bool
|
userFlag : bool
|
||||||
Should the "userlabeled" state of the detections be set to True or False?
|
Should the "userlabeled" state of the detections be set to True or False?
|
||||||
"""
|
"""
|
||||||
self._data["track"][self._user_selections] = track_id
|
self["track"][self._user_selections] = track_id
|
||||||
self.setAssignmentStatus(userFlag)
|
self.setAssignmentStatus(userFlag)
|
||||||
|
|
||||||
def setAssignmentStatus(self, isTrue: bool):
|
def setAssignmentStatus(self, isTrue: bool):
|
||||||
self._data["userlabeled"][self._user_selections] = isTrue
|
logging.debug("TrackingData:Re-setting assignment status of user selected data to %s", str(isTrue))
|
||||||
|
self["userlabeled"][self._user_selections] = isTrue
|
||||||
|
|
||||||
def revertAssignmentStatus(self):
|
def revertAssignmentStatus(self):
|
||||||
self._data["userlabeled"][:] = False
|
logging.debug("TrackingData:Un-setting assignment status of all data!")
|
||||||
|
self["userlabeled"][:] = False
|
||||||
|
|
||||||
|
def revertTrackAssignments(self):
|
||||||
|
logging.debug("TrackingData: Reverting all track assignments!")
|
||||||
|
self["track"][:] = -1
|
||||||
|
|
||||||
def deleteDetections(self):
|
def deleteDetections(self):
|
||||||
# from IPython import embed
|
# from IPython import embed
|
||||||
@ -116,7 +122,7 @@ class TrackingData(QObject):
|
|||||||
None
|
None
|
||||||
"""
|
"""
|
||||||
if len(tracks) != self.numDetections:
|
if len(tracks) != self.numDetections:
|
||||||
logging.error("DataController: Size of passed tracks does not match data!")
|
logging.error("Trackingdata: Size of passed tracks does not match data!")
|
||||||
return
|
return
|
||||||
self._data["track"] = tracks
|
self._data["track"] = tracks
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user