Print

Print


Hi Daniel,

This is a known issue which will be fixed in the next release of FSL. 
Flirt has output the transformation matrix in hexadecimal format, but most of the FSL tools require the transformation matrices to be in decimal format.

In the meantime, you can use the following bash script to convert your matrix file to decimal format.

Cheers,

Paul

----

#!/bin/bash

# Read from specified file, or from standard input
infile="${1:-/dev/stdin}"

while read line; do

    for number in $line; do
        printf "%f " "$number"
    done
    echo
done < $infile


On 2 June 2015 at 21:46, Daniel Borek <[log in to unmask]> wrote:
When I want to compute  command (I need it in the pipeline)

avscale --allparams mat1 | grep -A 4 "Forward half transform" | tail -n 4 > halfmat1

I get following error

"An exception has been thrown
Runtime error:- detected by Newmat: matrix is singular

MatrixType = Crout  # Rows = 3; # Cols = 3
Trace: Crout(lubksb); GeneralSolvI; InvertedMatrix::Evaluate; decompose_aff.

terminate called after throwing an instance of 'NEWMAT::SingularException'
"

Avscale is part of Flirt tool. I use fsl 5.0.8 on a Ubuntu 14.04 64bit. This code is processed without error on MacOs with FSL 5.0.6 on it. I enclosed the mat1  file. I tought  that matrix could be bad conditioned, mat1 is a output  of command
flirt -in  $i1 -ref $i2 -omat mat1
where $i1  $i2 preprocessed two  longitudinal scans, but this doesn't work on any subjects.