[Insight-developers] Changing ImageRegionMultidimensionalSplitter
Bradley Lowekamp
blowekamp at mail.nih.gov
Sat Aug 15 13:28:48 EDT 2009
Hello,
As shown in the failing test code:
http://public.kitware.com/cgi-bin/viewcvs.cgi/Testing/Code/BasicFilters/itkStreamingImageFilterTest3.cxx?revision=1.1&root=Insight&view=markup
This is a typical usage for this splitter. It is only used when
explicitly set for the itkStreamingImageFilter. This splitting policy
is not used by default any place.
I have completed the revised multi-dimensional splitting algorithm. It
solves all the issues with the current methodology, and the all the
tests pass. I will post it as a patch to the related Matis bug, and
comment out these test so that they will not be run.
Brad
On Aug 15, 2009, at 12:55 PM, Bill Lorensen wrote:
> Eventually, we could add alternate splitting policies, keeping the
> current one as a default. For now, I agree that the documentation
> should be fixed.
>
> And, we need to get the failing tests to pass. They are hiding other
> failures.
>
> Bill
>
> On Sat, Aug 15, 2009 at 12:52 PM, Luis
> Ibanez<luis.ibanez at kitware.com> wrote:
>> I would vote for
>>
>> a) fixing the documentation. (which is backward compatible), and
>>
>> b) if we need an alternative splitting algorithm:
>> then refactor this in ITK 4.0.
>>
>>
>> My 2 cents,
>>
>>
>> Luis
>>
>>
>> --------------------------------------------------------------------------------
>>
>> On Wed, Aug 12, 2009 at 10:12 AM, Bradley Lowekamp <blowekamp at mail.nih.gov
>> >
>> wrote:
>>>
>>> Hello,
>>> I am looking for agreement that this will be a good solution, with
>>> acceptable backwards compatibility.
>>> Looking into the following bug:
>>> http://www.itk.org/Bug/view.php?id=8524
>>> I discovered the methods do not meet the documentation. And that the
>>> general approach to multi-dimensional splitting can not meet the
>>> requirements of the documentation. This class is designed to work
>>> with the
>>> StreamingImageFilter, and is currently not functional under many
>>> conditions.
>>> To illustrate one of the problem consider the case where the
>>> Region to be
>>> split is [100,100,1] and the requested number of splits is 100:
>>>
>>> http://www.cdash.org/CDash/viewCoverageFile.php?buildid=400312&fileid=10857899
>>> When the number of splits is reduced we will not get the same
>>> number of
>>> splits for the two methods. These are the lines not covered.
>>>
>>> /** How many pieces can the specifed region be split? A given
>>> region
>>> * cannot always be divided into the requested number of
>>> pieces. For
>>> * instance, if the numberOfPieces exceeds the number of pixels
>>> along
>>> * a certain dimensions, then some splits will not be possible.
>>> This
>>> * method returns a number less than or equal to the requested
>>> number
>>> * of pieces. */
>>> virtual unsigned int GetNumberOfSplits(const RegionType ®ion,
>>> unsigned int
>>> requestedNumber);
>>> /** Get a region definition that represents the ith piece a
>>> specified
>>> region.
>>> * The "numberOfPieces" specified should be less than or equal
>>> to what
>>> * GetNumberOfSplits() returns. */
>>> virtual RegionType GetSplit(unsigned int i, unsigned int
>>> numberOfPieces,
>>> const RegionType ®ion);
>>>
>>> -Proposed Solution-
>>> 1) Change Documentation
>>> /** Get a region definition that represents the ith piece a
>>> specified
>>> region.
>>> * The "numberOfPieces" specified must be equal to what
>>> * GetNumberOfSplits() returns. */
>>> virtual RegionType GetSplit(unsigned int i, unsigned int
>>> numberOfPieces,
>>> const RegionType ®ion);
>>> 2) New algorithm for Multi-dimensional splitting
>>> Instead of taking the nth root and shrinking the splits in each
>>> dimension,
>>> the new approach will be:
>>> iteratively split the dimension who's splitted region is the
>>> largest. This
>>> will be reproducible between the two methods.
>>>
>>> Any problems with this solution?
>>> Thanks,
>>> Brad
>>>
>>> ========================================================
>>>
>>> Bradley Lowekamp
>>>
>>> Lockheed Martin Contractor for
>>>
>>> Office of High Performance Computing and Communications
>>>
>>> National Library of Medicine
>>>
>>> blowekamp at mail.nih.gov
>>>
>>>
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the ITK FAQ at:
>>> http://www.itk.org/Wiki/ITK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.itk.org/mailman/listinfo/insight-developers
>>>
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-developers
>>
>>
More information about the Insight-developers
mailing list