drawing a Line (ROI) from/to negative values

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

drawing a Line (ROI) from/to negative values

Johannes Hermen
Hi

In our case we need to draw a Line Roi that lies outside the image. For
example we want to draw the line from pixels -200,-200 to -400,-400.
This does not work; the line is allways painted only to zero or to the
maxvalue of each axis.

The problem seams to be the following code in the

        protected void grow(int xend, int yend)

Method of the Line class:

------------------------------------------------------------------------
if (xend<0) xend=0; if (yend<0) yend=0;
if (xend>xMax) xend=xMax; if (yend>yMax) yend=yMax;
------------------------------------------------------------------------

Is there any reason for this implementation?

Thanks for your answers
 
        Johannes Hermen


-----------------------------------------------------------------
ImageJ User and Developer Conference
Please visit: http://imagejconf.tudor.lu
-----------------------------------------------------------------
Johannes Hermen  -  Ingenieur de Recherche
[hidden email]
-----------------------------------------------------------------
CRP Henri Tudor  http://www.santec.tudor.lu
29, Avenue John F. Kennedy
L-1855 Luxembourg
-----------------------------------------------------------------
Reply | Threaded
Open this post in threaded view
|

Re: drawing a Line (ROI) from/to negative values

Gabriel Landini
On Monday 06 March 2006 09:21, Johannes Hermen wrote:
> In our case we need to draw a Line Roi that lies outside the image. For
> example we want to draw the line from pixels -200,-200 to -400,-400.
> This does not work; the line is allways painted only to zero or to the
> maxvalue of each axis.

Where is the result of the line being drawn going to be held?
The drawing must be to some pixel with a memory location.
This is like writing on a piece of paper that does not exist... :-)
Am I missing something?

Can you create an image and choose the coordinate origin different that the
top right corner (the ability to do this has been added recently to IJ).

I hope it helps.
Cheers

Gabriel
Reply | Threaded
Open this post in threaded view
|

Re: drawing a Line (ROI) from/to negative values

Roger Phillips
Gabriel,
Which version has this? and how do you access it?
Thanks,
Roger

Quoting Gabriel Landini <[hidden email]>:

> Can you create an image and choose the coordinate origin different
> that the
> top right corner (the ability to do this has been added recently to
> IJ).
>
> I hope it helps.
> Cheers
>
> Gabriel
>
Reply | Threaded
Open this post in threaded view
|

Re: drawing a Line (ROI) from/to negative values

Gabriel Landini
On Monday 06 March 2006 10:35, Roger Phillips wrote:
> Gabriel,
> Which version has this? and how do you access it?

v1.35p, 31 January 2006
 Added the "Origin" field to Image>Properties for setting the origin of the
coordinate system used by Measure, Analyze Particles and the ROI Manager.
Cheers

Gabriel
Reply | Threaded
Open this post in threaded view
|

Re: drawing a Line (ROI) from/to negative values

Andrew Phillips-2
In reply to this post by Johannes Hermen
I am trying to save files in a ".pgm" file format (required by another
program).  While ImageJ can read these files, I have not been able to
find a way to save them in this format.  As far as I can see, the "pgm"
format is very similar to the "RAW" format, with the difference being
the inclusion of an ASCII header.  Is there a way that I can insert this
header using a macro, or alternatively, is there a "pgm" writer plugin -
(I have only been able to find a reader).

Thanks,

Andy Phillips