<div dir="ltr">Hi everyone,<div><br></div><div>I've recently started working with a very large .nd2 format time lapse image, that was taken on a Nikon confocal microscope.  These image sequences are 5D (x,y,z,time,channel).  Because these images are so large, trying to work on the entire image at once will cause a memory allocation error.  Therefore I set the reader up in ITK, use a series of ExtractImageFilters to break down the giant file into 2D images (I iterate over the time sequence in a for loop, obtaining a 2D x, y image for each time frame for each channel).</div><div><br></div><div>This all works fine, and I'm able to complete the necessary image filtering/corrections on these 2D images within the for loop.  My problem arises when I'm trying to write the output file.  Ideally, I would like to be able to compose all of these images back into one large 5D .nd2 file, but if I do this outright, I'm guessing the writer will have a memory allocation error.  Is there a way to write the file one frame at a time, adding the next frame onto the file as the filtering occurs?  Or is there some other way to handle the writing of very large image files to skirt around memory allocation problems?  I know I could write each frame as an individual file in an image sequence, but then I would have to use a third-party program like ImageJ to make them into a stack, merge channels, etc, which is not a simple task with the volume of image files I will be analyzing.</div><div><br></div><div>Thanks for your help!</div><div>Tim</div></div>