Hi,

Any ideas regarding this issue?

On Thursday, July 16, 2020 at 2:24:54 PM UTC-7 [email protected] wrote:

>  Hi,
>
> I have two viewboxes as shown below. The one on the left is a PGImageView. 
> The one on the right is a PGGraphicsView. I used setXLink and setYLink to 
> link the two viewboxes.
>
> [image: image (7).png]
>
> On the right viewbox, I use drawKernel (PGImageItem) to draw a kernel at 
> the position of my mouse click within the viewbox.
>
> [image: image (9).png]
>
> In this example, I created a 5x5 kernel. This means that drawKernel was a 
> 5x5 numpy array. 
>
> On the left viewbox, I use the coordinates associated with the boundary of 
> the mask to draw an overlay. The problem is that the overlay is always 
> smaller than the mask. A 5x5 kernel means the line segments that create the 
> square span 5 numpy array indices. 
>
> However, the mask itself visually appears to span 6 numpy array indices. 
> This means that for a kernel of a given size (N x N), the corresponding 
> overlay will always be (N-1 x N-1). This becomes a big problem when working 
> with complex masks, such as the one shown below.
>
> [image: image (10).png]
>
> As shown above, the overlay doesn't exactly match the mask. Any thoughts 
> on how to solve this issue? Is there a better technique for taking a binary 
> mask in one viewbox and creating an exact overlay in a different viewbox?
>
> Thanks!
> PaLab
>
>

-- 
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/5dd94b74-dd39-420b-897a-9d47fe63ca00n%40googlegroups.com.

Reply via email to