Skip to content

Conversation

@loichuder
Copy link
Member

Fix #4423

The root cause of #4423 is the fact that the two views (Plot2dView and ComplexImageView) of the composite ImageView are updating simultaneously the colorbar dialog (since it is shared for the whole DataViewer).

In specific circumstances, the limits can be set by the view that is not displayed on screen, mismatching the limits of the actual displayed image.

After a long ponder on how to proceed, we decided to split the composite ImageView into two simple views Plot2dView and ComplexImageView so that only one is instantiated at a time. This matches the previous behaviour where only one view over the two is visible at all time but required some minor changes:

  • _ImageView is now deprecated
  • ComplexImageView label was set to Image for consistency with the previous behaviour
  • Plot2dView does not support complex anywore
  • The mode (i.e. id) of the available visualization changes (from 20, it becomes 21 for a regular image and 22 for a complex image)

Copy link
Member

@t20100 t20100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for delving into this!

Good to remove some intermediate layers.

@vallsv do you recall why there was this _ImageView using a QStackedWidget?

- `DataViews.PLOT1D_MODE`: display the data as a curve
- `DataViews.IMAGE_MODE`: display the data as an image
- `DataViews.PLOT2D_MODE`: display real data as an image
- `DataViews.COMPLEX_IMAGE_MODE`: display complex data as an image
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

COMPLEX_PLOT2D_MODE for consistency with PLOT2D_MODE maybe?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure!

@loichuder loichuder merged commit f0cd247 into main Jan 8, 2026
2 of 4 checks passed
@loichuder loichuder deleted the fix-cbar-limits branch January 8, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

silx view: max value of autoscale colormap set to 1, regardless of values in the image

3 participants