MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Problems combining new v7.0 Image command with other graphics

  • To: mathgroup at
  • Subject: [mg95176] Re: Problems combining new v7.0 Image command with other graphics
  • From: Jens-Peer Kuska <kuska at>
  • Date: Fri, 9 Jan 2009 06:21:41 -0500 (EST)
  • Organization: Uni Leipzig
  • References: <gjv732$ov0$> <gk1rj5$oq5$> <gk3fda$dv5$>
  • Reply-to: kuska at


you have not understood the problem. Your example does just this what 
the OP wishes, it draw the Locator[] over the image, and keep the
vector structure of the Locator[]. But there is no LinePane[]/ 
CirclePane[]/ PolygonPane[], to do that. And something like

raster = Image`ToGraphicsRaster[img][[1]] /.
    Raster[bm_, dim_, args___] :>
     Raster[bm, {{0, 0}, Reverse[Take[Dimensions[bm], 2]]}, args];
dim = ImageDimensions[img];
Graphics[{raster, Locator[Dynamic[p]],
   Text[Dynamic[p /. ImageScaled[a_] :> Round[a*dim]],
    Dynamic[p], {-1, -1}]}]

is not possible with LocatorPane[].

It is a principle error of the Image[], that Image[] itself
is no Graphics-object (very logic). And it would take only a little work
to display and Image[] alone as well as to allow that


work correct. The problem is, that Image[] has not the position/size 
information that Raster[] has. However a position and size information
is necessary for several image processing algorithms, like all forms of
image registration.


Sjoerd C. de Vries wrote:
> Easy:
> LocatorPane[{50, 50}, ImageCompose[Image[img], Graphics@Circle[]]
> Cheers -- Sjoerd
> On Jan 7, 2:10 pm, Jens-Peer Kuska <ku... at>
> wrote:
>>> 3. You can combine bitmapped Images with vector based Graphics using
>>> ImageCompose:
>>> ImageCompose[Image[img], Graphics@Circle[]]
>> That destroy the vector information and work with the
>> full image. Try to move a Locator[] object on the image
>> in that way, and not with
>> Graphics[{Image`ToGraphicsRaster[img][[1]],Locator[p]}]

  • Prev by Date: Re: Perchè non parli?
  • Next by Date: New kind of Weierstrass fractal scaling: Eulerian scales,MacMahon
  • Previous by thread: Re: Problems combining new v7.0 Image command with other graphics
  • Next by thread: generalization of Bernoulli numbers to Pascal types