is = fillImageSummary(img);
is = ImageMapper.buildImageSummary(img, null);
    public static void fillDatasetsTree(List datasets, List results,                                         List datasetIDs)    {        Iterator i = datasets.iterator(), k;        Map imagesMap = new HashMap();        DatasetSummaryLinked ds;        Dataset d;        Image img;        ImageSummary is;        List images;        Integer id;        while (i.hasNext()) {            d = (Dataset) i.next();            if (datasetIDs.contains(new Integer(d.getID()))) {                ds = new DatasetSummaryLinked();                ds.setID((d.getID()));                ds.setName(d.getName());                k = d.getImages().iterator();                //Add images to the dataset.                images = new ArrayList();                k = d.getImages().iterator();                while (k.hasNext()) {                    img = (Image) k.next();                    id = new Integer(img.getID());                    is = (ImageSummary) imagesMap.get(id);                    if (is == null) {                        is = fillImageSummary(img);                        imagesMap.put(id, is);                    }                    images.add(is);                }                ds.setImages(images);                results.add(ds);            }        }    }