Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH]: Add non zero mean as an aggregation function for structural images #219

Open
1 task done
antogeo opened this issue Apr 6, 2023 · 4 comments
Open
1 task done
Assignees
Labels
enhancement New feature or request question Further information is requested triage New issues waiting to be reviewed

Comments

@antogeo
Copy link

antogeo commented Apr 6, 2023

Are you requiring a new dataset or marker?

  • I understand this is not a marker or dataset request

Which feature do you want to include?

How do you imagine this integrated in junifer?

additional parameter

Do you have a sample code that implements this outside of junifer?

numpy.mean(numpy.nonzero(a))

Anything else to say?

no

@antogeo antogeo added enhancement New feature or request triage New issues waiting to be reviewed labels Apr 6, 2023
@fraimondo
Copy link
Contributor

Can you provide more information as requested (e.g. by properly filling the issue template)?

np.nonzero gives the indexes of the non-zero elements.

Also, doing a non-zero mean of floating point values will only work if values are exactly 0.

@antogeo
Copy link
Author

antogeo commented Apr 11, 2023

0 values indicate those voxels that despite belonging to a parcel they are certainly not part of tissue of interest. Therefore, should not be involved in the mean process. A cut-off value could also be a more general solution (eg a threshold applied in the tissue of interest).

@LeSasse
Copy link
Collaborator

LeSasse commented Apr 11, 2023

0 values indicate those voxels that despite belonging to a parcel they are certainly not part of tissue of interest. Therefore, should not be involved in the mean process. A cut-off value could also be a more general solution (eg a threshold applied in the tissue of interest).

By 0 values, do you mean voxels where the actual data is 0 (or below some threshold) or do you mean voxels where they are 0 (or below some threshold) in an additional probabilistic mask?

@fraimondo
Copy link
Contributor

I still do not get how this would be preferred instead of using a GM mask or something like that.

It's just basically thresholding whatever values you will aggregate.

How will this work with timeseries?

@fraimondo fraimondo added the question Further information is requested label Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested triage New issues waiting to be reviewed
Projects
None yet
Development

No branches or pull requests

4 participants