Skip to content

Commit

Permalink
Deploying to demo from @ b55e6e6 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
hanayik committed Aug 23, 2024
1 parent b09de5a commit 959a659
Show file tree
Hide file tree
Showing 60 changed files with 26,983 additions and 0 deletions.
20,242 changes: 20,242 additions & 0 deletions assets/brainchop-webworker-C3YgFmeN.js

Large diffs are not rendered by default.

1,830 changes: 1,830 additions & 0 deletions assets/index-BeZ2s21u.js

Large diffs are not rendered by default.

798 changes: 798 additions & 0 deletions assets/index-DZxOwtnj.js

Large diffs are not rendered by default.

Binary file added assets/niimath-s1cwWGoK.wasm
Binary file not shown.
2 changes: 2 additions & 0 deletions assets/worker-Jat8hhVx.js

Large diffs are not rendered by default.

Binary file added favicon.ico
Binary file not shown.
129 changes: 129 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
<!doctype html>
<html lang="en">

<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="./niivue.css" />
<title>Niivue brain chop</title>
<script type="module" crossorigin src="./assets/index-BeZ2s21u.js"></script>
</head>

<body>
<header>
<label for="clipCheck">Clip Plane</label>
<input type="checkbox" id="clipCheck" unchecked />
<label for="opacitySlider0">Background Opacity</label>
<input type="range" min="0" max="255" value="255" class="slider" id="opacitySlider0" />
&nbsp;
<label for="opacitySlider1">Overlay Opacity</label>
<input type="range" min="0" max="255" value="128" class="slider" id="opacitySlider1" />
&nbsp;
<label for="modelSelect">Segmentation Model</label>
<select id="modelSelect">
</select>
&nbsp;
<button id="createMeshBtn">Create Mesh</button>
&nbsp;
<button id="saveBtn">Save Image</button>
&nbsp;
<button id="saveMeshBtn">Save Mesh</button>
&nbsp;
<button id="aboutBtn">About</button>
&nbsp;
<label for="workerCheck" hidden>Use Webworker</label>
<input type="checkbox" hidden title="webworkers are faster but not supported by all browsers" id="workerCheck" checked />
&nbsp;
<div id="loadingCircle" class="loading-circle hidden"></div>

</header>
<main id="canvas-container">
<canvas id="gl1"></canvas>
</main>
<footer>
<div class="footer">
<table class="footer">
<tr>
<th id="location">Drag and Drop any NIfTI image</th>
<th><progress id="modelProgress" value="0" max="100"> 32% </progress></th>
<th>
<!-- important to use class footer here -->
<div class="footer" id="memstatus" style="color: green">Memory OK</div>
</th>
</tr>
</table>
</div>
</footer>
<dialog id="remeshDialog">
<form method="dialog">
<p>
<label>Closing (mm)</label>
<input id="closeMM" type="number" min="0" value="4" max="100">
</p>
<p>
<label>
Hollow:
<select id="hollowSelect">
<option value="0">False: solid</option>
<option value="-1">1mm</option>
<option value="-2">2mm</option>
<option value="-4" selected>4mm</option>
<option value="-8">8mm</option>
<option value="-16">16mm</option>
</select>
</label>
</p>
<p>
<input type="checkbox" id="bubbleCheck" checked/>
<label>Fill bubbles</label>
</p>
<p>
<input type="checkbox" id="largestCheck" checked/>
<label>Largest cluster only</label>
</p>
<p>
<label for="smoothSlide">Smoothing</label>
<input
type="range"
min="0"
max="20"
value="5"
class="slider"
id="smoothSlide"
/>
</p>
<p>
<label>Simplify Percent (1..100)</label>
<input id="shrinkPct" type="number" min="1" value="30" max="100">
</p>
<button id="cancelBtn" formmethod="dialog">Cancel</button>
<button autofocus id="applyBtn" value="default">Apply</button>
</form>
</dialog>
<dialog id="saveDialog">
<form method="dialog">
<p>
<label>
Format:
<select id="formatSelect">
<option>MZ3 small and precise</option>
<option selected>OBJ widely supported</option>
<option>STL popular for printing</option>
</select>
</label>
</p>
<p>
<select id="scaleSelect">
<option value="4">1:4 Quarter Scale</option>
<option value="3">1:3 Third Scale</option>
<option value="2">1:2 Half Scale</option>
<option value="1" selected>1:1 Full Scale</option>
</select>
</p>
<button id="cancelSaveBtn" formmethod="dialog">Cancel</button>
<button autofocus id="applySaveBtn" value="default">Save</button>
</form>
</dialog>
</body>

