Open Xanthorapedia opened 5 years ago
The problem seems to be that when CopyRAI
is looking for suitable computers, IIToIIParallel
instead of IIToRAIParallel
is selected since the second argument can be cast into II
, which outputs an II
instead of RAI
.
A similar problem occurs when calling ops.map()
with arguments being both II
and RAI
but cast into RAI
. The selected method signature is map(RAI, RAI) -> RAI
, but op matching always returns IIToII
-ish ops, which returns an II
.
When I was trying to copy an image converted with LUT to a freshly created
Img
, the following happens:Output:
The cause seems to me that while matching ops, a
ConvertedRandomAccessibleInterval
is recognized as directly convertible to anII
inDefaultOpMatchingService.canConvert()
and this leads the op service to believe thatIIToIIParallel
is a suitable op for the task. I haven't dug deeper than that. Any insights?