MxPlot: Multi-Axis Matrix Visualization Library for .NET. This project is currently under active development.
$ dotnet add package MxPlot.Extensions.TiffOME-TIFF and ImageJ-compatible hyperstack I/O support for MxPlot
MxPlot.Extensions.TIFF provides advanced TIFF read/write capabilities for MatrixData<T>. It is designed to handle 5D bio-imaging data (XY + Channel, Z, Time) with full metadata preservation, bridging MxPlot with the scientific imaging ecosystem (ImageJ/Fiji, Bio-Formats).
IMatrixDataWriter / IMatrixDataReader interfaces.Based on the internal file structure:
OmeTiffFormat: The core writer strategy for generating OME-compliant TIFFs.ImageJTiffFormat: The writer strategy optimized for ImageJ compatibility.OmeTiffHandler / ImageJTiffHandler: High-level I/O handlers.ImageJMetadata: Helper class for managing ImageJ specific TIFF tags.This library integrates with the MatrixData.Save method via the Strategy Pattern.
using MxPlot.Core;
using MxPlot.Extensions.Tiff;
// Assume 'matrix' is a MatrixData<float> with 5D dimensions (e.g., C=3, Z=24, T=100)
// and physical scaling (e.g., 0.1um/pixel).
// 1. Save as OME-TIFF (Recommended for archival/analysis)
// Preserves full physical metadata and dimension order.
matrix.Save("simulation_data.ome.tif", new OmeTiffFormat());
// 2. Save as ImageJ Hyperstack (Recommended for quick viewing)
// Lightweight format specifically tuned for Fiji.
matrix.Save("quick_view.tif", new ImageJTiffFormat());
// 3. Save with custom options (e.g., disable Y-flip)
var options = new OmeTiffFormat.Options
{
FlipY = false // Keep original coordinate system
};
matrix.Save("no_flip.ome.tif", new OmeTiffFormat(options));
// Automatically detects OME-TIFF or Standard TIFF and restores axes information.
IMatrixData loadedData = MatrixData.Load("input.ome.tif");
byte, sbyte, short, ushort, int, float, double.FlipY option if needed. See the API documentation for OmeTiffFormat and ImageJTiffFormat for details.BitMiracle.LibTiff.NET.License MIT License