Roi export as nifti mask goes into wrong space

Questions about Anatomist manipulation

Moderators: denghien, riviere

User avatar
Yann Cointepas
Posts: 316
Joined: Tue Jan 20, 2004 2:56 pm
Location: Neurospin, Saint Aubin, France
Contact:

Re: Roi export as nifti mask goes into wrong space

Post by Yann Cointepas »

For uuid generation, you can use "uuidgen" on Linux (I do not know if it is always installed).

To create a new referential on a non existing minf file, you can use the following Python code (you can put it in a command-like executable Python script):

Code: Select all

from soma.minf.api import writeMinf
from soma.uuid import Uuid
writeMinf( '/tmp/test.minf', [ { 'referential': str( Uuid() ) } ] )
To copy a referential from an existing minf to another existing minf:

Code: Select all

from soma.minf.api import readMinf, writeMinf
referential = readMinf( '/tmp/test.minf' )[0][ 'referential' ]
minf = readMinf( '/tmp/test2.minf' )
minf[0][ 'referential' ] = referential
writeMinf( '/tmp/test2.minf', minf )
Post Reply