public csiftparser(String filename) throws InterruptedException{
this.filename = filename;
// KeyPointList = new ArrayList<Object>();
AAO_kPointList = new ArrayList <ArrayList <Integer>>();
try
{
in = new LineNumberReader (fr = new FileReader(filename));
vcount = 0;
//in.readLine();
for (String line; (line = in.readLine()) != null;){
// System.out.println(line);
//line = 300.91 351.43 28.79 2.884
strToK_getCoordinates = new StringTokenizer(line);
akt_X = Double.parseDouble(strToK_getCoordinates.nextToken());
akt_Y = Double.parseDouble(strToK_getCoordinates.nextToken());
akt_Scale = Double.parseDouble(strToK_getCoordinates.nextToken());
akt_Orientation = Double.parseDouble(strToK_getCoordinates.nextToken());
//System.out.println(akt_X);
// skip to next;
// line = in.readLine();
for (int m =0; m < 3; m++){
kPoint = new siftKeyPoint();
kPoint.setX(akt_X);
kPoint.setY(akt_Y);
kPoint.setScale(akt_Scale);
kPoint.setOrientation(akt_Orientation);
vcount = 0;
while (vcount < 7){
line = in.readLine();
vcount++;
strToK_getKeypoints = new StringTokenizer(line);
while(strToK_getKeypoints.hasMoreTokens()){
temp = strToK_getKeypoints.nextToken();
kPoint.getList().add(Integer.valueOf(temp));
}
}
AAO_kPointList.add(kPoint.getList());
}
}
}
catch (IOException ex) {
Logger.getLogger(csiftparser.class.getName()).log(Level.SEVERE, null, ex);
}
finally {
if (fr != null)
try {
System.out.println("allet weg");
fr.close();
in.close();
strToK_getKeypointquantity = null;
strToK_getCoordinates = null;
strToK_getKeypoints = null;
//System.gc();
}
catch (IOException e) {
}
}