nrrdWriter(filename​, matrix, pixelspacing, origin, encoding)

This function writes imagery and metadata to .nrrd or .nhdr medical imaging format files.
1,8K descargas
Actualizado 3 dic 2014

Ver licencia

This is a complement of the function nrrdread, "NRRD Format File Reader by Jeff Mather". It does exactly the opposite: it's a NRRD files writer.
- With filename it's possible to set the path, the filename and the format (nrrd or nhdr+data). For example, a filename like '/home/mariodiaz/testfile.nhdr' will create the file at the folder /home/mariodiaz, its filename will be testfile, and it will create the header (.nhdr) appart from the data (.raw, gzip,... depending on the encoding).
- matrix is the data to put into the file. It will also set some fields at the header like dimension, space dimensions, size, type, etc.
- Pixel spacing is equivalent to the output file voxel width and should be defined as [psx, psy, psz]
- Origin should be set to [0,0,0] by default (otherwise coordinates will be shifted)
- Encoding sets data encoding. 'raw', 'ascii' or 'gzip' available.

Citar como

mdcacio (2024). nrrdWriter(filename, matrix, pixelspacing, origin, encoding) (https://www.mathworks.com/matlabcentral/fileexchange/48621-nrrdwriter-filename-matrix-pixelspacing-origin-encoding), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2011b
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Categorías
Más información sobre Data Import and Analysis en Help Center y MATLAB Answers.
Etiquetas Añadir etiquetas
Agradecimientos

Inspiración para: nrrdmeta2num(imgh)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versión Publicado Notas de la versión
1.2.0.0

- Fixed a little bug when path is not set up at nhdr option.

1.1.0.0

Little explanation about input parameters.

1.0.0.0