Skip to content

Commit

Permalink
Merge pull request #3 from SciVis/fix/corr
Browse files Browse the repository at this point in the history
Fix parameter-brain correlation computation
  • Loading branch information
ResearchDaniel committed Apr 23, 2024
2 parents 7fd3e4b + 8ee08b0 commit 6b09fd7
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions modules/visualneuro/src/processors/brainmask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ void BrainMask::process() {
throw inviwo::Exception("Expected all volumes to have same resolution");
}
auto brainRAM = volume->getRepresentation<VolumeRAM>();
//brainRAM->dispatch<void, dispatching::filter::Scalars>([&](auto vr) {
// auto data = vr->getDataTyped();
// using ValueType = util::PrecisionValueType<decltype(vr)>;
// util::forEachVoxelParallel(*resMask, [&](const size3_t& ind) {
// if (data[im(ind)] != ValueType{0}) {
// maskData[im(ind)] = maskBrain;
// }
// });
//});
brainRAM->dispatch<void, dispatching::filter::Scalars>([&](auto vr) {
auto data = vr->getDataTyped();
using ValueType = util::PrecisionValueType<decltype(vr)>;
util::forEachVoxelParallel(*resMask, [&](const size3_t& ind) {
if (data[im(ind)] != ValueType{0}) {
maskData[im(ind)] = maskBrain;
}
});
});
}
progress(1.f);
return mask;
Expand Down

0 comments on commit 6b09fd7

Please sign in to comment.