This commit is contained in:
Jonas Hofmann 2025-11-24 12:56:31 +01:00
parent a23369ea4c
commit 51d02f32c2
2 changed files with 10 additions and 3 deletions

View File

@ -41,24 +41,31 @@ GrayScaleImageSeries *readImages(const char *path)
if (expectedHeader)
{
printf("expected Header!\n");
// reallocate memory so that each image width can be saved seperately
series->images = realloc(series->images, series->count * 2 * sizeof(unsigned int) + sizeof(headerString));
printf("count: %d", series->count);
series->images[2].width = series->images->width;
series->images[2].height = series->images->height;
/*
for (int i = 0; i < series->count; i++)
{
series->images[i].width = series->images->width;
series->images[i].height = series->images->height;
}
*/
printf("afer for Loop! \n");
readImagedata(readSource, series, numberOfBytesToRead);
}
else
{
series = NULL;
}
printf("before read Source\n");
fclose(readSource);
}
printf("finished reading!\n");
return series;
}

2
main.c
View File

@ -23,7 +23,7 @@ int main(int argc, char *argv[])
printf("Loaded %u images ... \n", series->count);
model = loadModel(pathToModel);
if(model.numberOfLayers > 0)
{
unsigned char *predictions = NULL;