File tree Expand file tree Collapse file tree 3 files changed +260
-230
lines changed Expand file tree Collapse file tree 3 files changed +260
-230
lines changed Original file line number Diff line number Diff line change @@ -206,6 +206,35 @@ class PathBetweenSupervoxels extends RefCounted {
206
206
this . addSourceOrTarget ( newTarget ) ;
207
207
}
208
208
209
+ getLatestSegments ( layer : SegmentationUserLayerWithGraph ) {
210
+ if ( ! this . _source || ! this . _target ) {
211
+ return
212
+ }
213
+ const { segmentSelectionState} = layer . displayState ;
214
+ const newSource : Point = {
215
+ id : '' ,
216
+ segments : [
217
+ segmentSelectionState . rawSelectedSegment . clone ( ) ,
218
+ segmentSelectionState . selectedSegment . clone ( )
219
+ ] ,
220
+ point : this . _source . point ,
221
+ type : AnnotationType . POINT ,
222
+ } ;
223
+
224
+ const newTarget : Point = {
225
+ id : '' ,
226
+ segments : [
227
+ segmentSelectionState . rawSelectedSegment . clone ( ) ,
228
+ segmentSelectionState . selectedSegment . clone ( )
229
+ ] ,
230
+ point : this . _target . point ,
231
+ type : AnnotationType . POINT ,
232
+ } ;
233
+ this . clear ( ) ;
234
+ this . addSourceOrTarget ( newSource ) ;
235
+ this . addSourceOrTarget ( newTarget ) ;
236
+ }
237
+
209
238
toJSON ( ) {
210
239
const x : any = {
211
240
[ ANNOTATION_PATH_JSON_KEY ] : this . annotationSource . toJSON ( ) ,
You can’t perform that action at this time.
0 commit comments