You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 handleSpectral_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.
The text was updated successfully, but these errors were encountered: