Skip to content

Commit

Permalink
Deploying to demo from @ 2ff1c34 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
neurolabusc committed Jun 8, 2024
1 parent e7f04ca commit 9d94db1
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 23 deletions.
44 changes: 22 additions & 22 deletions assets/index-jh3uDHfm.js → assets/index-BR72DoTi.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="./niivue.css" />
<title>Niivue Neglect Predictions</title>
<script type="module" crossorigin src="./assets/index-jh3uDHfm.js"></script>
<script type="module" crossorigin src="./assets/index-BR72DoTi.js"></script>
</head>

<body>
Expand Down
32 changes: 32 additions & 0 deletions mat2nii.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
function ma2nii
% convert model with Radial basis function kernels from matlab to NIfTI
% we could use JSON, but we want to retain precision


models = load('models_5x10_diff.mat').models;
%
v = 1;
nii(v) = numel(models);
v = v + 1;
for i = 1:numel(models)
nii(v) = size(models{i}.SVs,1);
v = v + 1;
nii(v) = size(models{i}.SVs,2);
v = v + 1;
nii(v) = - models{i}.rho; % bias_i
v = v + 1;
nii(v) = models{i}.Parameters(4); % gamma_i
v = v + 1;
for j = 1:numel(models{i}.SVs)
nii(v) = models{i}.SVs(j); % support_vectors_i
v = v + 1;
end
if (size(models{i}.SVs,1) ~= numel(models{i}.sv_coef))
error('unexpected numel sv_coef');
end
for j = 1:numel(models{i}.sv_coef)
nii(v) = models{i}.sv_coef(j); % coefficients_i
v = v + 1;
end
end
niftiwrite(nii,'models_5x10_diff.nii')
Binary file added models_5x10_diff.nii.gz
Binary file not shown.

0 comments on commit 9d94db1

Please sign in to comment.