AimsSNR

AIMS library and commands usage

Moderators: denghien, riviere

Post Reply
Olivier_Colliot
Posts: 22
Joined: Wed Mar 17, 2004 5:25 pm
Location: LENA/CNRS, Paris

AimsSNR

Post by Olivier_Colliot »

Hi,

I am having difficulties using AimsSNR command line.

As far as I understand, I guess that one has to provide a ROI in which the standard deviation of the noise will be estimated.
It seems that this ROI can be provided either as a sphere (coordinates x,y,z and radius) or as a binary volume. But I can't make any of these options work :

1) with the sphere

Code: Select all

# AimsSNR -i l10578_SPMC -x 100 -y 100 -z 30 -R 10
Abort
2) with the binary volume (U8, as indicated in the help)

Code: Select all

# AimsSNR -i l10578_SPMC.ima -v headInvert_U8.ima
Abort
Does anybody have an idea?
Thanks,
Olivier
User avatar
Yann Cointepas
Posts: 316
Joined: Tue Jan 20, 2004 2:56 pm
Location: Neurospin, Saint Aubin, France
Contact:

Post by Yann Cointepas »

AimsSNR is one of these very old commands that were created before anyone here was born and untouched since then :mrgreen:

It uses some obsolete code (e.g. for argument parsing) and does not include the appropriate try/catch structure to display a human readable error message instead of "Abort".

Any volunteer to fix this command ?
User avatar
Jean-Francois Mangin
Posts: 337
Joined: Mon Mar 01, 2004 10:24 am
Location: Neurospin, CEA, France
Contact:

Post by Jean-Francois Mangin »

Is this one in your package?

--------------------------------------------------------------------------------
NmrSNR
--------------------------------------------------------------------------------
Automatic mask processing
--------------------------------------------------------------------------------

-i<std_string>
Input file name

[-m<std_string>]
Mask name

[-s<std_vector_of_int>]
Signal ROI defined by a bounding box ( x1, y1, z1, x2, y2, z2 )

[-n<std_vector_of_int>]
Noise ROI defined by a bounding box ( x1, y1, z1, x2, y2, z2 )

[-t<int>]
Rank time (default=0)

[-o<std_string>]
Output file name

[-verbose<bool>]
Show as much information as possible

[-verbosePluginLoading<bool>]
Verbose plugin loading (default=true)

[-h<bool>]
show help
Olivier_Colliot
Posts: 22
Joined: Wed Mar 17, 2004 5:25 pm
Location: LENA/CNRS, Paris

Post by Olivier_Colliot »

Yes, NmrSNR is in my package and this is exactly what I need. Thanks!

Just two last questions/remarks:

1) When giving the ROI as a mask, I guess that the mean of the signal is computed on the mask and the SD of the noise is computed on the complementary of the mask.
Is it possible to compute the signal and the noise on two different masks which are not complementary sets?

2) The 'NmrSNR' command line works fine except when a ".ima.minf" file is present in the directory.
For example :

Code: Select all

# NmrSNR -i l10578_SPMC -m l10578_SPMC_head.ima
/usr/global/SHFJ_pack-stable-linux-3.0.0/bin/commands-links/NmrSNR: void nmr::Process::execute( const std::string& name ): cannot analyze'l10578_SPMC' file; void nmr::DiskFormatAnalyzer::analyze: 'l10578_SPMC' : no matching format
# rm l10578_SPMC.ima.minf
# NmrSNR -i l10578_SPMC -m l10578_SPMC_head.ima
signal mean : 34.6481
noise mean : 0.761261
noise std dev : 3.16402
SNR : 10.9507
SNR(dB) : 20.7888
Thanks again,
Olivier
cpoupon
Posts: 5
Joined: Fri Mar 05, 2004 1:30 pm

NmrSNR command

Post by cpoupon »

For the moment, when specifying a mask with -m option, noise is processed
in the complementary of the given mask.

I understand your requirement and it will be taken into account in the next
release.

As for the crash with a *.ima.minf. In fact, in AIMS the type of items is given
in 'data_type' syntactic argument, whereas in NMR the item type is given in
'item_type' syntactic argument.
Furthermore, in AIMS, item type names are U8, S8, U16, S16, ...
where as in NMR, item type names are uint8_t, int8_t, uint16_t, int16_t, ...
So NmrSNR is crashing because it could not find 'item_type' syntactic
argument.


Cyril
Olivier_Colliot
Posts: 22
Joined: Wed Mar 17, 2004 5:25 pm
Location: LENA/CNRS, Paris

Post by Olivier_Colliot »

Thanks a lot!

I will delete the .minf files before calling NmrSNR.
Just out of curiosity, is there a tool that would automatically convert an AIMS-readable ".minf" to a NMR-readable one?

Olivier
Post Reply