@@ -103,7 +103,7 @@ class Session:
103103 only. None of the other transforms in the list are considered to be approved.
104104 """
105105
106- transducer_tracking_results : Optional [ List [TransducerTrackingResult ] ] = field (default_factory = list )
106+ transducer_tracking_results : List [TransducerTrackingResult ] = field (default_factory = list )
107107 """List of any transducer tracking results"""
108108
109109 def __post_init__ (self ):
@@ -150,10 +150,15 @@ def from_dict(d:Dict):
150150 if 'array_transform' in d :
151151 d ['array_transform' ] = ArrayTransform (np .array (d ['array_transform' ]['matrix' ]), d ['array_transform' ]['units' ])
152152 if 'transducer_tracking_results' in d :
153- d ['transducer_tracking_results' ] = [TransducerTrackingResult (t ['photoscan_id' ],
154- ArrayTransform (np .array (t ['transducer_to_photoscan_transform' ]['matrix' ]),t ['transducer_to_photoscan_transform' ]['units' ]),
155- ArrayTransform (np .array (t ['photoscan_to_volume_transform' ]['matrix' ]), t ['photoscan_to_volume_transform' ]['units' ]),
156- t ['transducer_tracking_approved' ]) for t in d ['transducer_tracking_results' ]]
153+ d ['transducer_tracking_results' ] = [
154+ TransducerTrackingResult (
155+ t ['photoscan_id' ],
156+ ArrayTransform (np .array (t ['transducer_to_photoscan_transform' ]['matrix' ]),t ['transducer_to_photoscan_transform' ]['units' ]),
157+ ArrayTransform (np .array (t ['photoscan_to_volume_transform' ]['matrix' ]), t ['photoscan_to_volume_transform' ]['units' ]),
158+ t ['transducer_tracking_approved' ]
159+ )
160+ for t in d ['transducer_tracking_results' ]
161+ ]
157162 if isinstance (d ['targets' ], list ):
158163 if len (d ['targets' ])> 0 and isinstance (d ['targets' ][0 ], dict ):
159164 d ['targets' ] = [Point .from_dict (p ) for p in d ['targets' ]]
0 commit comments