</html>
1 change: 1 addition & 0 deletions models/GT/labels.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"0": "background", "1": "Grey Matter", "2": "White Matter"}
1 change: 1 addition & 0 deletions models/mnm_tfjs_me_test/colorLUT.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"0": "rgb(0,0,0)", "1": "rgb(255,255,255)", "2": "rgb(205,62,78)"}
Binary file added models/mnm_tfjs_me_test/group1-shard1of1.bin
Binary file not shown.
1 change: 1 addition & 0 deletions models/mnm_tfjs_me_test/labels.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"0": "background", "1": "White Matter", "2": "Grey Matter"}
1 change: 1 addition & 0 deletions models/mnm_tfjs_me_test/model.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"format": "layers-model", "generatedBy": "keras v2.4.0", "convertedBy": "TensorFlow.js Converter v3.2.0", "modelTopology": {"keras_version": "2.4.0", "backend": "tensorflow", "model_config": {"class_name": "Functional", "config": {"name": "model", "layers": [{"class_name": "InputLayer", "config": {"batch_input_shape": [null, 38, 38, 38, 1], "dtype": "float32", "sparse": false, "ragged": false, "name": "input"}, "name": "input", "inbound_nodes": []}, {"class_name": "Conv3D", "config": {"name": "17", "trainable": true, "dtype": "float32", "filters": 21, "kernel_size": [3, 3, 3], "strides": [1, 1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1, 1], "groups": 1, "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "Zeros", "config": {}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "17", "inbound_nodes": [[["input", 0, 0, {}]]]}, {"class_name": "Activation", "config": {"name": "18", "trainable": true, "dtype": "float32", "activation": "relu"}, "name": "18", "inbound_nodes": [[["17", 0, 0, {}]]]}, {"class_name": "Conv3D", "config": {"name": "19", "trainable": true, "dtype": "float32", "filters": 21, "kernel_size": [3, 3, 3], "strides": [1, 1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1, 1], "groups": 1, "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "Zeros", "config": {}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "19", "inbound_nodes": [[["18", 0, 0, {}]]]}, {"class_name": "Activation", "config": {"name": "20", "trainable": true, "dtype": "float32", "activation": "relu"}, "name": "20", "inbound_nodes": [[["19", 0, 0, {}]]]}, {"class_name": "Conv3D", "config": {"name": "21", "trainable": true, "dtype": "float32", "filters": 21, "kernel_size": [3, 3, 3], "strides": [1, 1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1, 1], "groups": 1, "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "Zeros", "config": {}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "21", "inbound_nodes": [[["20", 0, 0, {}]]]}, {"class_name": "Activation", "config": {"name": "22", "trainable": true, "dtype": "float32", "activation": "relu"}, "name": "22", "inbound_nodes": [[["21", 0, 0, {}]]]}, {"class_name": "Conv3D", "config": {"name": "23", "trainable": true, "dtype": "float32", "filters": 21, "kernel_size": [3, 3, 3], "strides": [1, 1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [2, 2, 2], "groups": 1, "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "Zeros", "config": {}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "23", "inbound_nodes": [[["22", 0, 0, {}]]]}, {"class_name": "Activation", "config": {"name": "24", "trainable": true, "dtype": "float32", "activation": "relu"}, "name": "24", "inbound_nodes": [[["23", 0, 0, {}]]]}, {"class_name": "Conv3D", "config": {"name": "25", "trainable": true, "dtype": "float32", "filters": 21, "kernel_size": [3, 3, 3], "strides": [1, 1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [4, 4, 4], "groups": 1, "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "Zeros", "config": {}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "25", "inbound_nodes": [[["24", 0, 0, {}]]]}, {"class_name": "Activation", "config": {"name": "26", "trainable": true, "dtype": "float32", "activation": "relu"}, "name": "26", "inbound_nodes": [[["25", 0, 0, {}]]]}, {"class_name": "Conv3D", "config": {"name": "27", "trainable": true, "dtype": "float32", "filters": 21, "kernel_size": [3, 3, 3], "strides": [1, 1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [8, 8, 8], "groups": 1, "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "Zeros", "config": {}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "27", "inbound_nodes": [[["26", 0, 0, {}]]]}, {"class_name": "Activation", "config": {"name": "28", "trainable": true, "dtype": "float32", "activation": "relu"}, "name": "28", "inbound_nodes": [[["27", 0, 0, {}]]]}, {"class_name": "Conv3D", "config": {"name": "29", "trainable": true, "dtype": "float32", "filters": 21, "kernel_size": [3, 3, 3], "strides": [1, 1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1, 1], "groups": 1, "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "Zeros", "config": {}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "29", "inbound_nodes": [[["28", 0, 0, {}]]]}, {"class_name": "Activation", "config": {"name": "30", "trainable": true, "dtype": "float32", "activation": "relu"}, "name": "30", "inbound_nodes": [[["29", 0, 0, {}]]]}, {"class_name": "Conv3D", "config": {"name": "output", "trainable": true, "dtype": "float32", "filters": 3, "kernel_size": [1, 1, 1], "strides": [1, 1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1, 1], "groups": 1, "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "Zeros", "config": {}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "output", "inbound_nodes": [[["30", 0, 0, {}]]]}], "input_layers": [["input", 0, 0]], "output_layers": [["output", 0, 0]]}}}, "weightsManifest": [{"paths": ["group1-shard1of1.bin"], "weights": [{"name": "17/kernel", "shape": [3, 3, 3, 1, 21], "dtype": "float32"}, {"name": "17/bias", "shape": [21], "dtype": "float32"}, {"name": "19/kernel", "shape": [3, 3, 3, 21, 21], "dtype": "float32"}, {"name": "19/bias", "shape": [21], "dtype": "float32"}, {"name": "21/kernel", "shape": [3, 3, 3, 21, 21], "dtype": "float32"}, {"name": "21/bias", "shape": [21], "dtype": "float32"}, {"name": "23/kernel", "shape": [3, 3, 3, 21, 21], "dtype": "float32"}, {"name": "23/bias", "shape": [21], "dtype": "float32"}, {"name": "25/kernel", "shape": [3, 3, 3, 21, 21], "dtype": "float32"}, {"name": "25/bias", "shape": [21], "dtype": "float32"}, {"name": "27/kernel", "shape": [3, 3, 3, 21, 21], "dtype": "float32"}, {"name": "27/bias", "shape": [21], "dtype": "float32"}, {"name": "29/kernel", "shape": [3, 3, 3, 21, 21], "dtype": "float32"}, {"name": "29/bias", "shape": [21], "dtype": "float32"}, {"name": "output/kernel", "shape": [1, 1, 1, 21, 3], "dtype": "float32"}, {"name": "output/bias", "shape": [3], "dtype": "float32"}]}]}
52 changes: 52 additions & 0 deletions models/model11_50class/colorLUT.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"0": "rgb(0,0,0)",
"1": "rgb(245,245,245)",
"2": "rgb(196,58,250)",
"3": "rgb(220,248,164)",
"4": "rgb(230,148,34)",
"5": "rgb(0,118,14)",
"6": "rgb(122,186,220)",
"7": "rgb(236,13,176)",
"8": "rgb(12,48,255)",
"9": "rgb(119,159,176)",
"10": "rgb(220,216,20)",
"11": "rgb(103,255,255)",
"12": "rgb(60,60,60)",
"13": "rgb(255,165,0)",
"14": "rgb(165,42,42)",
"15": "rgb(0,0,208)",
"16": "rgb(25,100,40)",
"17": "rgb(125,100,160)",
"18": "rgb(100,25,0)",
"19": "rgb(220,20,100)",
"20": "rgb(220,20,10)",
"21": "rgb(180,220,140)",
"22": "rgb(220,60,220)",
"23": "rgb(180,40,120)",
"24": "rgb(140,20,140)",
"25": "rgb(20,30,140)",
"26": "rgb(35,75,50)",
"27": "rgb(225,140,140)",
"28": "rgb(200,35,75)",
"29": "rgb(160,100,50)",
"30": "rgb(20,220,60)",
"31": "rgb(60,220,60)",
"32": "rgb(220,180,140)",
"33": "rgb(20,100,50)",
"34": "rgb(220,60,20)",
"35": "rgb(120,100,60)",
"36": "rgb(220,20,20)",
"37": "rgb(220,180,220)",
"38": "rgb(60,20,220)",
"39": "rgb(160,140,180)",
"40": "rgb(80,20,140)",
"41": "rgb(75,50,125)",
"42": "rgb(20,220,160)",
"43": "rgb(20,180,140)",
"44": "rgb(140,220,220)",
"45": "rgb(80,160,20)",
"46": "rgb(100,0,100)",
"47": "rgb(70,70,70)",
"48": "rgb(150,150,200)",
"49": "rgb(255,192,32)"
}
Binary file added models/model11_50class/group1-shard1of1.bin
Binary file not shown.
52 changes: 52 additions & 0 deletions models/model11_50class/labels.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"0": "BG",
"1": "Cerebral-White-Matter",
"2": "Ventricle",
"3": "Cerebellum-White-Matter",
"4": "Cerebellum",
"5": "Thalamus-Proper*",
"6": "Caudate",
"7": "Putamen",
"8": "Pallidum",
"9": "Brain-Stem",
"10": "Hippocampus",
"11": "Amygdala",
"12": "CSF",
"13": "Accumbens-area",
"14": "VentralDC",
"15": "CC_Posterior / CC_Mid_Posterior / CC_Central / CC_Mid_Anterior / CC_Anterior",
"16": "ctx-bankssts",
"17": "ctx-caudalanteriorcingulate",
"18": "ctx-caudalmiddlefrontal",
"19": "ctx-cuneus",
"20": "ctx-entorhinal",
"21": "ctx-fusiform",
"22": "ctx-inferiorparietal",
"23": "ctx-inferiortemporal",
"24": "ctx-isthmuscingulate",
"25": "ctx-lateraloccipital",
"26": "ctx-lateralorbitofrontal",
"27": "ctx-lingual",
"28": "ctx-medialorbitofrontal",
"29": "ctx-middletemporal",
"30": "ctx-parahippocampal",
"31": "ctx-paracentral",
"32": "ctx-parsopercularis",
"33": "ctx-parsorbitalis",
"34": "ctx-parstriangularis",
"35": "ctx-pericalcarine",
"36": "ctx-postcentral",
"37": "ctx-posteriorcingulate",
"38": "ctx-precentral",
"39": "ctx-precuneus",
"40": "ctx-rostralanteriorcingulate",
"41": "ctx-rostralmiddlefrontal",
"42": "ctx-superiorfrontal",
"43": "ctx-superiorparietal",
"44": "ctx-superiortemporal",
"45": "ctx-supramarginal",
"46": "ctx-frontalpole",
"47": "ctx-temporalpole",
"48": "ctx-transversetemporal",
"49": "ctx-insula"
}
Binary file added models/model11_50class/labels.zip
Binary file not shown.
52 changes: 52 additions & 0 deletions models/model11_50class/labelsWithCompleteAnnot.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"0": "BG",
"1": "Left-Cerebral-White-Matter / Right-Cerebral-White-Matter",
"2": "Left-Lateral-Ventricle / Left-Inf-Lat-Vent / Right-Lateral-Ventricle / Right-Inf-Lat-Vent / 3rd-Ventricle / 4th-Ventricle",
"3": "Left-Cerebellum-White-Matter / Right-Cerebellum-White-Matter",
"4": "Left-Cerebellum-Cortex / Right-Cerebellum-Cortex",
"5": "Left-Thalamus-Proper* / Right-Thalamus-Proper*",
"6": "Left-Caudate / Right-Caudate",
"7": "Left-Putamen / Right-Putamen",
"8": "Left-Pallidum / Right-Pallidum",
"9": "Brain-Stem",
"10": "Left-Hippocampus / Right-Hippocampus",
"11": "Left-Amygdala / Right-Amygdala",
"12": "CSF",
"13": "Left-Accumbens-area / Right-Accumbens-area",
"14": "Left-VentralDC / Right-VentralDC",
"15": "CC_Posterior / CC_Mid_Posterior / CC_Central / CC_Mid_Anterior / CC_Anterior",
"16": "ctx-lh-bankssts / ctx-rh-bankssts",
"17": "ctx-lh-caudalanteriorcingulate / ctx-rh-caudalanteriorcingulate",
"18": "ctx-lh-caudalmiddlefrontal / ctx-rh-caudalmiddlefrontal",
"19": "ctx-lh-cuneus / ctx-rh-cuneus",
"20": "ctx-lh-entorhinal / ctx-rh-entorhinal",
"21": "ctx-lh-fusiform / ctx-rh-fusiform",
"22": "ctx-lh-inferiorparietal / ctx-rh-inferiorparietal",
"23": "ctx-lh-inferiortemporal / ctx-rh-inferiortemporal",
"24": "ctx-lh-isthmuscingulate / ctx-rh-isthmuscingulate",
"25": "ctx-lh-lateraloccipital / ctx-rh-lateraloccipital",
"26": "ctx-lh-lateralorbitofrontal / ctx-rh-lateralorbitofrontal",
"27": "ctx-lh-lingual / ctx-rh-lingual",
"28": "ctx-lh-medialorbitofrontal / ctx-rh-medialorbitofrontal",
"29": "ctx-lh-middletemporal / ctx-rh-middletemporal",
"30": "ctx-lh-parahippocampal / ctx-rh-parahippocampal",
"31": "ctx-lh-paracentral / ctx-rh-paracentral",
"32": "ctx-lh-parsopercularis / ctx-rh-parsopercularis",
"33": "ctx-lh-parsorbitalis / ctx-rh-parsorbitalis",
"34": "ctx-lh-parstriangularis / ctx-rh-parstriangularis",
"35": "ctx-lh-pericalcarine / ctx-rh-pericalcarine",
"36": "ctx-lh-postcentral / ctx-rh-postcentral",
"37": "ctx-lh-posteriorcingulate / ctx-rh-posteriorcingulate",
"38": "ctx-lh-precentral / ctx-rh-precentral",
"39": "ctx-lh-precuneus / ctx-rh-precuneus",
"40": "ctx-lh-rostralanteriorcingulate / ctx-rh-rostralanteriorcingulate",
"41": "ctx-lh-rostralmiddlefrontal / ctx-rh-rostralmiddlefrontal",
"42": "ctx-lh-superiorfrontal / ctx-rh-superiorfrontal",
"43": "ctx-lh-superiorparietal / ctx-rh-superiorparietal",
"44": "ctx-lh-superiortemporal / ctx-rh-superiortemporal",
"45": "ctx-lh-supramarginal / ctx-rh-supramarginal",
"46": "ctx-lh-frontalpole / ctx-rh-frontalpole",
"47": "ctx-lh-temporalpole / ctx-rh-temporalpole",
"48": "ctx-lh-transversetemporal / ctx-rh-transversetemporal",
"49": "ctx-lh-insula / ctx-rh-insula"
}
Loading

0 comments on commit 959a659

Please sign in to comment.