@@ -466,19 +466,13 @@ private string perShankDepthIDs(int shank)
466466
467467
468468 ProbeUIManager uiManager = _probeUIManagers [ shank ] ;
469- //Vector3 baseCoordWorldT = uiManager.ShankTipT().position + _probeController.ProbeTipT.up * _channelMinY;
470- //Vector3 topCoordWorldT = uiManager.ShankTipT().position + _probeController.ProbeTipT.up * _channelMaxY;
471469
472470 Vector3 baseCoordWorldT = uiManager . ShankTipT ( ) . position ;
473471 Vector3 topCoordWorldT = uiManager . ShankTipT ( ) . position - _probeController . ProbeTipT . forward * _channelMap . FullHeight ;
474- //float height = _channelMaxY - _channelMinY;
475472 float height = _channelMap . FullHeight ;
476473
477- // convert to worldU
478- ProbeInsertion insertion = _probeController . Insertion ;
479-
480- Vector3 baseCoordWorldU = BrainAtlasManager . WorldT2WorldU ( baseCoordWorldT , true ) ;
481- Vector3 topCoordWorldU = BrainAtlasManager . WorldT2WorldU ( topCoordWorldT , true ) ;
474+ Vector3 baseCoordWorldU = BrainAtlasManager . WorldT2WorldU ( baseCoordWorldT , false ) ;
475+ Vector3 topCoordWorldU = BrainAtlasManager . WorldT2WorldU ( topCoordWorldT , false ) ;
482476
483477 // Lerp between the base and top coordinate in small steps'
484478
@@ -496,6 +490,9 @@ private string perShankDepthIDs(int shank)
496490 int ID = BrainAtlasManager . ActiveReferenceAtlas . GetAnnotationIdx ( BrainAtlasManager . ActiveReferenceAtlas . World2AtlasIdx ( coordU ) ) ;
497491 if ( ID < 0 ) ID = - 1 ;
498492
493+ if ( Settings . UseBeryl )
494+ ID = BrainAtlasManager . ActiveReferenceAtlas . Ontology . RemapID_NoLayers ( ID ) ;
495+
499496 if ( ID != lastID )
500497 {
501498 // Save the current step
@@ -552,12 +549,15 @@ public string GetChannelAnnotationIDs(bool collapsed = true)
552549 Vector3 channelCoordWorldT = shankTipCoordWorldT - _probeController . ProbeTipT . forward * channelMapData [ i ] . y / 1000f ;
553550
554551 // Now transform this into WorldU
555- Vector3 channelCoordWorldU = BrainAtlasManager . WorldT2WorldU ( channelCoordWorldT , true ) ;
552+ Vector3 channelCoordWorldU = BrainAtlasManager . WorldT2WorldU ( channelCoordWorldT , false ) ;
556553
557554 int elecIdx = si * channelMapData . Count + i ;
558555 int ID = BrainAtlasManager . ActiveReferenceAtlas . GetAnnotationIdx ( BrainAtlasManager . ActiveReferenceAtlas . World2AtlasIdx ( channelCoordWorldU ) ) ;
559556 if ( ID < 0 ) ID = - 1 ;
560557
558+ if ( Settings . UseBeryl )
559+ ID = BrainAtlasManager . ActiveReferenceAtlas . Ontology . RemapID_NoLayers ( ID ) ;
560+
561561 string acronym = BrainAtlasManager . ActiveReferenceAtlas . Ontology . ID2Acronym ( ID ) ;
562562 Color color = BrainAtlasManager . ActiveReferenceAtlas . Ontology . ID2Color ( ID ) ;
563563
@@ -578,11 +578,14 @@ public string GetChannelAnnotationIDs(bool collapsed = true)
578578 Vector3 channelCoordWorldT = tipCoordWorldT - _probeController . ProbeTipT . forward * channelMapData [ i ] . y / 1000f ;
579579
580580 // Now transform this into WorldU
581- Vector3 channelCoordWorldU = BrainAtlasManager . WorldT2WorldU ( channelCoordWorldT , true ) ;
581+ Vector3 channelCoordWorldU = BrainAtlasManager . WorldT2WorldU ( channelCoordWorldT , false ) ;
582582
583583 int ID = BrainAtlasManager . ActiveReferenceAtlas . GetAnnotationIdx ( BrainAtlasManager . ActiveReferenceAtlas . World2AtlasIdx ( channelCoordWorldU ) ) ;
584584 if ( ID < 0 ) ID = - 1 ;
585585
586+ if ( Settings . UseBeryl )
587+ ID = BrainAtlasManager . ActiveReferenceAtlas . Ontology . RemapID_NoLayers ( ID ) ;
588+
586589 string acronym = BrainAtlasManager . ActiveReferenceAtlas . Ontology . ID2Acronym ( ID ) ;
587590 Color color = BrainAtlasManager . ActiveReferenceAtlas . Ontology . ID2Color ( ID ) ;
588591
0 commit comments