Skip to content

Commit

Permalink
Merge branch 'devel' of github.com:layerfMRI/LAYNII into devel
Browse files Browse the repository at this point in the history
  • Loading branch information
ofgulban committed Sep 12, 2021
2 parents 1545f1a + b1c6cea commit 2b88ba6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/LN2_MASK.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ int show_help(void) {
"\n"
"Notes:\n"
" - This refers to layerfMRI artifact here: \n"
" TODO: <add link here>\n"
" https://twitter.com/layerfMRI/status/1375067409523093513\n"
" - Note that columns and scores are expected to be positive numbers \n"
"\n");
return 0;
Expand Down
10 changes: 7 additions & 3 deletions src/LN2_PATCH_FLATTEN.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ int main(int argc, char* argv[]) {

// ========================================================================
// Prepare outputs
nifti_image* out_cells = copy_nifti_as_int32(nii_input);
nifti_image* out_cells = copy_nifti_as_int32(domain);
int32_t* out_cells_data = static_cast<int32_t*>(out_cells->data);

for (int i = 0; i != nr_voxels; ++i) {
Expand Down Expand Up @@ -332,7 +332,7 @@ int main(int argc, char* argv[]) {
int k = cell_idx_d * nr_cells + j;

// Write cell index to output
*(out_cells_data + i) = j;
*(out_cells_data + i) = j + 1;

// Write visited voxel value to flat cell
*(flat_values_data + k) += *(nii_input_data + i);
Expand All @@ -341,7 +341,11 @@ int main(int argc, char* argv[]) {
*(flat_domain_data + k) += *(domain_data + i);
}

save_output_nifti(fout, "UV_cells", out_cells, true);
// Add bin dimmensions into the output tag
std::ostringstream tag_u, tag_v;
tag_u << bins_u;
tag_v << bins_v;
save_output_nifti(fout, "UV_cells"+tag_u.str()+"x"+tag_v.str(), out_cells, true);

// Take the mean of each projected cell value
for (int i = 0; i != nr_bins; ++i) {
Expand Down

0 comments on commit 2b88ba6

Please sign in to comment.