users > Reformat script crashing
Showing 1-4 of 4 posts
May 10, 2016 06:05 PM | Gabriella Sterne - Janelia Research Campus
Reformat script crashing
Hello,
This is my first time posting to the forum so please let me know if I have not provided sufficient information!
I am attempting to register Drosophila brain images to a template using nc82 staining. I would like to register 16-bit images. My system is 64-bit Windows 7 Professional. I set up CMTK using the following tutorial:
http://researchmap.jp/jo57feb6e-2041067/...
I am using ActivePerl 5.22.1 Build 2201 (64-bit) and CMTK-3.2.2-Windows-x86 and working with a 16-bit .PIC template as well as 16-bit .PIC images.
I am having two issues, which might be related or unrelated:
1) After running my registration file:
cd "C:\CMTKresults\CMTKreg
perl "C:\CMTKresults\CMTK\bin\munger" -b "C:\CMTKresults\CMTK\bin" -awr 01 -T 8 -s "template/template16.PIC" "images"
Everything appears to run smoothly. However, following the completion of the program I no longer get any file in the "reformatted" folder.
2) I previously was able to remedy this problem by running the following reformat script:
cd "C:\CMTKresults\CMTKreg"
perl "C:\CMTKresults\CMTK\bin\munger" -b "C:\CMTKresults\CMTK\bin" -r 01 -f 01 -T 8 -s "template/template16.PIC" "images"
which would then give me a reformatted .nrrd of the registered _01 image. However, recently, the above script fails. I receive a message from Windows saying "reformatx.exe has stopped working". If I view the problem details I see the following:
Problem signature:
Problem Event Name: APPCRASH
Application Name: reformatx.exe
Application Version: 0.0.0.0
Application Timestamp: 53dbd96b
Fault Module Name: MSVCR100.dll
Fault Module Version: 10.0.40219.1
Fault Module Timestamp: 4d5f0c22
Exception Code: 40000015
Exception Offset: 0008d6fd
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 1033
Additional Information 1: 6c7b
Additional Information 2: 6c7b33b39693521b9f38e6365f643500
Additional Information 3: 0510
Additional Information 4: 051044f64499f858b746874ce044c411
I have attempted to reinstall reformatx.exe and MSCVR100.dll with no change. If I say "close the program" the error message disappears but pops us a few more times before the program finally closes. If the check the "reformatted" folder, there are no images. In addition, changing the reformat script to:
cd "C:\CMTKresults\CMTKreg"
perl "C:\CMTKresults\CMTK\bin\munger" -b "C:\CMTKresults\CMTK\bin" -r 02 -f 01 -T 8 -s "template/template16.PIC" "images"
leads to identical results.
Interestingly, I am able to register 8-bit .PIC files to an 8-bit .PIC template without incident. Unfortunately I need to use 16-bit images.
Any suggestions would be greatly appreciated! My apologies if the solution is completely obvious.
Thank you!
This is my first time posting to the forum so please let me know if I have not provided sufficient information!
I am attempting to register Drosophila brain images to a template using nc82 staining. I would like to register 16-bit images. My system is 64-bit Windows 7 Professional. I set up CMTK using the following tutorial:
http://researchmap.jp/jo57feb6e-2041067/...
I am using ActivePerl 5.22.1 Build 2201 (64-bit) and CMTK-3.2.2-Windows-x86 and working with a 16-bit .PIC template as well as 16-bit .PIC images.
I am having two issues, which might be related or unrelated:
1) After running my registration file:
cd "C:\CMTKresults\CMTKreg
perl "C:\CMTKresults\CMTK\bin\munger" -b "C:\CMTKresults\CMTK\bin" -awr 01 -T 8 -s "template/template16.PIC" "images"
Everything appears to run smoothly. However, following the completion of the program I no longer get any file in the "reformatted" folder.
2) I previously was able to remedy this problem by running the following reformat script:
cd "C:\CMTKresults\CMTKreg"
perl "C:\CMTKresults\CMTK\bin\munger" -b "C:\CMTKresults\CMTK\bin" -r 01 -f 01 -T 8 -s "template/template16.PIC" "images"
which would then give me a reformatted .nrrd of the registered _01 image. However, recently, the above script fails. I receive a message from Windows saying "reformatx.exe has stopped working". If I view the problem details I see the following:
Problem signature:
Problem Event Name: APPCRASH
Application Name: reformatx.exe
Application Version: 0.0.0.0
Application Timestamp: 53dbd96b
Fault Module Name: MSVCR100.dll
Fault Module Version: 10.0.40219.1
Fault Module Timestamp: 4d5f0c22
Exception Code: 40000015
Exception Offset: 0008d6fd
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 1033
Additional Information 1: 6c7b
Additional Information 2: 6c7b33b39693521b9f38e6365f643500
Additional Information 3: 0510
Additional Information 4: 051044f64499f858b746874ce044c411
I have attempted to reinstall reformatx.exe and MSCVR100.dll with no change. If I say "close the program" the error message disappears but pops us a few more times before the program finally closes. If the check the "reformatted" folder, there are no images. In addition, changing the reformat script to:
cd "C:\CMTKresults\CMTKreg"
perl "C:\CMTKresults\CMTK\bin\munger" -b "C:\CMTKresults\CMTK\bin" -r 02 -f 01 -T 8 -s "template/template16.PIC" "images"
leads to identical results.
Interestingly, I am able to register 8-bit .PIC files to an 8-bit .PIC template without incident. Unfortunately I need to use 16-bit images.
Any suggestions would be greatly appreciated! My apologies if the solution is completely obvious.
Thank you!
May 10, 2016 10:05 PM | Greg Jefferis
Reformat script crashing
Dear Gabriella,
A few comments.
* The two munger command lines (1, 2 below) should both result in reformatting of your image (the -f 01 switch in the second command doesn�t change anything since the default channel used for registration is channel 01)
* You can add a verbose switch (-v) to the munger command lines and this might give additional details
* You can run the reformatx command line directly from the windows cmd.exe
reformatx -o myoutput.nrrd --floating myinput.nrrd mytemplate.nrrd myregistration.list
for testing purposes.
* You can use nrrd rather than pic 16 bit images (save from Fiji)
* If it is really *recently* that the script fails (and not that these new input images are somehow different � have you tested old input images?) then it obviously suggests an external change on your system.
Hope some of this might help. Best,
Greg.
A few comments.
* The two munger command lines (1, 2 below) should both result in reformatting of your image (the -f 01 switch in the second command doesn�t change anything since the default channel used for registration is channel 01)
* You can add a verbose switch (-v) to the munger command lines and this might give additional details
* You can run the reformatx command line directly from the windows cmd.exe
reformatx -o myoutput.nrrd --floating myinput.nrrd mytemplate.nrrd myregistration.list
for testing purposes.
* You can use nrrd rather than pic 16 bit images (save from Fiji)
* If it is really *recently* that the script fails (and not that these new input images are somehow different � have you tested old input images?) then it obviously suggests an external change on your system.
Hope some of this might help. Best,
Greg.
May 12, 2016 06:05 AM | Torsten Rohlfing
RE: Reformat script crashing
Hi Gabriella -
Let me just add my standard recommendation that I give whenever there are problems with CMTK on Windows: you may want to consider using the Cygwin binaries rather than the "native" Windows package.
The added cost of using Cygwin is that, obviously, you need to install it (see http://www.cygwin.com). But as a benefit, you typically get fewer bugs (since the Cygwin binaries are build using the same compilers as the ones for Linux and Mac), and also better performance (because I build CMTK using the free VisualStudio edition, which does not support OpenMP on multicore CPUs).
Best,
Torsten
Let me just add my standard recommendation that I give whenever there are problems with CMTK on Windows: you may want to consider using the Cygwin binaries rather than the "native" Windows package.
The added cost of using Cygwin is that, obviously, you need to install it (see http://www.cygwin.com). But as a benefit, you typically get fewer bugs (since the Cygwin binaries are build using the same compilers as the ones for Linux and Mac), and also better performance (because I build CMTK using the free VisualStudio edition, which does not support OpenMP on multicore CPUs).
Best,
Torsten
Feb 23, 2017 07:02 PM | Gabriella Sterne - Janelia Research Campus
RE: Reformat script crashing
Hi again,
I just wanted to share how I solved my issue in case others are running into anything similar. First, I switched to using 16-bit .nrrd files. Then, I began using the following script which combines the registration and reformat scripts per Greg's suggestion:
cd "C:\CMTKregistration"
perl "C:\CMTK\bin\munger" -b "C:\CMTK\bin" -awr 010203 -A "--accuracy 0.8" -W "--accuracy 0.8" -T 10 -s "JFRC2010_CLAHE_16bit.nrrd" "images"
The most important change I made was to include an accuracy statement(-A "--accuracy 0.8" -W "--accuracy 0.8") which improves the rate of successful registration without noticeably changing result quality. Another important change I made was to pre-process my images. Before running CMTK I prepare my images as follows: 1) rotate the image to be registered to as close to the same orientation as the template as possible 2) change the voxel size of the image to be registered so that the volume of the brain to be registered matches that of the template brain as closely as possible.
Thanks to Torsten as well for the suggestion about Cygwin--I haven't yet tried it but plan to in the future. I would like to see if they can improve the speed of registration as well as the rate of success.
Thanks again,
Gabriella
I just wanted to share how I solved my issue in case others are running into anything similar. First, I switched to using 16-bit .nrrd files. Then, I began using the following script which combines the registration and reformat scripts per Greg's suggestion:
cd "C:\CMTKregistration"
perl "C:\CMTK\bin\munger" -b "C:\CMTK\bin" -awr 010203 -A "--accuracy 0.8" -W "--accuracy 0.8" -T 10 -s "JFRC2010_CLAHE_16bit.nrrd" "images"
The most important change I made was to include an accuracy statement(-A "--accuracy 0.8" -W "--accuracy 0.8") which improves the rate of successful registration without noticeably changing result quality. Another important change I made was to pre-process my images. Before running CMTK I prepare my images as follows: 1) rotate the image to be registered to as close to the same orientation as the template as possible 2) change the voxel size of the image to be registered so that the volume of the brain to be registered matches that of the template brain as closely as possible.
Thanks to Torsten as well for the suggestion about Cygwin--I haven't yet tried it but plan to in the future. I would like to see if they can improve the speed of registration as well as the rate of success.
Thanks again,
Gabriella