users > What does the message mean after running film
Showing 1-6 of 6 posts
Display:
Results per page:
Oct 1, 2010  11:10 AM | Tanmay Nath
What does the message mean after running film
Sir,
When I run the film application on a certain image then i get the following message :

CMTK/bin/film -v -s -p 3 --injection-kernel-sigma 3 --injection-kernel-radius 2 --cosine-sinc --num-iterations 40 test.nii.gz out3sc-3-2-40.nii.gz
Read 256 x 30 x 512 voxels [29.882940 x 14.500000 x 59.883068 mm total size].
Data type byte (8bit unsigned), range [0.000000 .. 255.000000]
INFO: reorienting image from 'LSA' to 'RAS'
Computing transformations between passes...
Volume injection...ation: 100 %
f 40.1807 MSD 40.1807 MAX 172.51 KLD 5.31718 LNORM 0
f 40.1806 MSD 40.1806 MAX 172.51 KLD 5.31718 LNORM 0
f 0.830083 MSD 0.830083 MAX 40.9727 KLD 5.36767 LNORM 0
f 0.131591 MSD 0.131591 MAX 39.0488 KLD 5.37169 LNORM 0
f 0.090367 MSD 0.090367 MAX 39.315 KLD 5.37331 LNORM 0
f 0.0873716 MSD 0.0873716 MAX 39.3344 KLD 5.37346 LNORM 0
f 0.0870947 MSD 0.0870947 MAX 39.3372 KLD 5.37382 LNORM 0
f 0.0870552 MSD 0.0870552 MAX 39.338 KLD 5.37384 LNORM 0
f 0.0870459 MSD 0.0870459 MAX 39.3382 KLD 5.37384 LNORM 0
f 0.0870426 MSD 0.0870426 MAX 39.3382 KLD 5.37384 LNORM 0
f 0.0870393 MSD 0.0870393 MAX 39.3383 KLD 5.37383 LNORM 0
f 0.0870348 MSD 0.0870348 MAX 39.3383 KLD 5.37383 LNORM 0
f 0.0870325 MSD 0.0870325 MAX 39.3383 KLD 5.37383 LNORM 0
f 0.0870297 MSD 0.0870297 MAX 39.3383 KLD 5.37383 LNORM 0
f 0.0870276 MSD 0.0870276 MAX 39.3383 KLD 5.37383 LNORM 0
f 0.0870252 MSD 0.0870252 MAX 39.3383 KLD 5.37384 LNORM 0
f 0.0870236 MSD 0.0870236 MAX 39.3383 KLD 5.37383 LNORM 0
f 0.0870201 MSD 0.0870201 MAX 39.3383 KLD 5.37383 LNORM 0
f 0.0870191 MSD 0.0870191 MAX 39.3383 KLD 5.37383 LNORM 0
f 0.0870155 MSD 0.0870155 MAX 39.3383 KLD 5.37384 LNORM 0
f 0.0870149 MSD 0.0870149 MAX 39.3383 KLD 5.37383 LNORM 0
f 0.0870142 MSD 0.0870142 MAX 39.3383 KLD 5.37384 LNORM 0
f 0.0870136 MSD 0.0870136 MAX 39.3383 KLD 5.37384 LNORM 0
f 0.087013 MSD 0.087013 MAX 39.3383 KLD 5.37384 LNORM 0
f 0.0870126 MSD 0.0870126 MAX 39.3383 KLD 5.37384 LNORM 0
f 0.087012 MSD 0.087012 MAX 39.3383 KLD 5.37385 LNORM 0
f 0.0870116 MSD 0.0870116 MAX 39.3383 KLD 5.37384 LNORM 0
f 0.087011 MSD 0.087011 MAX 39.3383 KLD 5.37384 LNORM 0
f 0.0870107 MSD 0.0870107 MAX 39.3383 KLD 5.37384 LNORM 0
f 0.0870098 MSD 0.0870098 MAX 39.3383 KLD 5.37384 LNORM 0
f 0.0870095 MSD 0.0870095 MAX 39.3383 KLD 5.37383 LNORM 0
f 0.0870073 MSD 0.0870073 MAX 39.3383 KLD 5.37383 LNORM 0
f 0.0870069 MSD 0.0870069 MAX 39.3383 KLD 5.37383 LNORM 0
f 0.0870066 MSD 0.0870066 MAX 39.3383 KLD 5.37383 LNORM 0
f 0.0870061 MSD 0.0870061 MAX 39.3383 KLD 5.37383 LNORM 0

