Login  Register

return value

Posted by m000an ZH on Mar 03, 2009; 4:45pm
URL: http://imagej.273.s1.nabble.com/Can-t-load-images-from-remote-directory-tp3693495p3693499.html

Hi, just a very easy question.
I return a value x with myread.
how can I use this value in an other method to use it in "run"?
Thanks for your help
Milan




public int myread (String string) throws Exception {

StringTokenizer st = new StringTokenizer (string, "\t");

int count = st.countTokens ();

int xyz[];


int x;

count = (count> 3) ? 3 : count;

for (int l = 0; l < count; l++) {

String token = st.nextToken ().trim ();

xyz [l] = (new Integer (token)).intValue ();

x = xyz [0];

}

return x;

}

public void run (ImageProcessor ip) {
int i = myread ();

tab = col.getNeighborhoodSphere (i, 2, 3, rad, rad, rad);
}
_________________________________________________________________
Découvrez toutes les possibilités de communication avec vos proches
http://download.live.com