imagej / ImageJ

Public domain software for processing and analyzing scientific images
http://imagej.org
Other
513 stars 218 forks source link

ImageProcessor: getColumn() & putColumn() for float[] arguments missing? #154

Closed imagingbook closed 2 years ago

imagingbook commented 2 years ago

IJ 1.53p: Class ImageProcessor defines getRow() and putRow() methods for both int[] and float[] arguments. Is there any reason why getColumn() and putColumn() are available for int[] only?

rasband commented 2 years ago

The ImageJ 1.53r4 daily build adds getColumn() and putColumn() methods to the ImageProcessor class that accept float[] arguments.

rasband commented 1 year ago

On Sep 14, 2022, at 8:14 AM, Herbie @.***> wrote:

Dear experts!

-- Case A -- When running

run( "Straighten...", "title=rslt line="+val );

the "Line Width"-window will show value "val" which appears being strange, because actually only the selection line width is changed, not the line width for drawing.

I am not able to reproduce this problem. The value shown in the "Line Width” window (opened by double clicking on the line tool icon) does not change when I run this macro:

val = 25; run( "Straighten...", "title=rslt line="+val );

I would not expect it to change since it is the default line selection width, not the width of the current line selection.

I'm not able to reset the line width indicated in the "Line Width"-window, neither by

Roi.setStrokeWidth( 0 ); nor by

setLineWidth( 0 );

Use

run("Line Width...", "line=0”);

to reset the default line selection width (shown in the "Line Width” window). The Edit>Options>Line Width dialog in the ImageJ 1.53u13 daily build adds this comment to make it clearer what the command does:

Sets the default line selection width. Press 'y' (Edit>Selection>Properties) to change the width of the current line selection.”);

The Edit>Selection>Properties command is updated in the daily build to record commands like Roi.setStrokeWidth() and Roi.setStrokeColor().

The Roi.setStrokeWidth() macro function changes the width of the current line selection and setLineWidth() specifies the line width used by the drawLine(), lineTo(), drawRect() and drawOval() macro functions.

-wayne

-- Case B -- When running

Roi.setStrokeWidth( val ); run( "Straighten..." ); rename( "rslt" );

the "Line Width"-window will not reflect value "val" which I judge being correct.

Any deeper insights are highly appreciated

Herbie :::::::::::::::::::::::::::::

rasband commented 1 year ago

On Apr 1, 2022, at 10:14 AM, Wilhelm Burger @.***> wrote:

IJ 1.53p: Class ImageProcessor defines getRow() and putRow() methods for both int[] and float[] arguments. Is there any reason why getColumn() and putColumn() are available for int[] only?

The ImageJ 1.53r4 daily build adds getColumn() and putColumn() methods to the ImageProcessor class that accept float[] arguments.

-wayne