I do not understand what does the f,MSD, MAX, KLD, LNORM stands for and what does the number following them means?
Kindly help
Thanks
Tanmay Nath
Oct 1, 2010  12:10 PM | Torsten Rohlfing - Google LLC
RE: What does the message mean after running film
The messages you are seeing are basically diagnostic and/or for progress reporting. Basically, you can ignore them.

As for what the numbers mean:

f is the total cost function that the volume reconstruction is optimizing; this should decrease monotonically.

MSD is the mean squared difference between input data and the corresponding images re-interpolated from the reconstruction result. This is essentially the residual error, and when no other terms (regularizers) are optimized, then this is the same as f.

MAX is the maximum pixel difference between inputs and re-interpolated images.

KLD is the Kullback-Leibler distance between the intensity distributions of input data and reconstructed data.

LNORM is the L-norm regularization term computed from the reconstructed volume, but unless you explicitly turn regularization on, it is not computed, so the "0" value just means that you're not using this regularizer.

Hope this helps.

The take-home message stays the same though: you can essentially ignore all of these.

TR
Oct 5, 2010  11:10 AM | Tanmay Nath
RE: What does the message mean after running film
Sir,
I have my data set with image dimension as 256*30*512 and slice thickness as 0.11719 * 0.5 * 0.11719.I have applied film tool with sigma and radius values ranging from 0.5 to 6, with number of iterations from 10 to 40.Unfortunately I have not got any good results.I am sure that the number of passes that i have selected is correct and also the interleave axis is also correct.Apart from using the default registration metric(-msd) I have also used the other registration supported values like -nmi. Still I have not got good results.Now i need to check at which step I am going wrong.whether my registration is not proper or my gaussian kernel size is not appropriate or is there any other problem.So I would like to know is there any procedure to check that?

Kindly help
Tanmay Nath
Oct 5, 2010  12:10 PM | Torsten Rohlfing - Google LLC
Diagnosing "film" problems
Okay, so the first thing to check is whether you get a decent image after the initial volume injection stage. You can write the injected image by adding

--write-injected-image image.nrrd

to your film command line. You can of course choose another file name and/or extension (file format) as well. I would suggest nrrd or nifti (.nii) format, though, because these two most consistently represent the internal image coordinates.

See if the resulting injected image has "black holes", in which case something may be wrong with your sigma and radius parameters still.

If the injected image still shows interleaved artifacts, you could either have a registration problem or still be using the wrong number of passes and interleave axis.

Whether you indeed got the correct interleave axis and number of passes can be checked using the "split" tool - if you split your input image into as many passes as you think is correct, and along the presumed interleaving axis, then "split" should produce separate pass images that are all free of interleaved motion artifacts. If they're not, you got something wrong with the interleaving axis or pass count.

To diagnose registration problems, you may want to export the registration transformations using the command line option

--export-xforms-path registrations.xform

You can take the resulting transformation file and separate it into multiple parts, one affine transformation per pass image, which you could then apply via "reformatx" to the respective pass images you got from "split."

TR
Oct 27, 2010  09:10 AM | Tanmay Nath
RE: Diagnosing "film" problems
Hi Torsten,
As per your advise i have checked my image after initial volume injection stage.it was satisfactory. I have also checked my number of passes using "split" tool.The number of passes selected was also correct.To check problems with registration,I even exported the registration transformation.I used the resulting transformation file and separated it into multiple parts, one affine transformation per pass image, which i then applied via "reformatx" to the respective pass images i got from "split" tool. However, I have not got any satisfactory results.I will email you my wiki in which i have posted the snapshots at every stage.I will also email you the mouse data set which i am currently using.

Kindly help

Tanmay Nath
Oct 27, 2010  01:10 PM | Torsten Rohlfing - Google LLC
RE: Diagnosing "film" problems
Hi Tanmay:

So here's what I think is your problem: your images contain very little actual image and a large, LARGE black background around the rectangular field of view. That is a recipe for disaster when you try to co-register the passes, because essentially you'll be aligning the extent of the field of view (non-zero image area) to itself without much regard for the actual image data.

The best way to address this is to crop the image to the actual field of view, which you can easily do using CMTK's convertx tool:

convertx --crop-by-threshold 1 CLEAN_157_04.nii.gz cropped.nii

Then run "film" on the cropped image. This will also speed things up, because you won't be wasting time reconstructing empty image areas.

The second-best option, which I strongly discourage and only mention for completeness, is to use the new "--padding-value" option in film (use current SVN trunk source code or wait for CMTK 1.5.0 release). If you add "--padding-value 0" to your film command line, the tool will ignore the zero-filled regions for registration. Again, the strongly recommended option is to "physically" crop the data to its true field of view.

Best,
Torsten