GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — DynamicCommand does not fully work with primitive parameter types · Issue #429 · scijava/scijava-common

DynamicCommand does not fully work with primitive parameter types #429

New issue
Copy link
New issue
Copy link
Open
Open
DynamicCommand does not fully work with primitive parameter types#429
Copy link
Labels
bug
Milestone
unscheduled

Description

@ctrueden
ctrueden
opened on Dec 4, 2021
Issue body actions

@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.class, menuPath = ScijavaBdvDefaults.RootMenu+"BDV>BDV - Screenshot",
        description = "Creates a screenshot of the current BDV view. The sampling can be chosen to upscale or downscale" +
                " the image compared to the current view. A single RGB image resulting from the projection" +
                " of all sources is displayed. Raw image data can also be exported as multi-channel grayscale.")
public class ScreenShotMakerCommand extends DynamicCommand implements BdvPlaygroundActionCommand, Initializable
{

    @Parameter
    public BdvHandle bdvh;

    @Parameter(label="Target Sampling [UNIT]")
    public Double targetSamplingInXY = 1D;

    @Parameter(label="Show Raw Data")
    public boolean showRawData = false;

    private String pixelUnit = "Pixels";

    @Override
    public void run() {
        ScreenShotMaker screenShotMaker = new ScreenShotMaker( bdvh );
        screenShotMaker.setPhysicalPixelSpacingInXY( targetSamplingInXY, pixelUnit );
        screenShotMaker.getRgbScreenShot().show();
        if( showRawData ) screenShotMaker.getRawScreenShot().show();
    }

Activity

  1. ctrueden
    added this to the unscheduled milestone on Dec 4, 2021
  2. ctrueden
    added
    bug
    on Dec 4, 2021
  3. imagesc-bot commented on Dec 4, 2021

    @imagesc-bot
    imagesc-bot
    on Dec 4, 2021
    More actions

    This issue has been mentioned on Image.sc Forum. There might be relevant details there:

    https://forum.image.sc/t/change-scijava-parameter-label-at-runtime/60574/6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      • unscheduledNo due date

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.