You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
julia>optimize!(ϕs_new, ϕsi, ap, λt, mmisc);
ERROR: Not yet implemented for incommensurate knots
in compose at /home/donghoon/.julia/v0.4/BlockRegistration/src/RegisterDeformation.jl:296in penalty! at /home/donghoon/.julia/v0.4/BlockRegistration/src/RegisterPenalty.jl:85in _penalty! at /home/donghoon/.julia/v0.4/BlockRegistration/src/RegisterPenalty.jl:134in penalty! at /home/donghoon/.julia/v0.4/BlockRegistration/src/RegisterPenalty.jl:112in penalty! at /home/donghoon/.julia/v0.4/BlockRegistration/src/RegisterPenalty.jl:123in eval_grad_f at /home/donghoon/.julia/v0.4/BlockRegistration/src/RegisterOptimize.jl:548in anonymous at /home/donghoon/.julia/v0.4/BlockRegistration/src/RegisterOptimize.jl:520in gnorm at /home/donghoon/.julia/v0.4/Optim/src/interior.jl:400in interior at /home/donghoon/.julia/v0.4/Optim/src/interior.jl:330in optimize! at /home/donghoon/.julia/v0.4/BlockRegistration/src/RegisterOptimize.jl:526
Below is more detailed explanation:
I was trying to optimize a deformation matrix ϕs_new.
julia>optimize!(ϕs_new, ϕs, ap, λt, mmis)
ERROR: MethodError:`maxshift` has no method matching maxshift(::Float32)
in optimize! at /home/donghoon/.julia/v0.4/BlockRegistration/src/RegisterOptimize.jl:522
Here, maxshift requires a type like this: CachedInterpolations.CachedInterpolation{RegisterCore.NumDenom{Float32},3,7,(5,5,3)}
The type of mmis was Array{Float32,8}.
Therefore, Tim converted mmis.
using Base.tail
ND = NumDenom{eltype(mmis)}
mmisr =reinterpret(ND, mmis, tail(size(mmis)));
N =ndims(ap)
mmisc =cachedinterpolators(mmisr, N, ntuple(d->(size(mmisr,d)+1)>>1, N));
There were still errors:
julia>optimize!(ϕs_new, ϕs, ap, λt, mmisc)
ERROR: MethodError:`compose` has no method matching compose(::RegisterDeformation.GridDeformation{Float32,3,Array{FixedSizeArrays.Vec{3,Float32},3},LinSpace{Float64}}, ::RegisterDeformation.GridDeformation{Float32,3,Array{FixedSizeArrays.Vec{3,Float32},3},LinSpace{Float64}})
Closest candidates are:
compose{T1,T2,N,A<:Interpolations.AbstractInterpolation{T,N,IT<:Union{Interpolations.InterpolationType,Tuple{Vararg{Interpolations.InterpolationType}}},GT<:Union{Interpolations.GridType,Interpolations.NoInterp,Tuple{Vararg{Union{Interpolations.GridType,Interpolations.NoInterp}}}}}}(::RegisterDeformation.GridDeformation{T1,N,A<:Interpolations.AbstractInterpolation{T,N,IT<:Union{Interpolations.InterpolationType,Tuple{Vararg{Interpolations.InterpolationType}}},GT<:Union{Interpolations.GridType,Interpolations.NoInterp,Tuple{Vararg{Union{Interpolations.GridType,Interpolations.NoInterp}}}}},L}, ::RegisterDeformation.GridDeformation{T2,N,A<:AbstractArray{T,N},L})
compose{T,N}(::Function, ::RegisterDeformation.GridDeformation{T,N,A<:AbstractArray{T,N},L})
in penalty! at /home/donghoon/.julia/v0.4/BlockRegistration/src/RegisterPenalty.jl:85in _penalty! at /home/donghoon/.julia/v0.4/BlockRegistration/src/RegisterPenalty.jl:134in penalty! at /home/donghoon/.julia/v0.4/BlockRegistration/src/RegisterPenalty.jl:112in penalty! at /home/donghoon/.julia/v0.4/BlockRegistration/src/RegisterPenalty.jl:123in eval_grad_f at /home/donghoon/.julia/v0.4/BlockRegistration/src/RegisterOptimize.jl:548in anonymous at /home/donghoon/.julia/v0.4/BlockRegistration/src/RegisterOptimize.jl:520in gnorm at /home/donghoon/.julia/v0.4/Optim/src/interior.jl:400in interior at /home/donghoon/.julia/v0.4/Optim/src/interior.jl:330in optimize! at /home/donghoon/.julia/v0.4/BlockRegistration/src/RegisterOptimize.jl:526
julia>optimize!(ϕs_new, ϕsi, ap, λt, mmisc);
ERROR: Not yet implemented for incommensurate knots
in compose at /home/donghoon/.julia/v0.4/BlockRegistration/src/RegisterDeformation.jl:296in penalty! at /home/donghoon/.julia/v0.4/BlockRegistration/src/RegisterPenalty.jl:85in _penalty! at /home/donghoon/.julia/v0.4/BlockRegistration/src/RegisterPenalty.jl:134in penalty! at /home/donghoon/.julia/v0.4/BlockRegistration/src/RegisterPenalty.jl:112in penalty! at /home/donghoon/.julia/v0.4/BlockRegistration/src/RegisterPenalty.jl:123in eval_grad_f at /home/donghoon/.julia/v0.4/BlockRegistration/src/RegisterOptimize.jl:548in anonymous at /home/donghoon/.julia/v0.4/BlockRegistration/src/RegisterOptimize.jl:520in gnorm at /home/donghoon/.julia/v0.4/Optim/src/interior.jl:400in interior at /home/donghoon/.julia/v0.4/Optim/src/interior.jl:330in optimize! at /home/donghoon/.julia/v0.4/BlockRegistration/src/RegisterOptimize.jl:526
The text was updated successfully, but these errors were encountered:
Pleae help me to solve this error:
Below is more detailed explanation:
I was trying to optimize a deformation matrix
ϕs_new
.Here,
maxshift
requires a type like this:CachedInterpolations.CachedInterpolation{RegisterCore.NumDenom{Float32},3,7,(5,5,3)}
The type of
mmis
wasArray{Float32,8}
.Therefore, Tim converted
mmis
.There were still errors:
It was something related to interpolation:
Still, all error have not been disappeared.
The text was updated successfully, but these errors were encountered: