fixed clearSeries(), label test still not working

This commit is contained in:
Jonas Hofmann 2025-11-30 13:31:16 +01:00
parent 7698e94944
commit 4cb06d2951
2 changed files with 28 additions and 11 deletions

View File

@ -113,26 +113,43 @@ void clearSeries(GrayScaleImageSeries * series)
{ {
int i = 0; int i = 0;
int j = 0; int j = 0;
// /*
// printf("Hier14!\n");
for (i = 0; i < series->count; i++) for (i = 0; i < series->count; i++)
{ {
for (j = 0; j < series->images[i].width * series->images[i].height; j++) /*
printf("Hier14.1\n");
printf("width: %d, height: %d\n", series->images[i].width, series->images[i].height);
// */
// /*
if (i >= 1)
{ {
series->images[i].buffer[j] = 0; for (j = 0; j < series->images[i].width * series->images[i].height; j++)
{
/*
printf("Hier14.1.1\n");
printf("j: %d\n", j);
printf("buffer: %d\n", series->images[i].buffer[j]);
// */
series->images[i].buffer[j] = 0;
}
} }
// */
// printf("Hier14.2\n");
series->labels[i] = 0; series->labels[i] = 0;
// printf("Hier14.3\n");
series->images[i].width = 0; series->images[i].width = 0;
// printf("Hier14.4\n");
series->images[i].height = 0; series->images[i].height = 0;
} // printf("Hier 14.5\n");
} // */
// printf("Hier15\n");
for (i = 0; i < series->count; i++) for (i = 0; i < series->count; i++)
{ {
free(series->images[i].buffer); free(series->images[i].buffer);
series->images[i].buffer = NULL; series->images[i].buffer = NULL;
} }
// printf("Hier16\n");
free(series->labels); free(series->labels);
series->labels = NULL; series->labels = NULL;
free(series->images); free(series->images);

Binary file not shown.