for (int i = 0; i < numChunks; i++)
{
double feature = 0.0;
FeatChunk fC = (FeatChunk) events.get(i);
for (int j = 0; j < featureSize; j++)
{
if (featureNumber == -1)
feature = fC.length;
else
{
double[] featureArray = featFile.getFeatureByName(featureName, i);
feature = featureArray[j];
}
if (feature < lowestValue)
lowestValue = feature;
if (feature > highestValue)
highestValue = feature;
if (fC.startTime < firstEventTime)
firstEventTime = fC.startTime;
if (fC.startTime > lastEventTime)
lastEventTime = fC.startTime;
if (fC.startTime + fC.length > endTime)
endTime = fC.startTime + fC.length;
}
}
}
else
{
System.out.println("got edl file!");
//events = edlFile.chunks;
//events = featFile.chunks;
events = new Vector(100, 0);
// extract feature data, find highest/lowest feature values
//numChunks = events.size();
numChunks = featFile.chunks.size();
for (int i = 0; i < numChunks; i++)
{
double feature = 0.0;
EDLChunk edlC = (EDLChunk)edlFile.chunks.get(i);
FeatChunk fC = (FeatChunk)featFile.chunks.get(i);
for (int j = 0; j < featureSize; j++)
{
if (featureNumber == -1)
feature = fC.length;
else
{
double[] featureArray = featFile.getFeatureByName(featureName, i);
feature = featureArray[j];
}
if (feature < lowestValue)
lowestValue = feature;
if (feature > highestValue)
highestValue = feature;
if (edlC.dstTime < firstEventTime)
firstEventTime = edlC.dstTime;
if (edlC.dstTime > lastEventTime)
lastEventTime = edlC.dstTime;
if (edlC.dstTime + edlC.length > endTime)
endTime = edlC.dstTime + edlC.length;
}
}
//add chunks to events in new EDL order
//System.out.println("adding chunks from FeatFile...");
for (int i = 0; i < numChunks; i++)
{
EDLChunk edlC = (EDLChunk)edlFile.chunks.get(i);
double sT = edlC.startTime;
int matchChunkNum = -1;
for (int chunkNum = 0; chunkNum < numChunks; chunkNum++)
{
FeatChunk fC = (FeatChunk)featFile.chunks.get(chunkNum);
double fST = fC.startTime;
if (fST == sT)
{
matchChunkNum = chunkNum;