[ImageJ-devel] [fiji-devel] Re: equal iteration order
Tobias Pietzsch
pietzsch at mpi-cbg.de
Wed Mar 21 14:05:05 CDT 2012
On 03/21/2012 07:46 PM, Stephan Preibisch wrote:
> I agree, it seems unlikely that it is called so often so that storing it make sense. And even if, nothing stops you from keeping this instance yourself ...
True. I did that. IterationOrder objects are now created when they are
needed, in iterationOrder().
I also moved the equalIterationOrder() implementation up to AbstractImg
(in anticipation of removing it one of these days...)
> We should also replace the return types in the specific classes with their actual type. E.g. ArrayImg should return a FlatIterationOrder ...
Good point. It would be cool if you do it.
best regards,
Tobias
>
> Should I do it?
>
> Steffi
>
>
> On Mar 21, 2012, at 14:38 , Albert Cardona wrote:
>
>> El 21 de març de 2012 14:21, Tobias Pietzsch<pietzsch at mpi-cbg.de> ha escrit:
>>> On 03/21/2012 07:11 PM, Albert Cardona wrote:
>>>>
>>>> Tobias,
>>>>
>>>> considering that most everyday images will use FlatIterationOrder, I
>>>> suggest making FlatIterationOrder a singleton and then the
>>>> equalIterationOrder of ArrayImg, ListImg, etc would return that
>>>> unique, shared instance.
>>>>
>>>> I agree with Preibisch that this operation is done almost never. No
>>>> point in adding an extra object in there for nothing.
>>>>
>>>> Albert
>>>
>>>
>>> Hi Albert,
>>>
>>> FlatIterationOrder also is defined with respect to the Interval of the
>>> image. Two images only have equal iteration order, when they have the
>>> same number of dimensions, the same size, and the same minimum. The idea
>>> is that you could at any point localize Cursors that you move in unison
>>> through two compatible images and they would give you the same location.
>>>
>>> A 3D and a 2D image never have the same iteration order.
>>>
>>> So a singleton will not work.
>>
>>
>> I had misunderstood it as a flag. I see now that it includes all the
>> comparisons that equalIterationOrder used to have.
>> No point in storing the object. I would create it new always.
>>
>> Albert
>>
>>
>>
>> --
>> http://albert.rierol.net
>> http://www.ini.uzh.ch/~acardona/
>>
>> --
>> Please avoid top-posting, and please make sure to reply-to-all!
>>
>> Mailing list web interface: http://groups.google.com/group/fiji-devel
>
More information about the ImageJ-devel
mailing list