Closed dxvidparham closed 8 months ago
Hi @davidlbit ,
as you closed the issue, can you tell what was the problem?
Thanks!
Best, Robert
Hi @haesleinhuepf,
The issue I encountered turned out to be a result of my own oversight regarding how Cle works. I realized that the data variable is already of type pyclesperanto_prototype._tier0._pycl.OCLArray, at this point of time.
When attempting the following code:
radius = 10 tmp = cle.top_hat_box(data[idx], None, radius_x=radius, radius_y=radius) tmp
The observed issue occurs due to not accessing the numerical representation of the slice, as one would with numpy arrays, but rather the view representation that Cle offers. I realized this after changing the index values but consistently obtaining the same plot. This realization was further supported by comparing the function with two distinct indexes and comparing their numerical representations against each other, as shown below:
radius = 10 tmp_1 = cle.top_hat_box(equalized_data[0], None, radius_x=radius, radius_y=radius) tmp_2 = cle.top_hat_box(equalized_data[10], None, radius_x=radius, radius_y=radius) (cle.pull(tmp_1) == cle.pull(tmp_2)).all()
This resulted in the output True.
Although I'm not entirely sure what's happening under the hood since no error messages are displayed, it appears that the slice with the most information is used as a fallback in situations like these.
Awesome thanks for the feedback!
Hi everyone,
I'm currently exploring the application of the top hat morphological operation on an entire volume of microscopy data. I've followed a similar approach demonstrated in the 3D-Segmentation-Notebook for the Intensity and background correction.
The above code produces the following result:
Afterwards, I used the following code to verify the results:
This code yields the following result:
I expected the results to be similar, but they differ quite significantly. Can anyone provide insights into why this discrepancy occurs?
Thank you!