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
put!(algo::AbstractReconstructionAlgorithm, data) =error("$(typeof(algo)) must implement put!")
9
-
take!(algo::AbstractReconstructionAlgorithm) =error("$(typeof(algo)) must implement take!")
8
+
put!(algo::AbstractImageReconstructionAlgorithm, data) =error("$(typeof(algo)) must implement put!")
9
+
take!(algo::AbstractImageReconstructionAlgorithm) =error("$(typeof(algo)) must implement take!")
10
10
11
11
export reconstruct
12
-
functionreconstruct(algo::T, u) where {T<:AbstractReconstructionAlgorithm}
12
+
functionreconstruct(algo::T, u) where {T<:AbstractImageReconstructionAlgorithm}
13
13
put!(algo, u)
14
14
returntake!(algo)
15
15
end
16
16
17
17
export process
18
18
# process(algoT::Type{T}, ...) as pure helper functions
19
19
# Overwrite process(algo, ...) to mutate struct based on helper function result
20
-
process(algoT::Type{T}, data, param::AbstractReconstructionAlgorithmParameter) where {T<:AbstractReconstructionAlgorithm} =error("No processing defined for algorithm $T with parameter $(typeof(param))")
process(algoT::Type{T}, data, param::AbstractImageReconstructionParameter) where {T<:AbstractImageReconstructionAlgorithm} =error("No processing defined for algorithm $T with parameter $(typeof(param))")
functiontoPlan(::Type{T}, params::AbstractImageReconstructionParameter) where {T<:AbstractImageReconstructionAlgorithm}
227
227
plan =RecoPlan(T)
228
228
plan[:parameter] =toPlan(plan, params)
229
229
return plan
@@ -305,19 +305,19 @@ function loadPlan!(dict::Dict{String, Any}, modDict)
305
305
error("Not implemented yet")
306
306
end
307
307
end
308
-
functionloadPlan!(plan::RecoPlan{T}, dict::Dict{String, Any}, modDict) where {T<:AbstractReconstructionAlgorithm}
308
+
functionloadPlan!(plan::RecoPlan{T}, dict::Dict{String, Any}, modDict) where {T<:AbstractImageReconstructionAlgorithm}
309
309
temp =loadPlan!(dict["parameter"], modDict)
310
310
parent!(temp, plan)
311
311
setvalue!(plan, :parameter, temp)
312
312
return plan
313
313
end
314
-
functionloadPlan!(plan::RecoPlan{T}, dict::Dict{String, Any}, modDict) where {T<:AbstractReconstructionAlgorithmParameter}
314
+
functionloadPlan!(plan::RecoPlan{T}, dict::Dict{String, Any}, modDict) where {T<:AbstractImageReconstructionParameter}
315
315
for name inpropertynames(plan)
316
316
t =type(plan, name)
317
317
param =missing
318
318
key =string(name)
319
319
ifhaskey(dict, key)
320
-
if t <:AbstractReconstructionAlgorithm|| t <:AbstractReconstructionAlgorithmParameter
320
+
if t <:AbstractImageReconstructionAlgorithm|| t <:AbstractImageReconstructionParameter
321
321
param =loadPlan!(dict[key], modDict)
322
322
parent!(param, plan)
323
323
else
@@ -328,7 +328,7 @@ function loadPlan!(plan::RecoPlan{T}, dict::Dict{String, Any}, modDict) where {T
328
328
end
329
329
return plan
330
330
end
331
-
loadPlanValue(parent::Type{T}, field::Symbol, type, value, modDict) where T <:AbstractReconstructionAlgorithmParameter=loadPlanValue(type, value, modDict)
331
+
loadPlanValue(parent::Type{T}, field::Symbol, type, value, modDict) where T <:AbstractImageReconstructionParameter=loadPlanValue(type, value, modDict)
0 commit comments