Top Poster
#1 ramon fincken 282
#2 Site admin 3
#3 Ber|Art 2
#4 braddmark 1
#5 accentmedia 1
#6 Xarzu 1
#7 Jan 0
#8 roger beckers 0
#9 Christine 0
#10 nextstep 0

The time now is Wed Feb 22, 2012 10:46 pm
Ramonfincken.com Forum Index
View unanswered posts
[matlab][solution][java] Using double or 2d double[][] array in Java JA builder
Author ramon fincken :: Posted: Tue Feb 14, 2012 11:01 am :: Category: Lounge


If you need to have access to a double use:

for double:
Code:
double foo = ((MWNumericArray) result[0]).getDouble();


for double[][]:
Code:
MWNumericArray mytemp = ((MWNumericArray) result[1])
double[][] bar = (double[][]) mytemp.toDoubleArray();


especially the 2-dimensional double array was badly documented, so use this to your advantage.


[imagej] Commandline resize image
Author ramon fincken :: Posted: Fri Dec 02, 2011 12:59 pm :: Category: HTML and other markup&programming languages


resize an image and write the result as PNG

Code:
   /**
    * @author Ramon Fincken, http://www.ramonfincken.com/permalink/topic241.html
    * @param source
    * @param write_to_png
    * @param width_factor
    * @param height_factor
    */
   public void resize_by(String source, String write_to_png, double width_factor, double height_factor)
   {
      ImagePlus imp1 = IJ.openImage(source);
      ImageProcessor ip=imp1.getProcessor();
      
      int new_width = (int)(ip.getWidth() * width_factor); 
      int new_height = (int)(ip.getHeight() * height_factor);
      
      ip = ip.resize(new_width, new_height);
      
      imp1.setProcessor(ip);
      WindowManager.setTempCurrentImage(imp1);
      IJ.saveAs("PNG", write_to_png);         
   }


[linux] Commandline mass batch convert image types
Author ramon fincken :: Posted: Thu Dec 01, 2011 3:23 pm :: Category: HTML and other markup&programming languages


Example how to convert *.tif to *.png with same filenames

  • Install imageMagick
  • Run this command
    Code:
    mogrify -format png *.tif



[imagej][bunwarpj] Commandline call solution (closes thread)
Author ramon fincken :: Posted: Mon Nov 21, 2011 12:42 pm :: Category: HTML and other markup&programming languages


Running bUnwarpJ from command line or as s Servlet?

I experienced that every thread was auto closed.
Turns out to be that the main method
Code:
public static void main

has an explicit
Code:
System.exit(0);
..

To resolve this .. simply remove or comment out this line in source.

Like this:
Code:
       // Ramon Fincken : No need to exit when called from servlet http://www.ramonfincken.com/permalink/topic239.html
       // System.exit(0);


[matlab][Solution] Running mysql commands in Matlab on linux (Centos) 64 bit
Author ramon fincken :: Posted: Thu Nov 10, 2011 2:59 pm :: Category: Lounge


Download the source at http://www.cims.nyu.edu/~almgren/mysql/

Make sure you have these packages intalled:
mysql-devel-5.0.77-4.el5_6.6.x86_64 ( or simular )
mysqlckient14-devel-4.1.22-1.el5.centos.x86_64 ( or simular )

perhaps also this one:
mysql-connector-odbc-3.51.26r1127-1.el5.x86_64

verify that your have mysql.h and libmysqlclient.a
by checking their paths using

Code:
sudo updatedb
locate mysql.h
locate libmysqlclient.a


Now visit matlab and mex the whole lot ( you need a gcc compiler to do this ! )
Code:
mex -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient mysql.cpp


adapt your paths so in my case
Code:
mex -I/usr/include/mysql -L/usr/lib64/mysql -lmysqlclient mysql.cpp


the paths can be found using the locate command (see above)

If all goes well .. you 'll end with a new file called mysql.mexa64 and you are ready to start your mysql business!


Solution ubuntu bootloader install failed 11.04
Author ramon fincken :: Posted: Thu Oct 13, 2011 5:00 pm :: Category: Ubuntu


I was trying to install Ubuntu 11.04 and it kept failing on the last part .. the bootloader.

Installing grub from live cd did not work either..

Then I unplugged my RAID card which had a RAID 1 set up for my (fstab mount) home drives.

The installation went well afther that!

Do not forget to install dmraid to see your drives again Wink


[matlab] UIJ_AreThereWindowShowsPending - timeout waiting for window to show up. figure
Author ramon fincken :: Posted: Mon Sep 26, 2011 9:47 am :: Category: Lounge
Tagged: , , ,


Seeing this error?
Code:
UIJ_AreThereWindowShowsPending - timeout waiting for window
to show up.


even after
Code:
figure;
?

Does this not help?
http://www.mathworks.com/matlabcentral/...ead/155786

Close matlab and start matlab again. Worked for me at Centos 64bit


[centos] Missing Dependency: tcp_wrappers is needed by package 1:nfs-utils-1.0.9-54.el5.x86_64 (base)
Author ramon fincken :: Posted: Thu Sep 15, 2011 6:26 am :: Category: Lounge


CentOS 64 bit

Missing Dependency: tcp_wrappers is needed by package

It turned out that i had tcp_wrappers installed for both 32 bit as well as 64 bit.
Removing the 32 bit solved the problem.


All times are GMT
Who is Online
Who is Online Our users have posted a total of 283 articles
We have 12 registered users
The newest registered user is accentmedia
In total there is 1 user online :: 0 Registered, 0 Hidden and 1 Guest   [ Administrator ]   [ Moderator ]
Most users ever online was 40 on Tue Jan 05, 2010 11:59 pm
Registered Users: None
This data is based on users active over the past five minutes
Log in
Username:    Password:      Log me on automatically each visit    

New posts New posts    No new posts No new posts    Forum is locked Forum is locked
General forums
The world of freelance
Programming
Other projects
Poll
I love gifts

Yes goodies and presents! [2]
No but I love polls ! [0]

Related google ads
Where am I?
Hit me!