-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: rgb, v2 #141
base: main
Are you sure you want to change the base?
feat: rgb, v2 #141
Conversation
Note that histograms are broken :)
These are conventionally RGB(A) images in Python
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #141 +/- ##
==========================================
- Coverage 80.35% 80.34% -0.01%
==========================================
Files 44 44
Lines 4112 4178 +66
==========================================
+ Hits 3304 3357 +53
- Misses 808 821 +13 ☔ View full report in Codecov by Sentry. |
Otherwise the rgb image shows in grayscale :)
src/ndv/data.py
Outdated
def rgba() -> np.ndarray: | ||
img = np.zeros((4, 256, 256), dtype=np.uint8) | ||
|
||
for x in range(256): | ||
for y in range(256): | ||
img[0, x, y] = x | ||
img[1, x, y] = y | ||
img[2, x, y] = 255 - x | ||
img[3, x, y] = int(sqrt((x - 128) ** 2 + (y - 128) ** 2)) | ||
|
||
return img |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tlambert03 I copied this over from #41, but do we want/need it if we have astronaut
as well? Which should the example use?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be happy only using astronaut, but if you find this one useful for debugging, then I don't mind leaving it in (but add to the docstring when someone might want to use it)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, well I just wrote a commit deleting it, however I'm now realizing that there's no existing dataset with an alpha channel...so I added it back in 3761b9b, but augmented it into a 3D RGB dataset (with a short docstring).
It's useful for testing higher-dim RGB data, as might come from a RGB camera MDA via Micro-Manager in the real world
I did not realize that both images and volumes use PyGFXImageHandle
@tlambert03 I'm generally happy with the functionality here and would appreciate your thoughts and high-level review. Couple points I'd like your opinions on:
|
This PR revives the work done in #41, but updated for the new viewer. I'm guessing that the design can be further refined, and there are more bugs to be ironed out.
Still lots of cleaning, testing, bugfixing to do. Notably, there were many comments on #41 that should be gone through and addressed here.