Closed zhikai-liu closed 8 years ago
That error means that the number of deformations doesn't match the temporal size of img
. Can you show us length(ϕs)
and size(img, "t")
?
My guess is that you ran the earlier step of the registration (the one that produced fileout
) with a different img
.
Oh, I see. Thanks! I got it.
By the way, how can I know which path has the function I want to use in Julia?
For example, I find save_header
is not defined when I run the script. How can I find the path?
In this case, the fact that it's written ImagineFormat.save_header
means that it's in the ImagineFormat.jl
package.
But in general, tools like @which foo(x,y)
and @edit foo(x,y)
are nice ways to discover which function is being used for a task.
But it seems there is no function called save_header
in ImagineFormat
I searched the functions following ImagineFormat.
, there are
BigEndian convert parse_bittypename Endian endian_dict parse_endian LittleEndian eval parse_header Micron field_key_dict parse_quantity _unit_string_dict float64_or_empty parse_quantity_or_empty bitname_dict imagine2nrrd parse_vector_int compound_fields nrrd_endian_dict
Oh, I may not have tagged an official release lately. Try Pkg.checkout("ImagineFormat")
to get the very latest. (If you're curious, you can use gitk
from within any repository directory to see how the tags line up with official releases.)
Sorry about the confusion.
I guess that is not the issue It says
INFO: No packages to install, update or remove
Sorry, I restarted julia and found it.. Thanks!
Errors when I try to warp the images in writing the .cam file.
Line 18 is
open(string(basename, ".cam"), "w") do file warp!(Float32, file, img, ϕs; nworkers=3)
And
ϕs
is defined byϕs = medfilt(griddeformations(u, knots), 3)
u
andknots
are defined byu = load(fileout, "u") roi = load(fileout2, "roi") knots = load(fileout2, "knots")