g.dispose();
Downsample downsample = new SimpleIntensityDownsample();
ImageMLDataSet set = new ImageMLDataSet(downsample,true,-1,1);
BasicMLData ideal = new BasicMLData(1);
ImageMLData input = new ImageMLData(image);
set.add(input,ideal);
set.downsample(2,2);
Iterator<MLDataPair> itr = set.iterator();
MLDataPair pair = (MLDataPair)itr.next();
MLData data = pair.getInput();
double[] d = data.getData();
//Assert.assertEquals(d[0],-1.0, 0.1);
//Assert.assertEquals(d[5],1, 0.1);
// just "flex" these for no exceptions
input.toString();
input.setImage(input.getImage());
}
catch( HeadlessException ex) {
// ignore if we are running headless (i.e. the build server)
}
}