Skip to content

Commit

Permalink
FIX: segmentations layers should not have linear interpolation
Browse files Browse the repository at this point in the history
  • Loading branch information
pyushkevich committed Jan 3, 2025
1 parent 4b9a3a1 commit 807bd72
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions GUI/Renderer/GenericSliceRenderer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -776,8 +776,11 @@ void GenericSliceRenderer::UpdateLayerApperances()

// Pass the interpolation mode to the layer (for non-orthogonal slicing)
const GlobalDisplaySettings *gds = m_Model->GetParentUI()->GetGlobalDisplaySettings();
bool is_linear = gds->GetGreyInterpolationMode() == GlobalDisplaySettings::LINEAR;
it.GetLayer()->SetSlicingInterpolationMode(is_linear ? ImageWrapperBase::LINEAR : ImageWrapperBase::NEAREST);
bool is_linear =
(it.GetRole() != LABEL_ROLE) &&
(gds->GetGreyInterpolationMode() == GlobalDisplaySettings::LINEAR);
it.GetLayer()->SetSlicingInterpolationMode(
is_linear ? ImageWrapperBase::LINEAR : ImageWrapperBase::NEAREST);

// For orthogonal slicing, interpolation is passed to the texture assembly
auto *lta = GetLayerTextureAssembly(it.GetLayer());
Expand Down

0 comments on commit 807bd72

Please # to comment.