Skip to content

Conversion between text files and images #3358

Description

@Lestropie

I'm sure this topic has been discussed elsewhere, but I'm not managing to find the right search term.

I currently have a task wherein I need to be able to convert between a plaintext 1D vector data file and a NIfTI with a single non-unity axis for compatibility with external tools. It's a value per surface vertex rather than a value per fixel, but it's contextually similar.

I had tried to come up with a suitable command name, but the only relevant existing data type command-name components are vector (vectorstats) and connectome (which implies 2D, and the command should support 2D text data, but not all 2D text data are connectomes).

So it may in fact be suitable to include this as a hard branch in mrconvert. If either input or output paths don't have an image extension, then, attempt to do an image-to-matrix or matrix-to-image conversion. Abort if the matrix to be exported has more than two non-unity axes.

In this way it would be a patch solution short of the #1664 overhaul.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions