users > No reformatted files produced from Fiji/CMTK registration
Showing 1-9 of 9 posts
Jun 28, 2019 03:06 PM | Zane Aldworth
No reformatted files produced from Fiji/CMTK registration
Hi all,
I recently tried to use the CMTK gui from FIJI in order to register some brains. While the process seemed to work well and generated a "Registration" directory (with affine and warp subdirectories), I did not see a directory for the reformatted images, nor indeed any reformatted images in the other directories. I did find the "registration" output file, which I gather I could use to transform the original images if I wanted to install command line CMTK, but that seems to be a bit against the spirit the spirit of using a gui.
I did check (and uncheck and re-check) the box for reformat in the gui, and I performed the registration with affine & warp as well as affine only, with all output results being similar- registration folder produced, but no reformatted image.
Should I expect reformatted images as an output of FIJI/CMTK?
Also, assuming I can get the reformatted images, I have a couple of further options from command line CMTK that I would like to implement in the gui, but it seems that the syntax may need to be a bit different:
I'm registering labeled files instead of actual brains, so I need to add the "--class-ref label" and "--class-flt label" tags- is that the proper syntax? And would assume it goes to the "further registration params" field?
Similarly, I believe I read that the default similarity measure is nmi. Is that the case, and if not can I just add "--nmi"?
What is the default interpolation method, and how could I change it to partial volume (assuming "--partial-volume" doesn't work)?
For the affine registration I see 9 degrees of freedom as output, but haven't seen a 12 degree of freedom output (i.e. no sheer elements in the "registration" output file). Is there a way to do sheering or to specify the dof in the registration?
Finally, once the labelled files have been registered, I would like to apply the transformation matrices to both the original image stacks as well as to a traced neuron file. Are there commands equivalent dof2mat and reformatx from the command line?
Thanks for any help!
I recently tried to use the CMTK gui from FIJI in order to register some brains. While the process seemed to work well and generated a "Registration" directory (with affine and warp subdirectories), I did not see a directory for the reformatted images, nor indeed any reformatted images in the other directories. I did find the "registration" output file, which I gather I could use to transform the original images if I wanted to install command line CMTK, but that seems to be a bit against the spirit the spirit of using a gui.
I did check (and uncheck and re-check) the box for reformat in the gui, and I performed the registration with affine & warp as well as affine only, with all output results being similar- registration folder produced, but no reformatted image.
Should I expect reformatted images as an output of FIJI/CMTK?
Also, assuming I can get the reformatted images, I have a couple of further options from command line CMTK that I would like to implement in the gui, but it seems that the syntax may need to be a bit different:
I'm registering labeled files instead of actual brains, so I need to add the "--class-ref label" and "--class-flt label" tags- is that the proper syntax? And would assume it goes to the "further registration params" field?
Similarly, I believe I read that the default similarity measure is nmi. Is that the case, and if not can I just add "--nmi"?
What is the default interpolation method, and how could I change it to partial volume (assuming "--partial-volume" doesn't work)?
For the affine registration I see 9 degrees of freedom as output, but haven't seen a 12 degree of freedom output (i.e. no sheer elements in the "registration" output file). Is there a way to do sheering or to specify the dof in the registration?
Finally, once the labelled files have been registered, I would like to apply the transformation matrices to both the original image stacks as well as to a traced neuron file. Are there commands equivalent dof2mat and reformatx from the command line?
Thanks for any help!
Jun 28, 2019 05:06 PM | Greg Jefferis
RE: No reformatted files produced from Fiji/CMTK registration
Your images are probably not named according to the required fiddly
convention. They should be named:
filestem_01.nrrd
filestem_02.nrrd
otherfilestem_01.nrrd
otherfilestem_02.nrrd
filestem_01.nrrd
filestem_02.nrrd
otherfilestem_01.nrrd
otherfilestem_02.nrrd
Jun 28, 2019 07:06 PM | Zane Aldworth
RE: No reformatted files produced from Fiji/CMTK registration
Hmmm. That doesn't seem to change the output, assuming I
correctly understand the input format. In my case I have only
a single channel, with one reference brain and (at least initially)
a single floating brain that I wish to register, so my input is
currently:
filestem_01.nrrd (the reference brain)
otherfilestem_01.nrrd (the brain to be registered)
I've selected only to reformat channel 01, run the command, and still only get the Registration directory as an output. Should I expect a Reformat directory, as in the classic gui? Or are the reformatted/registered brains saved in some other manner?
Also, are there equivalent commands to e.g. "--class-ref label", "dof2mat", or "reformatx" in the gui, or is that functionality not supported here?
Thanks!
filestem_01.nrrd (the reference brain)
otherfilestem_01.nrrd (the brain to be registered)
I've selected only to reformat channel 01, run the command, and still only get the Registration directory as an output. Should I expect a Reformat directory, as in the classic gui? Or are the reformatted/registered brains saved in some other manner?
Also, are there equivalent commands to e.g. "--class-ref label", "dof2mat", or "reformatx" in the gui, or is that functionality not supported here?
Thanks!
Jun 29, 2019 10:06 PM | Greg Jefferis
RE: No reformatted files produced from Fiji/CMTK registration
Hi Zane,
I suggest you zip up a whole directory and share offline and I'll try to take a look on Mon.
> I've selected only to reformat channel 01, run the command, and still only get the Registration directory as an output.
Is there anything in your Registration directory? Perhaps it is failing at an earlier stage.
> Should I expect a Reformat directory, as in the classic gui?
Yes.
> Also, are there equivalent commands to e.g. "--class-ref label", "dof2mat", or "reformatx" in the gui, or is that functionality not supported here?
You can add extra arguments to be passed straight on to the underlying tools within the gui.
Best,
Greg.
I suggest you zip up a whole directory and share offline and I'll try to take a look on Mon.
> I've selected only to reformat channel 01, run the command, and still only get the Registration directory as an output.
Is there anything in your Registration directory? Perhaps it is failing at an earlier stage.
> Should I expect a Reformat directory, as in the classic gui?
Yes.
> Also, are there equivalent commands to e.g. "--class-ref label", "dof2mat", or "reformatx" in the gui, or is that functionality not supported here?
You can add extra arguments to be passed straight on to the underlying tools within the gui.
Best,
Greg.
Jun 30, 2019 03:06 AM | Zane Aldworth
RE: No reformatted files produced from Fiji/CMTK registration
Hi Greg,
Thanks- I'll send you the directory offline.
>Is there anything in your Registration directory? Perhaps it is failing at an earlier stage.
Yes, the registration directory looks fully populated- has subdirectories for affine (and warp when I select it), subdirectories for each of the floating image stacks, and each of those subdirectories has files "cmd.sh", "registration", "settings", "statistics", and "studylist". Also, the "registration" file seems to have actual transformation values that go beyond an initial value.
Thanks- I'll send you the directory offline.
>Is there anything in your Registration directory? Perhaps it is failing at an earlier stage.
Yes, the registration directory looks fully populated- has subdirectories for affine (and warp when I select it), subdirectories for each of the floating image stacks, and each of those subdirectories has files "cmd.sh", "registration", "settings", "statistics", and "studylist". Also, the "registration" file seems to have actual transformation values that go beyond an initial value.
Jun 30, 2019 11:06 AM | Greg Jefferis
RE: No reformatted files produced from Fiji/CMTK registration
Dear Zane,
In the files that you sent me, only affine registration was selected. munger (the script that coordinates registrations) has been built assuming that you want to do a full warping registration. By default it only reformats after the warping registration is complete. If you want to reformat after the affine step, then you need to request this explicitly.
-l [p|a|0..9|f] run reformat on these levels
(default f=final warp, p=principal axis, a=affine, 0..9=warp intermediates)
So in this case adding the extra parameter to munger -l a should do the trick.
I will check your files with a warping registration to see if that continues to be a problem there.
Best,
Greg.
In the files that you sent me, only affine registration was selected. munger (the script that coordinates registrations) has been built assuming that you want to do a full warping registration. By default it only reformats after the warping registration is complete. If you want to reformat after the affine step, then you need to request this explicitly.
-l [p|a|0..9|f] run reformat on these levels
(default f=final warp, p=principal axis, a=affine, 0..9=warp intermediates)
So in this case adding the extra parameter to munger -l a should do the trick.
I will check your files with a warping registration to see if that continues to be a problem there.
Best,
Greg.
Dec 17, 2020 12:12 AM | Jonathan Perdomo - Drexel University
RE: No reformatted files produced from Fiji/CMTK registration
Hi Greg,
I am having this same issue with just deselecting warping in the script generator but have not been able to run it with the included command you suggested (-L a). The command does not appear to be recognized. Am I calling it correctly?
My settings are:
Registration actions:
Affine
Reformat
Reformat Channels:
01
Registration Params:
Cachero, Ostrovsky 2010
Action
Write Script
(Further) Registration Params
-X 26 -C B -G 80 -R 4 -A '--accuracy 0.4' -W '--accuracy 0.4' -L a
Final script:
cd "/home/pogo/Desktop/JPerdomo MCFO_L320 Feb04 15min"
"/home/pogo/Desktop/Fiji.app/bin/cmtk/munger" -b "/usr/lib/cmtk/bin" -a -w -r 01 -X 26 -C 8 -G 80 -R 4 -A '--accuracy 0.4' -W '--accuracy 0.4' -L a -T 4 -s "refbrain/JPerdomo-JFRC2.nrrd" images/JPerdomo-Feb04_Stack_01.nrrd
Error (this goes away when I remove -L a):
Unable to read reference brain
Best,
Jonathan
I am having this same issue with just deselecting warping in the script generator but have not been able to run it with the included command you suggested (-L a). The command does not appear to be recognized. Am I calling it correctly?
My settings are:
Registration actions:
Affine
Reformat
Reformat Channels:
01
Registration Params:
Cachero, Ostrovsky 2010
Action
Write Script
(Further) Registration Params
-X 26 -C B -G 80 -R 4 -A '--accuracy 0.4' -W '--accuracy 0.4' -L a
Final script:
cd "/home/pogo/Desktop/JPerdomo MCFO_L320 Feb04 15min"
"/home/pogo/Desktop/Fiji.app/bin/cmtk/munger" -b "/usr/lib/cmtk/bin" -a -w -r 01 -X 26 -C 8 -G 80 -R 4 -A '--accuracy 0.4' -W '--accuracy 0.4' -L a -T 4 -s "refbrain/JPerdomo-JFRC2.nrrd" images/JPerdomo-Feb04_Stack_01.nrrd
Error (this goes away when I remove -L a):
Unable to read reference brain
Best,
Jonathan
Dec 17, 2020 10:12 AM | Greg Jefferis
RE: No reformatted files produced from Fiji/CMTK registration
Dear Jonathan,
the arguments to munger are case sensitive. Therefore you need to add
i.e. lower case l.
All the best,
Greg.
Originally posted by Jonathan Perdomo:
the arguments to munger are case sensitive. Therefore you need to add
-l
a
i.e. lower case l.
All the best,
Greg.
Originally posted by Jonathan Perdomo:
Hi Greg,
I am having this same issue with just deselecting warping in the script generator but have not been able to run it with the included command you suggested (-L a). The command does not appear to be recognized. Am I calling it correctly?
My settings are:
Registration actions:
Affine
Reformat
Reformat Channels:
01
Registration Params:
Cachero, Ostrovsky 2010
Action
Write Script
(Further) Registration Params
-X 26 -C B -G 80 -R 4 -A '--accuracy 0.4' -W '--accuracy 0.4' -L a
Final script:
cd "/home/pogo/Desktop/JPerdomo MCFO_L320 Feb04 15min"
"/home/pogo/Desktop/Fiji.app/bin/cmtk/munger" -b "/usr/lib/cmtk/bin" -a -w -r 01 -X 26 -C 8 -G 80 -R 4 -A '--accuracy 0.4' -W '--accuracy 0.4' -L a -T 4 -s "refbrain/JPerdomo-JFRC2.nrrd" images/JPerdomo-Feb04_Stack_01.nrrd
Error (this goes away when I remove -L a):
Unable to read reference brain
Best,
Jonathan
I am having this same issue with just deselecting warping in the script generator but have not been able to run it with the included command you suggested (-L a). The command does not appear to be recognized. Am I calling it correctly?
My settings are:
Registration actions:
Affine
Reformat
Reformat Channels:
01
Registration Params:
Cachero, Ostrovsky 2010
Action
Write Script
(Further) Registration Params
-X 26 -C B -G 80 -R 4 -A '--accuracy 0.4' -W '--accuracy 0.4' -L a
Final script:
cd "/home/pogo/Desktop/JPerdomo MCFO_L320 Feb04 15min"
"/home/pogo/Desktop/Fiji.app/bin/cmtk/munger" -b "/usr/lib/cmtk/bin" -a -w -r 01 -X 26 -C 8 -G 80 -R 4 -A '--accuracy 0.4' -W '--accuracy 0.4' -L a -T 4 -s "refbrain/JPerdomo-JFRC2.nrrd" images/JPerdomo-Feb04_Stack_01.nrrd
Error (this goes away when I remove -L a):
Unable to read reference brain
Best,
Jonathan
Dec 18, 2020 12:12 AM | Jonathan Perdomo - Drexel University
RE: No reformatted files produced from Fiji/CMTK registration
Ok it works now, thank you.