You could create your own class that inherits HistogramLUTItem to add the percentiles to the plot. Is this basically what you did, but to the ImageView class? I recently did this to my own application where I wanted the HistogramLUTItem to display 3 histograms for RGB images. It's a bit of a hack, because I had to steal the ImageItem.getHistogram() function and redefined it in my RGBHistogramLUT class. I have 2 additional plots to the HistogramLUTItem.plot attribute for the green and blue histograms and add/remove them from the viewbox depending on if my data is single band, or RGBA.
(Like I said, it's a hack, but it works for me.) On Friday, July 21, 2017 at 2:12:25 PM UTC-4, Bjorn wrote: > > I recently added to the ImageView class to make a live-updating GUI for a > camera system. I needed to add markers to the histogram to show the > 10th-90th percentile values. I did think by manually plotting points on the > HistogramLUTITem's .plot attribute (PlotDataItem) .scatter attribute > (ScatterPlotItem), and manually showing the scatter attribute. This was > necessary since PlotDataItem only has a setData function for plotting, > which clears the plot each time it is called (unlike the more standard > PlotItem used in the examples). > > Is this the only way to implement adding a plot to the HistogramLUTItem? > If so, it seems worth replacing the PlotDataItem in the HistogramLUTITem > with a PlotItem, since it would give more control over the histogram while > adapting the ImageView class. > -- You received this message because you are subscribed to the Google Groups "pyqtgraph" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/bb6cc481-043b-4b13-b3c2-b8f04ce0fbb7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
