Closed justbennet closed 4 years ago
I confirm I see the error too with v5 of Elastix. I'll look into it.
I think it's fixed (17e13fa8dd2b18fe26a63ad40ce9687ba2549b51). Please pull and try again.
@raacampbell Tremendous respose! Pulled and it runs without errors now.
Should the correction for the CORRECTED: alpha=0.2 image be a set of diagonal lines? I get this as output.
Hmm, yes looks like it should.
Whoops. Running through all the examples now. Just got this
=====================
Running example_2D_affineThenWarping
Shows the ability of elasix to chain together different transforms
Here we do an affine followed by a non-rigid
Starting registration
== Elastix parameters ==
Transform: AffineTransform
AutomaticTransformInitialization: 1
MaximumNumberOfIterations: 400
NumberOfSpatialSamples: 1000
Transform: BSplineTransform
MaximumNumberOfIterations: 1000
NumberOfSpatialSamples: 1000
SP_a: 4000
Error using validateElastixParam
Too many input arguments.
Error in elastix_parameter_write (line 82)
if validateElastixParam(userParam.(thisKey),valid)
Error in elastix (line 233)
elastix_parameter_write(paramFname{ii},paramFile,paramstruct{ii})
Error in example_2D_affineThenWarping (line 50)
[~,out]=elastix(lenaTrans,lena,[],'elastix_default.yml','paramstruct',p);
Error in RUN_ALL (line 15)
example_2D_affineThenWarping
Sorry to be the bearer of sad tidings, but the examples in transformix
also seem to be having a problem.
From applyLenaTransform2Dog
Error using endsWith
Unrecognized parameter name '.mhd'. Parameter name must be 'IgnoreCase'.
Error in transformix (line 328)
if endsWith(d.name,'.mhd')
Error in applyLenaTransform2Dog (line 29)
reg=transformix(umaTform,params);
Error in RUN_ALL (line 4)
applyLenaTransform2Dog
From applyLenaTransform2Dog_withParams
Error using endsWith
Unrecognized parameter name '.mhd'. Parameter name must be 'IgnoreCase'.
Error in transformix (line 328)
if endsWith(d.name,'.mhd')
Error in applyLenaTransform2Dog_withParams (line 29)
reg=transformix(umaTform,paramFiles,1);
Looks like transformSparsePoints_forward
runs without error.
Can you tell me which version of MATLAB you are on? I think my examples were all written for an older version.
I am using R2018b, but we'll likely be updating to R2019b or R2020a in September. I could possibly give this a try with R2016b if you need to check version compatibility.
I'm on 2019b. Don't worry about the older versions, I think it's likely it works there and anyway life needs to move forward. I'll run all the examples and update everything and/or make it a little more robust to version changes.
@raacampbell Tremendous respose! Pulled and it runs without errors now.
Should the correction for the CORRECTED: alpha=0.2 image be a set of diagonal lines? I get this as output.
I think that diagonal example has an element of randomness to it. I also get something very garbled but in a different way.
Thanks for looking into this. I'm happy to rerun all the examples on my end if you want confirmation.
It was the same bug, actually. For some reason the .raw
files were being passed on to later functions instead of the .mhd
. The solution is to remove the .raw
from the results of dir
(d82972212e579f0b9ed933e777d738090e062c9f). I don't know why this ever worked correctly, TBH. Odd.
I also found some other bugs in the examples, which were old. They should all run now.
Thanks, again. Did you look at the example_invert
? I get this,
transformix is started at Tue Jul 7 21:30:15 2020.
which transformix: transformix
transformix runs at: gl-build.arc-ts.umich.edu
Linux 3.10.0-1062.9.1.el7.x86_64 (x64), #1 SMP Fri Dec 6 15:49:49 UTC 2019
with 191709 MB memory, and 36 cores @ 2999 MHz.
Running transformix with parameter file "/tmp/transformix_200707173014_79220733/TransformParameters.1.txt".
Reading the elastix parameters from file ...
Installing all components.
InstallingComponents was successful.
ELASTIX version: 5.000
Command line options from ElastixBase:
-in unspecified, so no input image specified
-out /tmp/transformix_200707173014_79220733/
-threads unspecified, so all available threads are used
-tp /tmp/transformix_200707173014_79220733/TransformParameters.1.txt
-def /tmp/transformix_200707173014_79220733/tmp_moving.txt
-jac unspecified, so no det(dT/dx) computed
-jacmat unspecified, so no dT/dx computed
Calling all ReadFromFile()'s ...
WARNING: The parameter "UseBinaryFormatForTransformationParameters", requested at entry number 0, does not exist at all.
The default value "false" is used instead.
Reading the elastix parameters from file ...
WARNING: The parameter "UseBinaryFormatForTransformationParameters", requested at entry number 0, does not exist at all.
The default value "false" is used instead.
Calling all ReadFromFile()'s took 0.010078 s
Transforming points ...
The transform is evaluated on some points, specified in the input point file.
Reading input point file: /tmp/transformix_200707173014_79220733/tmp_moving.txt
Input points are specified in world coordinates.
Number of specified input points: 93
The input points are transformed.
The transformed points are saved in: /tmp/transformix_200707173014_79220733/outputpoints.txt
Transforming points done, it took 0.00s
Compute determinant of spatial Jacobian ...
The command-line option "-jac" is not used, so no det(dT/dx) computed.
Computing determinant of spatial Jacobian done, it took 0.00s
Compute spatial Jacobian (full matrix) ...
The command-line option "-jacmat" is not used, so no dT/dx computed.
Computing spatial Jacobian done, it took 0.00s
transformix has finished at Tue Jul 7 21:30:15 2020.
Total time elapsed: 0.1s.
which doesn't look quite right. I don't know what I'm doing -- just installing for someone else, so if that is correct, sorry for the last bit of noise.
Thanks a bunch for looking at this!
Yes, I did test that. Just tested again and it works. You should see:
I don't see the warning you see but the last bunch of stuff otherwise looks similar:
transformix is started at Wed Jul 8 00:15:15 2020.
which transformix: transformix
transformix runs at: cubiecube.local
Mac OS X 10.13.6 (x64), 17G13035
with 65536 MB memory, and 6 cores @ 4009 MHz.
Running transformix with parameter file "/private/var/folders/42/5jg5ygkn599dcytddlgdv_7h0000gn/T/transformix_200708001515_90579194/tmp_params_2.txt".
Reading the elastix parameters from file ...
Installing all components.
InstallingComponents was successful.
ELASTIX version: 5.000
Command line options from ElastixBase:
-in unspecified, so no input image specified
-out /private/var/folders/42/5jg5ygkn599dcytddlgdv_7h0000gn/T/transformix_200708001515_90579194/
-threads unspecified, so all available threads are used
-tp /private/var/folders/42/5jg5ygkn599dcytddlgdv_7h0000gn/T/transformix_200708001515_90579194/tmp_params_2.txt
-def /private/var/folders/42/5jg5ygkn599dcytddlgdv_7h0000gn/T/transformix_200708001515_90579194/tmp_moving.txt
-jac unspecified, so no det(dT/dx) computed
-jacmat unspecified, so no dT/dx computed
Calling all ReadFromFile()'s ...
Reading the elastix parameters from file ...
Calling all ReadFromFile()'s took 0.006050 s
Transforming points ...
The transform is evaluated on some points, specified in the input point file.
Reading input point file: /private/var/folders/42/5jg5ygkn599dcytddlgdv_7h0000gn/T/transformix_200708001515_90579194/tmp_moving.txt
Input points are specified in world coordinates.
Number of specified input points: 83
The input points are transformed.
The transformed points are saved in: /private/var/folders/42/5jg5ygkn599dcytddlgdv_7h0000gn/T/transformix_200708001515_90579194/outputpoints.txt
Transforming points done, it took 0.00s
Compute determinant of spatial Jacobian ...
The command-line option "-jac" is not used, so no det(dT/dx) computed.
Computing determinant of spatial Jacobian done, it took 0.00s
Compute spatial Jacobian (full matrix) ...
The command-line option "-jacmat" is not used, so no dT/dx computed.
Computing spatial Jacobian done, it took 0.00s
transformix has finished at Wed Jul 8 00:15:15 2020.
Total time elapsed: 0.1s.
Huh. Not sure what happened. I seem to be all good now, too. Thanks. I will close this now.
I am getting an error when I run the
example_2D_affine_alpha
and other examples.This is with a recently download version of
elastix
,I don't think this is an error from
elastix
, as I can copy the command being run,from the output and run it from the command line with the following results.
Is this perhaps something to do with a new version of
elastix
? Are the warnings benign?Any help you might provide would be apprecitated.
-- bennet