From 9b0d8250ae72b8b22b4dc4c0b310fff18b85ec8f Mon Sep 17 00:00:00 2001 From: dipterix Date: Fri, 2 Aug 2024 08:57:53 -0400 Subject: [PATCH] Added `BSC-DB` electrodes for 2202 2201 --- DESCRIPTION | 2 +- inst/prototypes/DBS-BSC-DB-2201.json | 1 + ...{BSC-DB-2202.json => DBS-BSC-DB-2202.json} | 0 inst/prototypes/sEEG.R | 31 +++++++++++++++++++ 4 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 inst/prototypes/DBS-BSC-DB-2201.json rename inst/prototypes/{BSC-DB-2202.json => DBS-BSC-DB-2202.json} (100%) diff --git a/DESCRIPTION b/DESCRIPTION index f4f59190..cf155088 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: threeBrain Type: Package Title: Your Advanced 3D Brain Visualization -Version: 1.1.1.9003 +Version: 1.1.1.9004 Authors@R: c( person("Zhengjia", "Wang", email = "dipterix.wang@gmail.com", role = c("aut", "cre", "cph")), person("John", "Magnotti", email = "John.Magnotti@Pennmedicine.upenn.edu", role = c("ctb", "res")), diff --git a/inst/prototypes/DBS-BSC-DB-2201.json b/inst/prototypes/DBS-BSC-DB-2201.json new file mode 100644 index 00000000..147f037d --- /dev/null +++ b/inst/prototypes/DBS-BSC-DB-2201.json @@ -0,0 +1 @@ +{"type":"DBS-BSC-DB-2201","name":[],"description":"Boston Scientific DB-2201 (8 contacts)\n Contact length : 1.5 mm\n Central spacing : 2 mm\n Tip size : 1.5 mm(*)\n Diameter : 1.3 mm","geometry":"CustomGeometry","n":[197,390],"fix_outline":false,"transform":[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],"position":[0,0,0,0.2487,0,0.0495,0.2154,0.1244,0.0495,0.1244,0.2154,0.0495,1.5231e-17,0.2487,0.0495,-0.1244,0.2154,0.0495,-0.2154,0.1244,0.0495,-0.2487,3.0462e-17,0.0495,-0.2154,-0.1244,0.0495,-0.1244,-0.2154,0.0495,-4.5694e-17,-0.2487,0.0495,0.1244,-0.2154,0.0495,0.2154,-0.1244,0.0495,0.2487,0,0.0495,0.4596,0,0.1904,0.398,0.2298,0.1904,0.2298,0.398,0.1904,2.8144e-17,0.4596,0.1904,-0.2298,0.398,0.1904,-0.398,0.2298,0.1904,-0.4596,5.6287e-17,0.1904,-0.398,-0.2298,0.1904,-0.2298,-0.398,0.1904,-8.4431e-17,-0.4596,0.1904,0.2298,-0.398,0.1904,0.398,-0.2298,0.1904,0.4596,0,0.1904,0.6005,0,0.4013,0.5201,0.3003,0.4013,0.3003,0.5201,0.4013,3.6771e-17,0.6005,0.4013,-0.3003,0.5201,0.4013,-0.5201,0.3003,0.4013,-0.6005,7.3543e-17,0.4013,-0.5201,-0.3003,0.4013,-0.3003,-0.5201,0.4013,-1.1031e-16,-0.6005,0.4013,0.3003,-0.5201,0.4013,0.5201,-0.3003,0.4013,0.6005,0.0001,0.4013,0.65,0,0.65,0.5629,0.325,0.65,0.325,0.5629,0.65,3.9801e-17,0.65,0.65,-0.325,0.5629,0.65,-0.5629,0.325,0.65,-0.65,7.9602e-17,0.65,-0.5629,-0.325,0.65,-0.325,-0.5629,0.65,-1.194e-16,-0.65,0.65,0.325,-0.5629,0.65,0.5629,-0.325,0.65,0.6499,0.0001,0.65,0.65,0,2.25,0.5629,0.325,2.25,0.325,0.5629,2.25,3.9801e-17,0.65,2.25,-0.325,0.5629,2.25,-0.5629,0.325,2.25,-0.65,7.9602e-17,2.25,-0.5629,-0.325,2.25,-0.325,-0.5629,2.25,-1.194e-16,-0.65,2.25,0.325,-0.5629,2.25,0.5629,-0.325,2.25,0.6499,0.0001,2.25,0.65,0,4.25,0.5629,0.325,4.25,0.325,0.5629,4.25,3.9801e-17,0.65,4.25,-0.325,0.5629,4.25,-0.5629,0.325,4.25,-0.65,7.9602e-17,4.25,-0.5629,-0.325,4.25,-0.325,-0.5629,4.25,-1.194e-16,-0.65,4.25,0.325,-0.5629,4.25,0.5629,-0.325,4.25,0.6499,0.0001,4.25,0.65,0,6.25,0.5629,0.325,6.25,0.325,0.5629,6.25,3.9801e-17,0.65,6.25,-0.325,0.5629,6.25,-0.5629,0.325,6.25,-0.65,7.9602e-17,6.25,-0.5629,-0.325,6.25,-0.325,-0.5629,6.25,-1.194e-16,-0.65,6.25,0.325,-0.5629,6.25,0.5629,-0.325,6.25,0.6499,0.0001,6.25,0.65,0,8.25,0.5629,0.325,8.25,0.325,0.5629,8.25,3.9801e-17,0.65,8.25,-0.325,0.5629,8.25,-0.5629,0.325,8.25,-0.65,7.9602e-17,8.25,-0.5629,-0.325,8.25,-0.325,-0.5629,8.25,-1.194e-16,-0.65,8.25,0.325,-0.5629,8.25,0.5629,-0.325,8.25,0.6499,0.0001,8.25,0.65,0,10.25,0.5629,0.325,10.25,0.325,0.5629,10.25,3.9801e-17,0.65,10.25,-0.325,0.5629,10.25,-0.5629,0.325,10.25,-0.65,7.9602e-17,10.25,-0.5629,-0.325,10.25,-0.325,-0.5629,10.25,-1.194e-16,-0.65,10.25,0.325,-0.5629,10.25,0.5629,-0.325,10.25,0.6499,0.0001,10.25,0.65,0,12.25,0.5629,0.325,12.25,0.325,0.5629,12.25,3.9801e-17,0.65,12.25,-0.325,0.5629,12.25,-0.5629,0.325,12.25,-0.65,7.9602e-17,12.25,-0.5629,-0.325,12.25,-0.325,-0.5629,12.25,-1.194e-16,-0.65,12.25,0.325,-0.5629,12.25,0.5629,-0.325,12.25,0.6499,0.0001,12.25,0.65,0,14.25,0.5629,0.325,14.25,0.325,0.5629,14.25,3.9801e-17,0.65,14.25,-0.325,0.5629,14.25,-0.5629,0.325,14.25,-0.65,7.9602e-17,14.25,-0.5629,-0.325,14.25,-0.325,-0.5629,14.25,-1.194e-16,-0.65,14.25,0.325,-0.5629,14.25,0.5629,-0.325,14.25,0.6499,0.0001,14.25,0.65,0,16.25,0.5629,0.325,16.25,0.325,0.5629,16.25,3.9801e-17,0.65,16.25,-0.325,0.5629,16.25,-0.5629,0.325,16.25,-0.65,7.9602e-17,16.25,-0.5629,-0.325,16.25,-0.325,-0.5629,16.25,-1.194e-16,-0.65,16.25,0.325,-0.5629,16.25,0.5629,-0.325,16.25,0.6499,0.0001,16.25,0.65,0,17,0.5629,0.325,17,0.325,0.5629,17,3.9801e-17,0.65,17,-0.325,0.5629,17,-0.5629,0.325,17,-0.65,7.9602e-17,17,-0.5629,-0.325,17,-0.325,-0.5629,17,-1.194e-16,-0.65,17,0.325,-0.5629,17,0.5629,-0.325,17,0.6499,0.0001,17,0.65,0,17.01,0.5629,0.325,17.01,0.325,0.5629,17.01,3.9801e-17,0.65,17.01,-0.325,0.5629,17.01,-0.5629,0.325,17.01,-0.65,7.9602e-17,17.01,-0.5629,-0.325,17.01,-0.325,-0.5629,17.01,-1.194e-16,-0.65,17.01,0.325,-0.5629,17.01,0.5629,-0.325,17.01,0.6499,0.0001,17.01,0.65,0,18,0.5629,0.325,18,0.325,0.5629,18,3.9801e-17,0.65,18,-0.325,0.5629,18,-0.5629,0.325,18,-0.65,7.9602e-17,18,-0.5629,-0.325,18,-0.325,-0.5629,18,-1.194e-16,-0.65,18,0.325,-0.5629,18,0.5629,-0.325,18,0.6499,0.0001,18,0,0,18],"index":[1,0,2,2,0,3,3,0,4,4,0,5,5,0,6,6,0,7,7,0,8,8,0,9,9,0,10,10,0,11,11,0,12,12,0,13,13,0,1,1,2,14,2,15,14,2,3,15,3,16,15,3,4,16,4,17,16,4,5,17,5,18,17,5,6,18,6,19,18,6,7,19,7,20,19,7,8,20,8,21,20,8,9,21,9,22,21,9,10,22,10,23,22,10,11,23,11,24,23,11,12,24,12,25,24,12,13,25,13,26,25,13,1,26,1,14,26,14,15,27,15,28,27,15,16,28,16,29,28,16,17,29,17,30,29,17,18,30,18,31,30,18,19,31,19,32,31,19,20,32,20,33,32,20,21,33,21,34,33,21,22,34,22,35,34,22,23,35,23,36,35,23,24,36,24,37,36,24,25,37,25,38,37,25,26,38,26,39,38,26,14,39,14,27,39,27,28,40,28,41,40,28,29,41,29,42,41,29,30,42,30,43,42,30,31,43,31,44,43,31,32,44,32,45,44,32,33,45,33,46,45,33,34,46,34,47,46,34,35,47,35,48,47,35,36,48,36,49,48,36,37,49,37,50,49,37,38,50,38,51,50,38,39,51,39,52,51,39,27,52,27,40,52,40,41,53,41,54,53,41,42,54,42,55,54,42,43,55,43,56,55,43,44,56,44,57,56,44,45,57,45,58,57,45,46,58,46,59,58,46,47,59,47,60,59,47,48,60,48,61,60,48,49,61,49,62,61,49,50,62,50,63,62,50,51,63,51,64,63,51,52,64,52,65,64,52,40,65,40,53,65,53,54,66,54,67,66,54,55,67,55,68,67,55,56,68,56,69,68,56,57,69,57,70,69,57,58,70,58,71,70,58,59,71,59,72,71,59,60,72,60,73,72,60,61,73,61,74,73,61,62,74,62,75,74,62,63,75,63,76,75,63,64,76,64,77,76,64,65,77,65,78,77,65,53,78,53,66,78,66,67,79,67,80,79,67,68,80,68,81,80,68,69,81,69,82,81,69,70,82,70,83,82,70,71,83,71,84,83,71,72,84,72,85,84,72,73,85,73,86,85,73,74,86,74,87,86,74,75,87,75,88,87,75,76,88,76,89,88,76,77,89,77,90,89,77,78,90,78,91,90,78,66,91,66,79,91,79,80,92,80,93,92,80,81,93,81,94,93,81,82,94,82,95,94,82,83,95,83,96,95,83,84,96,84,97,96,84,85,97,85,98,97,85,86,98,86,99,98,86,87,99,87,100,99,87,88,100,88,101,100,88,89,101,89,102,101,89,90,102,90,103,102,90,91,103,91,104,103,91,79,104,79,92,104,92,93,105,93,106,105,93,94,106,94,107,106,94,95,107,95,108,107,95,96,108,96,109,108,96,97,109,97,110,109,97,98,110,98,111,110,98,99,111,99,112,111,99,100,112,100,113,112,100,101,113,101,114,113,101,102,114,102,115,114,102,103,115,103,116,115,103,104,116,104,117,116,104,92,117,92,105,117,105,106,118,106,119,118,106,107,119,107,120,119,107,108,120,108,121,120,108,109,121,109,122,121,109,110,122,110,123,122,110,111,123,111,124,123,111,112,124,112,125,124,112,113,125,113,126,125,113,114,126,114,127,126,114,115,127,115,128,127,115,116,128,116,129,128,116,117,129,117,130,129,117,105,130,105,118,130,118,119,131,119,132,131,119,120,132,120,133,132,120,121,133,121,134,133,121,122,134,122,135,134,122,123,135,123,136,135,123,124,136,124,137,136,124,125,137,125,138,137,125,126,138,126,139,138,126,127,139,127,140,139,127,128,140,128,141,140,128,129,141,129,142,141,129,130,142,130,143,142,130,118,143,118,131,143,131,132,144,132,145,144,132,133,145,133,146,145,133,134,146,134,147,146,134,135,147,135,148,147,135,136,148,136,149,148,136,137,149,137,150,149,137,138,150,138,151,150,138,139,151,139,152,151,139,140,152,140,153,152,140,141,153,141,154,153,141,142,154,142,155,154,142,143,155,143,156,155,143,131,156,131,144,156,144,145,157,145,158,157,145,146,158,146,159,158,146,147,159,147,160,159,147,148,160,148,161,160,148,149,161,149,162,161,149,150,162,150,163,162,150,151,163,151,164,163,151,152,164,152,165,164,152,153,165,153,166,165,153,154,166,154,167,166,154,155,167,155,168,167,155,156,168,156,169,168,156,144,169,144,157,169,157,158,170,158,171,170,158,159,171,159,172,171,159,160,172,160,173,172,160,161,173,161,174,173,161,162,174,162,175,174,162,163,175,163,176,175,163,164,176,164,177,176,164,165,177,165,178,177,165,166,178,166,179,178,166,167,179,167,180,179,167,168,180,168,181,180,168,169,181,169,182,181,169,157,182,157,170,182,170,171,183,171,184,183,171,172,184,172,185,184,172,173,185,173,186,185,173,174,186,174,187,186,174,175,187,175,188,187,175,176,188,176,189,188,176,177,189,177,190,189,177,178,190,178,191,190,178,179,191,179,192,191,179,180,192,180,193,192,180,181,193,181,194,193,181,182,194,182,195,194,182,170,195,170,183,195,195,196,194,194,196,193,193,196,192,192,196,191,191,196,190,190,196,189,189,196,188,188,196,187,187,196,186,186,196,185,185,196,184,184,196,183,183,196,195],"uv":[0,0,0,0.0029,0.0833,0.0029,0.1667,0.0029,0.25,0.0029,0.3333,0.0029,0.4167,0.0029,0.5,0.0029,0.5833,0.0029,0.6667,0.0029,0.75,0.0029,0.8333,0.0029,0.9167,0.0029,1,0.0029,0,0.0112,0.0833,0.0112,0.1667,0.0112,0.25,0.0112,0.3333,0.0112,0.4167,0.0112,0.5,0.0112,0.5833,0.0112,0.6667,0.0112,0.75,0.0112,0.8333,0.0112,0.9167,0.0112,1,0.0112,0,0.0236,0.0833,0.0236,0.1667,0.0236,0.25,0.0236,0.3333,0.0236,0.4167,0.0236,0.5,0.0236,0.5833,0.0236,0.6667,0.0236,0.75,0.0236,0.8333,0.0236,0.9167,0.0236,1,0.0236,0,0.0382,0.0833,0.0382,0.1667,0.0382,0.25,0.0382,0.3333,0.0382,0.4167,0.0382,0.5,0.0382,0.5833,0.0382,0.6667,0.0382,0.75,0.0382,0.8333,0.0382,0.9167,0.0382,1,0.0382,0,0.1324,0.0833,0.1324,0.1667,0.1324,0.25,0.1324,0.3333,0.1324,0.4167,0.1324,0.5,0.1324,0.5833,0.1324,0.6667,0.1324,0.75,0.1324,0.8333,0.1324,0.9167,0.1324,1,0.1324,0,0.25,0.0833,0.25,0.1667,0.25,0.25,0.25,0.3333,0.25,0.4167,0.25,0.5,0.25,0.5833,0.25,0.6667,0.25,0.75,0.25,0.8333,0.25,0.9167,0.25,1,0.25,0,0.3676,0.0833,0.3676,0.1667,0.3676,0.25,0.3676,0.3333,0.3676,0.4167,0.3676,0.5,0.3676,0.5833,0.3676,0.6667,0.3676,0.75,0.3676,0.8333,0.3676,0.9167,0.3676,1,0.3676,0,0.4853,0.0833,0.4853,0.1667,0.4853,0.25,0.4853,0.3333,0.4853,0.4167,0.4853,0.5,0.4853,0.5833,0.4853,0.6667,0.4853,0.75,0.4853,0.8333,0.4853,0.9167,0.4853,1,0.4853,0,0.6029,0.0833,0.6029,0.1667,0.6029,0.25,0.6029,0.3333,0.6029,0.4167,0.6029,0.5,0.6029,0.5833,0.6029,0.6667,0.6029,0.75,0.6029,0.8333,0.6029,0.9167,0.6029,1,0.6029,0,0.7206,0.0833,0.7206,0.1667,0.7206,0.25,0.7206,0.3333,0.7206,0.4167,0.7206,0.5,0.7206,0.5833,0.7206,0.6667,0.7206,0.75,0.7206,0.8333,0.7206,0.9167,0.7206,1,0.7206,0,0.8382,0.0833,0.8382,0.1667,0.8382,0.25,0.8382,0.3333,0.8382,0.4167,0.8382,0.5,0.8382,0.5833,0.8382,0.6667,0.8382,0.75,0.8382,0.8333,0.8382,0.9167,0.8382,1,0.8382,0,0.9559,0.0833,0.9559,0.1667,0.9559,0.25,0.9559,0.3333,0.9559,0.4167,0.9559,0.5,0.9559,0.5833,0.9559,0.6667,0.9559,0.75,0.9559,0.8333,0.9559,0.9167,0.9559,1,0.9559,0,1,0.0833,1,0.1667,1,0.25,1,0.3333,1,0.4167,1,0.5,1,0.5833,1,0.6667,1,0.75,1,0.8333,1,0.9167,1,1,1,0,1.0006,0.0833,1.0006,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2],"normal":null,"texture_size":[4,256],"channel_map":[1,23,4,24,1,53,4,24,1,83,4,24,1,113,4,24,1,144,4,23,1,174,4,23,1,204,4,23,1,234,4,23],"marker_map":null,"channel_numbers":null,"contact_center":[0,0,2.25,0,0,4.25,0,0,6.25,0,0,8.25,0,0,10.25,0,0,12.25,0,0,14.25,0,0,16.25],"contact_sizes":[0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75],"model_control_points":[0,0,2.25,0,0,4.25,0,0,6.25,0,0,8.25,0,0,10.25,0,0,12.25,0,0,14.25,0,0,16.25],"model_control_point_orders":[1,2,3,4,5,6,7,8],"world_control_points":[],"fix_control_index":1,"model_direction":[0,0,1],"model_rigid":true,"model_up":[0,0,0],"world_up":null,"default_interpolation":"2.0x7","viewer_options":[]} diff --git a/inst/prototypes/BSC-DB-2202.json b/inst/prototypes/DBS-BSC-DB-2202.json similarity index 100% rename from inst/prototypes/BSC-DB-2202.json rename to inst/prototypes/DBS-BSC-DB-2202.json diff --git a/inst/prototypes/sEEG.R b/inst/prototypes/sEEG.R index 5daa0dbc..aa7aa46d 100644 --- a/inst/prototypes/sEEG.R +++ b/inst/prototypes/sEEG.R @@ -247,3 +247,34 @@ for( n_contacts in c(15, 18) ) { overwrite = TRUE ) } + +# ---- BostonScientific DBS-BSC-DB-2201 electrode ------------ +probe_head <- 1.5 # Not sure about this one +width <- 1.5 +contact_spacing <- 2 +overall_length <- 400 +diameter <- 1.3 +n_contacts <- 8 + +contacts <- probe_head + width / 2 + 0:(n_contacts-1) * contact_spacing +overall_length <- ceiling(max(contacts) + width / 2 + 0.05) + +proto <- seeg_prototype( + type = "DBS-BSC-DB-2201", + description = c( + "Boston Scientific DB-2201 (8 contacts)", + "Contact length : 1.5 mm", + "Central spacing : 2 mm", + "Tip size : 1.5 mm(*)", + "Diameter : 1.3 mm" + ), + center_position = contacts, + contact_widths = width, + diameter = diameter, + overall_length = overall_length, + default_interpolation = sprintf("%.1fx%d", contact_spacing, n_contacts - 1L), + overwrite = TRUE +) + +proto$model_rigid <- TRUE +proto$save_as_default(force = TRUE)