René's URL Explorer Experiment


Title: Can't uses `stats.mean` with a `SamplingIterableInterval` · Issue #270 · scijava/scijava · GitHub

Open Graph Title: Can't uses `stats.mean` with a `SamplingIterableInterval` · Issue #270 · scijava/scijava

X Title: Can't uses `stats.mean` with a `SamplingIterableInterval` · Issue #270 · scijava/scijava

Description: With SciJava ops in Fiji (via a Jython script) I am unable to use the stats.mean Op on a sample created from an ImgLabeling. Here's small example that replicates this behavior (use with the Blobs example open). #@ OpEnvironment ops #@ Im...

Open Graph Description: With SciJava ops in Fiji (via a Jython script) I am unable to use the stats.mean Op on a sample created from an ImgLabeling. Here's small example that replicates this behavior (use with the Blobs e...

X Description: With SciJava ops in Fiji (via a Jython script) I am unable to use the stats.mean Op on a sample created from an ImgLabeling. Here's small example that replicates this behavior (use with the Blo...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Can't uses `stats.mean` with a `SamplingIterableInterval`","articleBody":"With SciJava ops in Fiji (via a Jython script) I am unable to use the stats.mean Op on a sample created from an `ImgLabeling`.\r\n\r\nHere's small example that replicates this behavior (use with the Blobs example open).\r\n\r\n```python\r\n#@ OpEnvironment ops\r\n#@ Img img\r\n\r\nfrom net.imglib2.algorithm.labeling.ConnectedComponents import StructuringElement\r\nfrom net.imglib2.roi import Regions\r\nfrom net.imglib2.roi.labeling import LabelRegions\r\nfrom net.imglib2.type.logic import BitType\r\n\r\n# create an ImgLabeling\r\nthres = ops.op(\"create.img\").input(img, BitType()).apply()\r\nops.op(\"threshold.otsu\").input(img).output(thres).compute()\r\nlabeling = ops.op(\"labeling.cca\").input(thres, StructuringElement.FOUR_CONNECTED).apply()\r\n\r\n# create a sample for each label and run stats.mean\r\nregions = LabelRegions(labeling)\r\nfor r in regions:\r\n    sample = Regions.sample(r, img)\r\n    print(ops.op(\"stats.mean\").input(sample).apply())\r\n```\r\n\r\nThis creates the following stack trace:\r\n\r\n```java\r\nStarted bug_ops_stats_mean.py at Thu Aug 22 11:42:24 CDT 2024\r\nTraceback (most recent call last):\r\n  File \"/home/edward/Documents/workspaces/ops/examples/bugs/bug_ops_stats_mean.py\", line 18, in \u003cmodule\u003e\r\n    print(ops.op(\"stats.mean\").input(sample).apply())\r\n\r\nName: \"stats.mean\", Types: java.util.function.Function\u003cnet.imglib2.roi.util.SamplingIterableInterval\u003cnet.imglib2.type.numeric.integer.UnsignedByteType\u003e, org.scijava.common3.Any\u003e\r\nInput Types: \r\n\t\t* net.imglib2.roi.util.SamplingIterableInterval\u003cnet.imglib2.type.numeric.integer.UnsignedByteType\u003e\r\nOutput Type: \r\n\t\t* org.scijava.common3.Any\r\n\r\nSee debugging output for full failure report.\r\n\tat org.scijava.ops.engine.impl.DefaultOpEnvironment.findOp(DefaultOpEnvironment.java:367)\r\n\tat org.scijava.ops.engine.impl.DefaultOpEnvironment.op(DefaultOpEnvironment.java:215)\r\n\tat org.scijava.ops.api.OpBuilder.matchFunctionHelper(OpBuilder.java:15392)\r\n\tat org.scijava.ops.api.OpBuilder.matchFunction(OpBuilder.java:15233)\r\n\tat org.scijava.ops.api.OpBuilder$Arity1_IV_OU.function(OpBuilder.java:945)\r\n\tat org.scijava.ops.api.OpBuilder$Arity1_IV_OU.apply(OpBuilder.java:982)\r\n\tat java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)\r\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:580)\r\norg.scijava.ops.engine.DependencyMatchingException: org.scijava.ops.engine.DependencyMatchingException: Error matching dependencies for request:\r\n\r\nName: \"stats.mean\", Types: java.util.function.Function\u003cnet.imglib2.roi.util.SamplingIterableInterval\u003cnet.imglib2.type.numeric.integer.UnsignedByteType\u003e, org.scijava.common3.Any\u003e\r\nInput Types: \r\n\t\t* net.imglib2.roi.util.SamplingIterableInterval\u003cnet.imglib2.type.numeric.integer.UnsignedByteType\u003e\r\nOutput Type: \r\n\t\t* org.scijava.common3.Any\r\n\r\nSee debugging output for full failure report.\r\n\r\n\tat org.python.core.Py.JavaError(Py.java:547)\r\n\tat org.python.core.Py.JavaError(Py.java:538)\r\n\tat org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:192)\r\n\tat org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:208)\r\n\tat org.python.core.PyObject.__call__(PyObject.java:461)\r\n\tat org.python.core.PyObject.__call__(PyObject.java:465)\r\n\tat org.python.core.PyMethod.__call__(PyMethod.java:126)\r\n\tat org.python.pycode._pyx22.f$0(/home/edward/Documents/workspaces/ops/examples/bugs/bug_ops_stats_mean.py:16)\r\n\tat org.python.pycode._pyx22.call_function(/home/edward/Documents/workspaces/ops/examples/bugs/bug_ops_stats_mean.py)\r\n\tat org.python.core.PyTableCode.call(PyTableCode.java:173)\r\n\tat org.python.core.PyCode.call(PyCode.java:18)\r\n\tat org.python.core.Py.runCode(Py.java:1687)\r\n\tat org.python.core.__builtin__.eval(__builtin__.java:497)\r\n\tat org.python.core.__builtin__.eval(__builtin__.java:501)\r\n\tat org.python.util.PythonInterpreter.eval(PythonInterpreter.java:255)\r\n\tat org.python.jsr223.PyScriptEngine.eval(PyScriptEngine.java:57)\r\n\tat org.python.jsr223.PyScriptEngine.eval(PyScriptEngine.java:31)\r\n\tat java.scripting/javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:262)\r\n\tat org.scijava.script.ScriptModule.run(ScriptModule.java:173)\r\n\tat org.scijava.module.ModuleRunner.run(ModuleRunner.java:165)\r\n\tat org.scijava.module.ModuleRunner.call(ModuleRunner.java:125)\r\n\tat org.scijava.module.ModuleRunner.call(ModuleRunner.java:64)\r\n\tat org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:247)\r\n\tat java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)\r\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)\r\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)\r\n\tat java.base/java.lang.Thread.run(Thread.java:1583)\r\nCaused by: org.scijava.ops.engine.DependencyMatchingException: Error matching dependencies for request:\r\n\r\nName: \"stats.mean\", Types: java.util.function.Function\u003cnet.imglib2.roi.util.SamplingIterableInterval\u003cnet.imglib2.type.numeric.integer.UnsignedByteType\u003e, org.scijava.common3.Any\u003e\r\nInput Types: \r\n\t\t* net.imglib2.roi.util.SamplingIterableInterval\u003cnet.imglib2.type.numeric.integer.UnsignedByteType\u003e\r\nOutput Type: \r\n\t\t* org.scijava.common3.Any\r\n\r\nSee debugging output for full failure report.\r\n\tat org.scijava.ops.engine.impl.DefaultOpEnvironment.findOp(DefaultOpEnvironment.java:367)\r\n\tat org.scijava.ops.engine.impl.DefaultOpEnvironment.op(DefaultOpEnvironment.java:215)\r\n\tat org.scijava.ops.api.OpBuilder.matchFunctionHelper(OpBuilder.java:15392)\r\n\tat org.scijava.ops.api.OpBuilder.matchFunction(OpBuilder.java:15233)\r\n\tat org.scijava.ops.api.OpBuilder$Arity1_IV_OU.function(OpBuilder.java:945)\r\n\tat org.scijava.ops.api.OpBuilder$Arity1_IV_OU.apply(OpBuilder.java:982)\r\n\tat java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)\r\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:580)\r\n\tat org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:190)\r\n\t... 24 more\r\n```\r\n\r\nUsing ImageJ-Ops stats.mean works just fine.","author":{"url":"https://github.com/elevans","@type":"Person","name":"elevans"},"datePublished":"2024-08-22T16:54:05.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/270/scijava/issues/270"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:d8aff09c-94a2-da86-f75a-88786e40ce18
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9300:A39F5:213500D:2D22FC1:696ACB2D
html-safe-nonce45d06d670990d49a382bb2f601d71085ba4ce4eba72a0262049de5ac47efbaf9
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MzAwOkEzOUY1OjIxMzUwMEQ6MkQyMkZDMTo2OTZBQ0IyRCIsInZpc2l0b3JfaWQiOiI1MTkxNzYxNzMwNTA4MzQ0MTA5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac7931b8c508eb48bbcf4d77d201aa95896f4a5cbc80769d95b58b67fe056f22da
hovercard-subject-tagissue:2481297899
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/270/issue_layout
twitter:imagehttps://opengraph.githubassets.com/3fb66480bd6947a76b9d66b726d2c10845cba5bbbba5d8c6b18ed632f0c9aef0/scijava/scijava/issues/270
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/3fb66480bd6947a76b9d66b726d2c10845cba5bbbba5d8c6b18ed632f0c9aef0/scijava/scijava/issues/270
og:image:altWith SciJava ops in Fiji (via a Jython script) I am unable to use the stats.mean Op on a sample created from an ImgLabeling. Here's small example that replicates this behavior (use with the Blobs e...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameelevans
hostnamegithub.com
expected-hostnamegithub.com
Nonec785f4ce187e9e7331257791b36ddee01625bb8e292a9b4fe2c16d4c006abf5d
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
releasec718a376fcf780eb22089171adb84a543f660bf7
ui-targetcanary-1
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/scijava/scijava/issues/270#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fscijava%2Fscijava%2Fissues%2F270
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%2F270
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/270
Reloadhttps://github.com/scijava/scijava/issues/270
Reloadhttps://github.com/scijava/scijava/issues/270
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/270
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/270
New issuehttps://github.com/login?return_to=https://github.com/scijava/scijava/issues/270
Can't uses stats.mean with a SamplingIterableIntervalhttps://github.com/scijava/scijava/issues/270#top
https://github.com/elevans
https://github.com/elevans
elevanshttps://github.com/elevans
on Aug 22, 2024https://github.com/scijava/scijava/issues/270#issue-2481297899
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.