I need to generate a histogram of intensities!

Operating system:Windows
Slicer version:4.11.20210226
Expected behavior: Copy pasting the code is not working
Actual behavior: Errors are showing up

Hi Debadrita,
I have the same issue.
Did you find the answer? It would be appreciated if you share it with me.

@SHADI you are posting a follow up on a question that didn’t get answered. That’s because the poster didn’t provide any information beyond message “eerrors are showing up”. We don’t know what code was pasted, what were the errors etc.

There is already an example script for generating histograms from volumes in slicer script repository
https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#volumes

It seems to work perfectly on the latest stable.

Please give that a try, and then if you still encounter issues, give us more information about your slicer version, operating system, the code you pasted and the errors that was generated.