diff --git a/ManiVault/src/plugins/ImageData/src/Images.cpp b/ManiVault/src/plugins/ImageData/src/Images.cpp index c51deda68..b323df513 100644 --- a/ManiVault/src/plugins/ImageData/src/Images.cpp +++ b/ManiVault/src/plugins/ImageData/src/Images.cpp @@ -677,6 +677,9 @@ void Images::computeMaskData() if (_maskData.size() != getNumberOfPixels()) _maskData.resize(getNumberOfPixels()); + // All masked by default + std::fill(_maskData.begin(), _maskData.end(), 0); + // Get reference to input dataset auto inputDataset = getParent(); @@ -692,9 +695,6 @@ void Images::computeMaskData() // Get global indices from points points->getGlobalIndices(globalIndices); - // All masked by default - std::fill(_maskData.begin(), _maskData.end(), 0); - // Loop over all point indices and unmask them points->visitData([this, &points, &globalIndices](auto pointData) { for (std::int32_t localPointIndex = 0; localPointIndex < globalIndices.size(); localPointIndex++) { @@ -731,9 +731,6 @@ void Images::computeMaskData() // Obtain reference to the clusters dataset auto clusters = Dataset(inputDataset); - // Mask out all points - std::fill(_maskData.begin(), _maskData.end(), 0); - // Get clusters input points dataset auto points = clusters->getParent()->getSourceDataset(); auto embedding = clusters->getParent();