Dear Image J community.
It's a cold afternoon here in the UK and Im struggling with the program.. Can u help? The question is.......Can imageJ perform an 'overlay' function? "What is overlay ?" I hear you ask. Other software performs overlay by mixing pixels i.e pixel 1 from col 1, row1 belongs to ct image. Then pixel 2 from col 2, row 1 belongs to nuc med image. Then pixel 3 from col 3, row1 belongs to ct image. And so on. I want to overaly a nucmed functional image over a CT structural image. Can it be done? Kind regards in advance Yours shiveringly Joe O'Brien Clinical Scientist (Nuclear Medicine) Department of Physics and Nuclear Medicine City Hospital Dudley Road Birmingham UK -----Original Message----- From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Michael Weber Sent: 02 November 2006 13.10 To: [hidden email] Subject: Re: AW: Out of available memory? Help! Hi, it usually works for us if we: - define the amount of RAM in the config (~75% of system memory) - have this amount of RAM free (double check with the task manager, if you're a Windows user) - use the newest Java version - run only one instance of ImageJ Maybe this helps. cheers, Michael Lucas, Falk /BDF HAM schrieb: > Hi, > > we have encountered this issue too and found an solution, but only for > some of our machines... > > We had an early version (1.31) on hte machines and I set up an script > for just overwriting hte old version with a new one, which results in the same error message you get. > Solution: Delete the ImagJ Folder completly and install/copy the current version again. > However, if your account (on a PC) is just associated with the user group (minimum rights), this message can still be there. We never encountered the message if the user is in the main user or admin group. > > Falk > > -----Ursprüngliche Nachricht----- > Von: ImageJ Interest Group [mailto:[hidden email]] Im Auftrag von > Jonathan Thomas > Gesendet: Mittwoch, 1. November 2006 23:23 > An: [hidden email] > Betreff: Out of available memory? Help! > > (cliffs at bottom) > > I am currently trying to use ImageJ to do image segmentation on some > ~11MB RGB images. The images load fine into ImageJ, but if I attempt > to do any filtering on them ImageJ throws this error: > > <Out of memory> > <All available memory (63MB) has been> > <used. Instructions for making more> > <available can be found in the "Memory" > <sections of the > installation notes at> <http://rsb.info.nih.gov/ij/docs/install/> > > I then poked through the options and raised the memory alotted to > 500MB, closed ImageJ and reopened it attempted the same operation and > got an identical error. Even mentioning 63MB. Note that the default > was not 63 MB nor was the max memory set anywhere near 63MB after I > changed it. > > > So I came here, and I see people recommending changing the command > given to the executable, so I checked my ImageJ.cfg and it reads: > > . > C:\Program Files\Java\j2re1.4.2_03\bin\javaw.exe > -Xmx500m -cp ij.jar ij.ImageJ > > In a previous thread someone mentioned a similar problem and modifying > this line fixed the problem but I believe that java should have plenty > of memory the way I have it configured. > > So that's my problem, I'd appreciate any help you guys can give me. > > If you have read this far here is some more information that may be > helpful: > > 2.99Ghz Pentium D > 2GB Ram > > ImageJ 1.36b > Java 1.5.0_06 > About ImageJ displays 55MB of 500MB (11%) while the error message is > still in the log. > > The java is on this machine, while the ImageJ is being run from a > network drive. The same error arrizes when I run ImageJ as an applet > from the NIH page. > > I have contacted the sys admin and he assures me that there is no > constraint put on memory used by a user, with the exception of the > physical memory on the machine and what is being used by other > software. > > Software running in the background or not has no effect on the error > message. > > I have replicated this error on 2 machines, each using their own local > java but the same ImageJ off the same network drive. I have also > replicated it running ImageJ as an applet on both machines. > > Curiously when I look at the size of the image in windows it is listed > as 11MB, but ImageJ claims it's 27MB. (perhaps this is extra space for a > buffer?) One image is 2915x2456 pixel tiff. The others are similar. All tiffs, all RGB, all produce the same error. > > If you have made it this far I truly commend you. Thank you for the > attention and here's a quote for your efforts. > > "'That is indisputable,' was the answer, 'but in this country it is a > good thing to kill an admiral from time to time to encourage the > others.'" -Voltaire (François-Marie Arouet), Candide > > Thank you for any help you can give me. > -Stumped in StonyBrook > > > > > > finally cliffnotes: > 1. ImageJ throws an out of memory error when I try to analyze some > large tiff images 2. The machine has plenty of memory and so does > java. 3. Solutions to similar problems from this listserv do not help. > 4. Recent software, reproducible. 5. HELP! 6. quote for your efforts, > thanks! > > _____________________ Confidentiality _____________________ > > This electronic transmission is strictly confidential and intended > solely for the addressee. It may contain information which is covered > by legal, professional or other privilege. If you are not the intended > addressee, you must not disclose, copy or take any action in reliance > of this transmission. If you have received this transmission in error, > please notify us and delete the received data as soon as possible. > > This footnote also confirms that this email message has been swept > for the presence of computer viruses. > _______________________________________________________ |
Hi,
On Thu, 2 Nov 2006, O'Brien.Joseph wrote: > It's a cold afternoon here in the UK [...] Funny, I was in Scotland until Tuesday, and it was warmer than here in Germany! > The question is.......Can imageJ perform an 'overlay' function? You might want to copy the image to be overlayed, and play with "Edit/Paste Control..." I got what I wanted with "Max". Hth, Dscho |
In reply to this post by O'Brien.Joseph
You could use a "CustomCanvas" and override the "public void
paint(Graphics g)" to fill in your overlay. This would allow you to non-destructively layer one set of data on top of another. e.g.: <code> //a custom canvas to apply a non-destructive graphic overlay to image display CustomCanvas(ImagePlus imp) { super(imp); }//~ctor public void paint(Graphics g) { super.paint(g); drawOverlay(g); }//~cc paint void drawOverlay(Graphics g) { //draw the graphic overlay (non-destructively) showing user's selected points. g.setColor(Color.blue); if(pending) {//draw crosshair for current location g.drawLine(screenX((int)cl_x-2), screenY((int)cl_y), screenX((int)cl_x+2), screenY((int)cl_y)); g.drawLine(screenX((int)cl_x), screenY((int)cl_y-2), screenX((int)cl_x), screenY((int)cl_y+2)); } if(n_pts>0) {//draw crosshair cursors over previously selected locations int i,lx,ly; for(i=0;i<n_pts;i++) { if(i<3) g.setColor(Color.green);//our transform defining points else g.setColor(Color.yellow);//the rest of them lx=(int)((mPointDouble)mPoints.elementAt(i)).getX(); ly=(int)((mPointDouble)mPoints.elementAt(i)).getY(); g.drawLine(screenX(lx-2), screenY(ly), screenX(lx+2), screenY(ly)); g.drawLine(screenX(lx), screenY(ly-2), screenX(lx), screenY(ly+2)); } } }//~cc drawOverlay }//~ custom canvas class </code> Another option would be to just create a new image, as a composite of your data sets. -Gabriel -----Original Message----- From: ImageJ Interest Group [mailto:[hidden email]]On Behalf Of Johannes Schindelin Sent: Thursday, November 02, 2006 10:40 AM To: [hidden email] Subject: Re: Image J - overlay Hi, On Thu, 2 Nov 2006, O'Brien.Joseph wrote: > It's a cold afternoon here in the UK [...] Funny, I was in Scotland until Tuesday, and it was warmer than here in Germany! > The question is.......Can imageJ perform an 'overlay' function? You might want to copy the image to be overlayed, and play with "Edit/Paste Control..." I got what I wanted with "Max". Hth, Dscho **************************************************************************************** Note: If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you. **************************************************************************************** |
In reply to this post by O'Brien.Joseph
You could use a "CustomCanvas" and override the "public void
paint(Graphics g)" to fill in your overlay. This would allow you to non-destructively layer one set of data on top of another. e.g.: <code> //a custom canvas to apply a non-destructive graphic overlay to image display CustomCanvas(ImagePlus imp) { super(imp); }//~ctor public void paint(Graphics g) { super.paint(g); drawOverlay(g); }//~cc paint void drawOverlay(Graphics g) { //draw the graphic overlay (non-destructively) showing user's selected points. g.setColor(Color.blue); if(pending) {//draw crosshair for current location g.drawLine(screenX((int)cl_x-2), screenY((int)cl_y), screenX((int)cl_x+2), screenY((int)cl_y)); g.drawLine(screenX((int)cl_x), screenY((int)cl_y-2), screenX((int)cl_x), screenY((int)cl_y+2)); } if(n_pts>0) {//draw crosshair cursors over previously selected locations int i,lx,ly; for(i=0;i<n_pts;i++) { if(i<3) g.setColor(Color.green);//our transform defining points else g.setColor(Color.yellow);//the rest of them lx=(int)((mPointDouble)mPoints.elementAt(i)).getX(); ly=(int)((mPointDouble)mPoints.elementAt(i)).getY(); g.drawLine(screenX(lx-2), screenY(ly), screenX(lx+2), screenY(ly)); g.drawLine(screenX(lx), screenY(ly-2), screenX(lx), screenY(ly+2)); } } }//~cc drawOverlay }//~ custom canvas class </code> Another option would be to just create a new image, as a composite of your data sets. -Gabriel -----Original Message----- From: ImageJ Interest Group [mailto:[hidden email]]On Behalf Of Johannes Schindelin Sent: Thursday, November 02, 2006 10:40 AM To: [hidden email] Subject: Re: Image J - overlay Hi, On Thu, 2 Nov 2006, O'Brien.Joseph wrote: > It's a cold afternoon here in the UK [...] Funny, I was in Scotland until Tuesday, and it was warmer than here in Germany! > The question is.......Can imageJ perform an 'overlay' function? You might want to copy the image to be overlayed, and play with "Edit/Paste Control..." I got what I wanted with "Max". Hth, Dscho **************************************************************************************** Note: If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you. **************************************************************************************** |
I create overlays by adding the values of the pixels together with
image calculator. i.e. imageCalculator("Add create", "Red","Result of Masked"); I mulitpy the overlay by a fraction so it looks transparent and reduces the chance of values over 255. Justin On 11/2/06, DeBarr, Gabriel <[hidden email]> wrote: > You could use a "CustomCanvas" and override the "public void > paint(Graphics g)" to fill in your overlay. This would allow you to > non-destructively layer one set of data on top of another. e.g.: > <code> > //a custom canvas to apply a non-destructive graphic overlay to image > display > CustomCanvas(ImagePlus imp) { > super(imp); > }//~ctor > > public void paint(Graphics g) { > super.paint(g); > drawOverlay(g); > }//~cc paint > > void drawOverlay(Graphics g) { > //draw the graphic overlay (non-destructively) showing user's selected > points. > g.setColor(Color.blue); > if(pending) {//draw crosshair for current > location > g.drawLine(screenX((int)cl_x-2), > screenY((int)cl_y), screenX((int)cl_x+2), screenY((int)cl_y)); > g.drawLine(screenX((int)cl_x), > screenY((int)cl_y-2), screenX((int)cl_x), screenY((int)cl_y+2)); > } > if(n_pts>0) {//draw crosshair cursors over > previously selected locations > int i,lx,ly; > for(i=0;i<n_pts;i++) { > if(i<3) > > g.setColor(Color.green);//our transform defining points > else > > g.setColor(Color.yellow);//the rest of them > > lx=(int)((mPointDouble)mPoints.elementAt(i)).getX(); > > ly=(int)((mPointDouble)mPoints.elementAt(i)).getY(); > g.drawLine(screenX(lx-2), > screenY(ly), screenX(lx+2), screenY(ly)); > g.drawLine(screenX(lx), > screenY(ly-2), screenX(lx), screenY(ly+2)); > } > } > }//~cc drawOverlay > > }//~ custom canvas class > </code> > > Another option would be to just create a new image, as a composite of > your data sets. > > -Gabriel > > -----Original Message----- > From: ImageJ Interest Group [mailto:[hidden email]]On Behalf Of > Johannes Schindelin > Sent: Thursday, November 02, 2006 10:40 AM > To: [hidden email] > Subject: Re: Image J - overlay > > > Hi, > > On Thu, 2 Nov 2006, O'Brien.Joseph wrote: > > > It's a cold afternoon here in the UK [...] > > Funny, I was in Scotland until Tuesday, and it was warmer than here in > Germany! > > > The question is.......Can imageJ perform an 'overlay' function? > > You might want to copy the image to be overlayed, and play with > "Edit/Paste Control..." I got what I wanted with "Max". > > Hth, > Dscho > > **************************************************************************************** > > Note: If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you. > > **************************************************************************************** > |
Free forum by Nabble | Edit this page |