Title: DynamicCommand does not fully work with primitive parameter types · Issue #429 · scijava/scijava-common · GitHub
Open Graph Title: DynamicCommand does not fully work with primitive parameter types · Issue #429 · scijava/scijava-common
X Title: DynamicCommand does not fully work with primitive parameter types · Issue #429 · scijava/scijava-common
Description: @tischi wrote: I had to change the type of the field from double to Double, otherwise the getInfo().getMutableInput(...) was not working for me. I put here the full code for future reference: @Plugin(type = BdvPlaygroundActionCommand.cla...
Open Graph Description: @tischi wrote: I had to change the type of the field from double to Double, otherwise the getInfo().getMutableInput(...) was not working for me. I put here the full code for future reference: @Plug...
X Description: @tischi wrote: I had to change the type of the field from double to Double, otherwise the getInfo().getMutableInput(...) was not working for me. I put here the full code for future reference: @Plug...
Opengraph URL: https://github.com/scijava/scijava-common/issues/429
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"DynamicCommand does not fully work with primitive parameter types","articleBody":"@tischi [wrote](https://forum.image.sc/t/change-scijava-parameter-label-at-runtime/60574/5):\r\n\u003cblockquote\u003e\r\n\r\nI had to change the type of the field from `double` to `Double`, otherwise the `getInfo().getMutableInput(...)` was not working for me.\r\n\r\nI put here the full code for future reference:\r\n```java\r\n@Plugin(type = BdvPlaygroundActionCommand.class, menuPath = ScijavaBdvDefaults.RootMenu+\"BDV\u003eBDV - Screenshot\",\r\n description = \"Creates a screenshot of the current BDV view. The sampling can be chosen to upscale or downscale\" +\r\n \" the image compared to the current view. A single RGB image resulting from the projection\" +\r\n \" of all sources is displayed. Raw image data can also be exported as multi-channel grayscale.\")\r\npublic class ScreenShotMakerCommand extends DynamicCommand implements BdvPlaygroundActionCommand, Initializable\r\n{\r\n\r\n @Parameter\r\n public BdvHandle bdvh;\r\n\r\n @Parameter(label=\"Target Sampling [UNIT]\")\r\n public Double targetSamplingInXY = 1D;\r\n\r\n @Parameter(label=\"Show Raw Data\")\r\n public boolean showRawData = false;\r\n\r\n private String pixelUnit = \"Pixels\";\r\n\r\n @Override\r\n public void run() {\r\n ScreenShotMaker screenShotMaker = new ScreenShotMaker( bdvh );\r\n screenShotMaker.setPhysicalPixelSpacingInXY( targetSamplingInXY, pixelUnit );\r\n screenShotMaker.getRgbScreenShot().show();\r\n if( showRawData ) screenShotMaker.getRawScreenShot().show();\r\n }\r\n```\r\n\r\n\u003c/blockquote\u003e","author":{"url":"https://github.com/ctrueden","@type":"Person","name":"ctrueden"},"datePublished":"2021-12-04T18:05:18.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/429/scijava-common/issues/429"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b28847af-2cff-3ad7-ca0e-9b55bf600d16 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E044:3E22DA:2518A28:32B56A3:696AC753 |
| html-safe-nonce | a7de7d40f3d1c949836e706df7e5d2de5a1ca8d50dbae0a68cab9fb0a01f5b32 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMDQ0OjNFMjJEQToyNTE4QTI4OjMyQjU2QTM6Njk2QUM3NTMiLCJ2aXNpdG9yX2lkIjoiMzA2MDAzMjcwMTE1NDkwMzg5MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9db4bf87062147676ce4119662502614be1b658ce832dd7740f897af42f7d32c |
| hovercard-subject-tag | issue:1071263534 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/scijava/scijava-common/429/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4d7ebde62310f4e94ece53ebd055e950ea839e106f588c3f5b8e32101af8c596/scijava/scijava-common/issues/429 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4d7ebde62310f4e94ece53ebd055e950ea839e106f588c3f5b8e32101af8c596/scijava/scijava-common/issues/429 |
| og:image:alt | @tischi wrote: I had to change the type of the field from double to Double, otherwise the getInfo().getMutableInput(...) was not working for me. I put here the full code for future reference: @Plug... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ctrueden |
| hostname | github.com |
| expected-hostname | github.com |
| None | 986b6a1d774985095564e64d6963d11f094da3d0e2bfda2ab1a27d63662eb033 |
| turbo-cache-control | no-preview |
| go-import | github.com/scijava/scijava-common git https://github.com/scijava/scijava-common.git |
| octolytics-dimension-user_id | 1262770 |
| octolytics-dimension-user_login | scijava |
| octolytics-dimension-repository_id | 3594497 |
| octolytics-dimension-repository_nwo | scijava/scijava-common |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3594497 |
| octolytics-dimension-repository_network_root_nwo | scijava/scijava-common |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 89ad2112b9c4e11df6a0c13c8c1f8eedd36b0977 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width