NIH LISTSERV
NIH LISTSERV
IMAGEJ archives -- July 2004 (#40)

Go to: Previous Message | Next Message
Previous in Topic | Next in Topic
Previous by Same Author | Next by Same Author
Previous Page (July 2004) | Back to Main IMAGEJ Page


Options: Reply | Post a New Message | Join or Leave IMAGEJ, or Change Options | Search
View: Chronologically | Most Recent First | Wrap Text (Proportional Font) | Don't Wrap Text (Non-proportional Font)
*

Content-Type: text/plain; charset="us-ascii"
Importance: Normal
Message-ID:  <000001c463b4$01058aa0$0400000a@SONYPC>
Date:         Tue, 6 Jul 2004 16:50:23 -0700
Reply-To:     ImageJ Interest Group <[log in to unmask]>
Sender:       ImageJ Interest Group <[log in to unmask]>
From:         Robert Dougherty <[log in to unmask]>
Subject:      Re: runs first image only
In-Reply-To:  <[log in to unmask]>

Presumably, findFaces() gets called for each image. In the fixed version, the Vector gets cleared at the start of each call. In the broken one, for the second image, "do stuff to populate the faces Vector" begins with the Vector left over from the first image. This might be a problem if the Vector contains references to the first ImageProcessor, and these references are somehow applied to the second ImageProcessor in "do stuff". Bob Robert P. Dougherty, Ph.D. President, OptiNav, Inc. Phone (425) 467-1118 Fax (425) 467-1119 www.optinav.com > // has the problem > public class FaceFinder{ > private static Vector faces = new Vector(); // vector of list of > linked lists of pixels bordering a face > > public static Vector findFaces(){ > // do stuff to populate the faces Vector > return faces; > } > } > > // fixed the problem > public class FaceFinder{ > private static Vector faces; // vector of list of linked lists of > pixels bordering a face > > public static Vector findFaces(){ > faces = new Vector(); > // do stuff to populate the faces Vector > return faces; > } > } > >




Back to: Top of message | Previous page | Main IMAGEJ page

NIH LISTSERV Home Page

CIT
Center for Information Technology
National Institutes of Health
Bethesda, Maryland 20892
301 594 6248 (v) 301 496 8294 (TDD)
Comments and Assistance
Accessibility wheelchair icon