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

Further discussion needed re pcv._make_pseudo_rgb ? #1577

Open
HaleySchuhl opened this issue Aug 9, 2024 · 0 comments
Open

Further discussion needed re pcv._make_pseudo_rgb ? #1577

HaleySchuhl opened this issue Aug 9, 2024 · 0 comments

Comments

@HaleySchuhl
Copy link
Contributor

Is your feature request related to a problem? Please describe.
As the images we work on continue to get larger, thinking about how to streamline efficiency of algorithms and memory usage. The problem we look to address is the duplication of images. Currently, we make a pseudo_rgb image from each spectral image that gets read into plantcv, but in some cases we can save memory by not making this duplicate data object. Instead we can make this a method of the Spectral_data class.

Describe the solution you'd like
Make the function into a method of the Spectral_data class, and have it return the rgb image.

In the future, we can update the pcv.plot_image function to handle Spectral_data object instances, and this would work by calling the method when needed. There are a few different places where users are currently expected to access the specific attribute that can be handled by a downstream plantcv function. For example, this tutorial, depending on the function, and input RGB array might be used for plotting and is often copied as the first step in the function, as to not change the input array. This means that there could potentially be a lot more duplication of images given this proposed approach. Practically speaking, I think the pseudo_rgb is created and utilized in the majority of spectral analysis workflows, therefore I think we should consider leaving it as is.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context, sample data, or code relevant to the feature request here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant