René's URL Explorer Experiment


Title: Disappointing Converter behavior · Issue #197 · scijava/scijava · GitHub

Open Graph Title: Disappointing Converter behavior · Issue #197 · scijava/scijava

X Title: Disappointing Converter behavior · Issue #197 · scijava/scijava

Description: I am starting with this 16-bit image: If I convert it with Image > Type > 8-bit in Fiji I get: If I denoise this image I get this result (which I'm happy with): But if I try to convert it with e.g. result = ops.unary("convert.int8").inpu...

Open Graph Description: I am starting with this 16-bit image: If I convert it with Image > Type > 8-bit in Fiji I get: If I denoise this image I get this result (which I'm happy with): But if I try to convert it with e.g....

X Description: I am starting with this 16-bit image: If I convert it with Image > Type > 8-bit in Fiji I get: If I denoise this image I get this result (which I'm happy with): But if I try to convert it...

Opengraph URL: https://github.com/scijava/scijava/issues/197

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Disappointing Converter behavior","articleBody":"I am starting with this 16-bit image:\r\n\u003cimg width=\"685\" alt=\"image\" src=\"https://github.com/scijava/scijava/assets/1123809/129555b1-8250-4a73-b17e-1ffa587e38e3\"\u003e\r\n\r\nIf I convert it with `Image \u003e Type \u003e 8-bit` in Fiji I get:\r\n\u003cimg width=\"682\" alt=\"image\" src=\"https://github.com/scijava/scijava/assets/1123809/236dfedd-b6a4-4a55-ae9a-e5790d44834d\"\u003e\r\n\r\nIf I denoise this image I get this result (which I'm happy with):\r\n\u003cimg width=\"679\" alt=\"image\" src=\"https://github.com/scijava/scijava/assets/1123809/0adc3d19-7c01-4ca7-b210-399c32dbf98f\"\u003e\r\n\r\nBut if I try to convert it with e.g. `result = ops.unary(\"convert.int8\").input(img).apply()` I get.. a `32-bit` image??\r\n\u003cimg width=\"687\" alt=\"image\" src=\"https://github.com/scijava/scijava/assets/1123809/eb10677c-efb4-4c47-819e-70dc0ef0843f\"\u003e\r\n\r\n`convert.uint8` is 8-bit, at least..\r\n\u003cimg width=\"681\" alt=\"image\" src=\"https://github.com/scijava/scijava/assets/1123809/8597583e-2962-451c-b7d3-b2b4abd5e788\"\u003e\r\n\r\n\r\nSmoothing the uint-8 version requires bumping up the smoothing strength significantly and it still doesn't look great:\r\n\u003cimg width=\"691\" alt=\"image\" src=\"https://github.com/scijava/scijava/assets/1123809/3e13ae29-e027-4dbb-8b22-6457236e080b\"\u003e\r\n\r\nSo, how I account for this behavior is:\r\n- In the ImageJ type conversion, values are scaled proportionately to the new range\r\n- In the SJ Ops type conversion, values are directly translated. This can result in type overflow (note the split tails in both the `int8` and `uint8` conversions) which **fundamentally changes the behavior of subsequent image processing**.\r\n- These [byte casts](https://github.com/scijava/incubator/blob/a969114d2f047a47dffb3ca2d189a3263d56d98a/scijava-ops-image/src/main/java/org/scijava/ops/image/convert/ConvertTypes.java#L111-L125) are perhaps not working as intended?\r\n\r\n@gselzer @ctrueden Is there rationale for not scaling the converters to the target data range?","author":{"url":"https://github.com/hinerm","@type":"Person","name":"hinerm"},"datePublished":"2024-03-12T19:01:50.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/197/scijava/issues/197"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:c8e6f97f-547a-5c69-04a3-d1ea7a0f9474
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idEBFA:8D142:2C255E9:39E4C36:696B2F44
html-safe-nonce57994046368596d2d6e50a9fbfcf45963b838a266756040a66352c29fa915a76
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQkZBOjhEMTQyOjJDMjU1RTk6MzlFNEMzNjo2OTZCMkY0NCIsInZpc2l0b3JfaWQiOiI4NTc0MDQ1NjcxNDk0NzI1NDQ0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacc39d5069b1004b9e612fa9ff986202976dcb396a97763177e92c53bc2dfd9d43
hovercard-subject-tagissue:2182470754
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/scijava/scijava/197/issue_layout
twitter:imagehttps://opengraph.githubassets.com/9c9eacebff3f29754351f5f0b87c314d2c1b5228e5ca72c35f300e5e2a34628b/scijava/scijava/issues/197
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/9c9eacebff3f29754351f5f0b87c314d2c1b5228e5ca72c35f300e5e2a34628b/scijava/scijava/issues/197
og:image:altI am starting with this 16-bit image: If I convert it with Image > Type > 8-bit in Fiji I get: If I denoise this image I get this result (which I'm happy with): But if I try to convert it with e.g....
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamehinerm
hostnamegithub.com
expected-hostnamegithub.com
None5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d
turbo-cache-controlno-preview
go-importgithub.com/scijava/scijava git https://github.com/scijava/scijava.git
octolytics-dimension-user_id1262770
octolytics-dimension-user_loginscijava
octolytics-dimension-repository_id85618439
octolytics-dimension-repository_nwoscijava/scijava
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id85618439
octolytics-dimension-repository_network_root_nwoscijava/scijava
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release82560a55c6b2054555076f46e683151ee28a19bc
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/scijava/scijava/issues/197#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fscijava%2Fscijava%2Fissues%2F197
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fscijava%2Fscijava%2Fissues%2F197
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=scijava%2Fscijava
Reloadhttps://github.com/scijava/scijava/issues/197
Reloadhttps://github.com/scijava/scijava/issues/197
Reloadhttps://github.com/scijava/scijava/issues/197
scijava https://github.com/scijava
scijavahttps://github.com/scijava/scijava
Notifications https://github.com/login?return_to=%2Fscijava%2Fscijava
Fork 0 https://github.com/login?return_to=%2Fscijava%2Fscijava
Star 8 https://github.com/login?return_to=%2Fscijava%2Fscijava
Code https://github.com/scijava/scijava
Issues 63 https://github.com/scijava/scijava/issues
Pull requests 1 https://github.com/scijava/scijava/pulls
Actions https://github.com/scijava/scijava/actions
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/scijava/scijava/security
Please reload this pagehttps://github.com/scijava/scijava/issues/197
Insights https://github.com/scijava/scijava/pulse
Code https://github.com/scijava/scijava
Issues https://github.com/scijava/scijava/issues
Pull requests https://github.com/scijava/scijava/pulls
Actions https://github.com/scijava/scijava/actions
Security https://github.com/scijava/scijava/security
Insights https://github.com/scijava/scijava/pulse
New issuehttps://github.com/login?return_to=https://github.com/scijava/scijava/issues/197
New issuehttps://github.com/login?return_to=https://github.com/scijava/scijava/issues/197
Disappointing Converter behaviorhttps://github.com/scijava/scijava/issues/197#top
https://github.com/hinerm
unscheduledhttps://github.com/scijava/scijava/milestone/2
https://github.com/hinerm
https://github.com/hinerm
hinermhttps://github.com/hinerm
on Mar 12, 2024https://github.com/scijava/scijava/issues/197#issue-2182470754
https://private-user-images.githubusercontent.com/1123809/312197924-129555b1-8250-4a73-b17e-1ffa587e38e3.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njg2MzI0MzMsIm5iZiI6MTc2ODYzMjEzMywicGF0aCI6Ii8xMTIzODA5LzMxMjE5NzkyNC0xMjk1NTViMS04MjUwLTRhNzMtYjE3ZS0xZmZhNTg3ZTM4ZTMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDExNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjAxMTdUMDY0MjEzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MDRkNGFhZTRhOTgwODUyN2JlMTAyYWNhOWE3ZThhYWNlOTJlOWYxNzgxZGUwY2ZjYmQ4YTY4NmE5M2MzYmU4ZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.RZRy-9Xplj6v1Vhytqk6rEBrVYGYdib82T9IuR3NEto
https://private-user-images.githubusercontent.com/1123809/312198091-236dfedd-b6a4-4a55-ae9a-e5790d44834d.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njg2MzI0MzMsIm5iZiI6MTc2ODYzMjEzMywicGF0aCI6Ii8xMTIzODA5LzMxMjE5ODA5MS0yMzZkZmVkZC1iNmE0LTRhNTUtYWU5YS1lNTc5MGQ0NDgzNGQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDExNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjAxMTdUMDY0MjEzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YmJiNmNkODFmMmViMjFiZTQ5NTkzZDFkMDVhZmRhYmQyNmQ1ODMzZWYyZWE3MTBiODI2MGFlYjRlY2FhYWQ1NCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.0q8NSQQZUMzT4T6m53yrwsXkw-q9eOSD9vtOzu0H5wQ
https://private-user-images.githubusercontent.com/1123809/312198470-0adc3d19-7c01-4ca7-b210-399c32dbf98f.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njg2MzI0MzMsIm5iZiI6MTc2ODYzMjEzMywicGF0aCI6Ii8xMTIzODA5LzMxMjE5ODQ3MC0wYWRjM2QxOS03YzAxLTRjYTctYjIxMC0zOTljMzJkYmY5OGYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQU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phNhI_nieXTytvaFMvW3GrGNDCziUQ9kRF87knU
https://private-user-images.githubusercontent.com/1123809/312199439-8597583e-2962-451c-b7d3-b2b4abd5e788.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njg2MzI0MzMsIm5iZiI6MTc2ODYzMjEzMywicGF0aCI6Ii8xMTIzODA5LzMxMjE5OTQzOS04NTk3NTgzZS0yOTYyLTQ1MWMtYjdkMy1iMmI0YWJkNWU3ODgucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDExNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjAxMTdUMDY0MjEzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OWVhODhmNTZiMDlmMmFkMzI1MDhiNTkyMGYwOWM4NjMwZDIzNzZhZTVkZGFlNmNiODMyY2I3MWMyZDUzNGMzOSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.1vLrd3cKaHFa4pRb1wvvO0eomDX226rsFSzfKsuTj6I
https://private-user-images.githubusercontent.com/1123809/312202733-3e13ae29-e027-4dbb-8b22-6457236e080b.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njg2MzI0MzMsIm5iZiI6MTc2ODYzMjEzMywicGF0aCI6Ii8xMTIzODA5LzMxMjIwMjczMy0zZTEzYWUyOS1lMDI3LTRkYmItOGIyMi02NDU3MjM2ZTA4MGIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDExNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjAxMTdUMDY0MjEzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZDExNmJlMWIwZmVjMGMyMjBiYjk2YjRkOWI3Y2MyNTMzYzQyNmVkMjYwOWY4MTIxNjhlY2FlNDZjNjcxMjE1YyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.-lGyHJVwFXZerPz0QBDkjvWI36qSfZRU0bXFjBpUSt0
byte castshttps://github.com/scijava/incubator/blob/a969114d2f047a47dffb3ca2d189a3263d56d98a/scijava-ops-image/src/main/java/org/scijava/ops/image/convert/ConvertTypes.java#L111-L125
@gselzerhttps://github.com/gselzer
@ctruedenhttps://github.com/ctrueden
hinermhttps://github.com/hinerm
unscheduledNo due datehttps://github.com/scijava/scijava/milestone/2
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.