disable magnifying

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

disable magnifying

Michael Strupp
Hello ImageJ Community

I want to disable imagej from magnifying images.
I wrote a viewer, which has a fixed GUI size to display imageparts of big images. The viewer takes care the size of the
imageparts fit to the GUI size.
Often the imagepart does not get shown at 100%, although there is enough space to do that.
I tried to change this by using the setMagnification() function from ImageCanvas, but it doesnt help.
Because the functionality of this viewer and the magnifying functionality of imagej doesn't match to each other, I want to disable imagej from magnifying.
Is there a way to do this?

Kind regards,
Michael

 
--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
Reply | Threaded
Open this post in threaded view
|

Re: disable magnifying

Michael Strupp
Hello ImageJ Community, hello Wayne

Thanks a lot for your help Wayne.
When i call getSrcRect() on the Canvas object of my ImageWindow class, i get the size of the imagepart, but thats not the size of the image when it's not shown in 100% at the screen.

Here is an example:
In most cases the window size is set to width: 620, height: 645
The imageparts i want display in this window have a size of width: <=600, height: <= 600
Either width is set to max = 600 or height is set to max 600.

In many cases the image looks like in case1.jpeg in the attachment. When i press the '+'-Button of the keyboard, the image looks like in case2.jpeg and thats the way it should looks like.

The rectangle i get, when i call getSrcRect() in case1 has a width of 600, but i think that is not the real height. I think it's smaller just 75% of 600.

So how can i do it, that the imageparts always look like in case 2?
 
Kind regards,
Michael

On Aug 4, 2009, at 5:21 PM, Michael Strupp wrote:

> Hello ImageJ Community
>
> I want to disable imagej from magnifying images.
> I wrote a viewer, which has a fixed GUI size to display imageparts of
> big images. The viewer takes care the size of the
> imageparts fit to the GUI size.
> Often the imagepart does not get shown at 100%, although there is
> enough space to do that.
> I tried to change this by using the setMagnification() function from
> ImageCanvas, but it doesnt help.
> Because the functionality of this viewer and the magnifying
> functionality of imagej doesn't match to each other, I want to disable
> imagej from magnifying.
> Is there a way to do this?
Michael,

The ImageCanvas class will not magnify the image if you set srcRect to
the entire image using setSourceRect() and the set magnification to 1.0
using setMagnification().

Best regards,

-wayne



--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01

case1.JPG (69K) Download Attachment
case2.JPG (100K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: disable magnifying

Michael Strupp
In reply to this post by Michael Strupp
Hello ImageJ Community, hello Wayne

Thanks a lot for your help Wayne.
When i call getSrcRect() on the Canvas object of my ImageWindow class, i get the size of the imagepart, but thats not the size of the image when it's not shown in 100% at the screen.

Here is an example:
In most cases the window size is set to width: 620, height: 645
The imageparts i want display in this window have a size of width: <=600, height: <= 600
Either width is set to max = 600 or height is set to max 600.

In many cases the image looks like in case1.jpeg in the attachment. When i press the '+'-Button of the keyboard, the image looks like in case2.jpeg and thats the way it should looks like.

The rectangle i get, when i call getSrcRect() in case1 has a width of 600, but i think that is not the real height. I think it's smaller just 75% of 600.

So how can i do it, that the imageparts always look like in case 2?
 
Kind regards,
Michael

On Aug 4, 2009, at 5:21 PM, Michael Strupp wrote:

> Hello ImageJ Community
>
> I want to disable imagej from magnifying images.
> I wrote a viewer, which has a fixed GUI size to display imageparts of
> big images. The viewer takes care the size of the
> imageparts fit to the GUI size.
> Often the imagepart does not get shown at 100%, although there is
> enough space to do that.
> I tried to change this by using the setMagnification() function from
> ImageCanvas, but it doesnt help.
> Because the functionality of this viewer and the magnifying
> functionality of imagej doesn't match to each other, I want to disable
> imagej from magnifying.
> Is there a way to do this?
Michael,

The ImageCanvas class will not magnify the image if you set srcRect to
the entire image using setSourceRect() and the set magnification to 1.0
using setMagnification().

Best regards,

-wayne



--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01

--
Neu: GMX Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
für nur 19,99 Euro/mtl.!* http://portal.gmx.net/de/go/dsl02

case1.JPG (69K) Download Attachment
case2.JPG (100K) Download Attachment