0

Quick note: my array happens to be jagged. It doesn't really matter, though.

I currently am exporting my data into a single binary file like so:

using (BinaryWriter writer = new BinaryWriter(File.OpenWrite($"{Path.GetDirectoryName(Assembly.GetEntryAssembly().Location)}/file.bin")))
{
    for (int i = 0; i < data.Length; i++)
        for (int j = 0; j < data[0].Length; j++)
            for (int k = 0; k < data[0][0].Length; k++)
                writer.Write(data[i][j][k]);
}

Then I am opening this file in a separate software, ImageJ, and exporting to a tiff stack from File->Save as->etc...

How can I do this in .NET directly from the array?

Mini
  • 445
  • 5
  • 17

0 Answers0