Add streaming base classes and streaming statistics#855
Add streaming base classes and streaming statistics#855blowekamp merged 16 commits intoInsightSoftwareConsortium:masterfrom
Conversation
|
Changing the base class for the Please review the style interface for the A backwards incompatibility change introduced is that the |
85e2edd to
d12d5c0
Compare
|
Looking good so far. |
|
I have completed refactoring the classes. I'll write some detailed/corner cases tomorrow to wrap things up. @romangrothausmann Please check out this PR and test the classes. Thank you! |
zivy
left a comment
There was a problem hiding this comment.
Some comments in line. Still a review in process (will continue tomorrow).
|
Many thanks @blowekamp, this is a very great contribution! Your former module for ITK4 has helped us a lot when we were in the need to get statistics of very large datasets and we worried about its missing compatibility with the transition to ITK-5. With this PR this would be solved and its future maintenance ensured. In addition it is great that this PR also includes the ideas of blowekamp/itkStreamingSinc#3. |
zivy
left a comment
There was a problem hiding this comment.
Added some more comments / questions. Nothing that is too critical.
d12d5c0 to
87f4327
Compare
The StreamingProcesObject provide a pipeline mechanics to update the input's pipeline with a sequence of regions and generically execute them in a StreamedGenerateData method.
Adding the ImageSink base class which provides support for streaming and multi-threading on an input image. Generally this is used when transforming an image into something like computing statistics, or a RLE of an image.
87f4327 to
d44a529
Compare
Add functionality, to compute the label statistics of labeled image in a streamed or out-of-core way. For example, from a very large segmented image the bounding boxes can be computed to determine a region of interest to load.
And the same change from ImageToImgeFilter to verify that input images are congruent in physical space by default.
Change the base class from ImageTransformer to ImageSink and expose SetNumberOfStreamDivisions method to enable streamed generation of Histograms. Also updated the way decorated input are created to automatically create the decorator inside the Set method. If the automatic computation of the minimum and maximum is enabled then streaming is disabled by the overloaded GetNumberOfInputRequestedRegions method.
The ImageSinc can be used as a replacement.
Use the double graft best practice for mini-pipelines in the NormalizeImageFilter.
d44a529 to
a17bb6e
Compare
a17bb6e to
23da91e
Compare
|
This patch should be ready to go. I'm just refreshing the CI after one VNL test failure due to time profiling. |
|
Trying to test this with my ITK-CLIs and am hitting the backwards incompatibility that the StatisticsImageFilter no longer produce an image as output. What would be the recommended way to adjust the code accordingly? Basically I would replace e.g. by Is there a more elegant way to trigger stat to update if adder is updated, similar to how it was possible before? |
|
Great, thank you for testing! I take it there is no streaming involved here. All you should have to do is simple call |
|
Thanks for the feedback. No, no streaming there. I'll just use the additional That originates from: |
|
Here is a PR to improve that filter: InsightSoftwareConsortium/ITKParabolicMorphology#26 |
to be compatible with InsightSoftwareConsortium#855
to be compatible with InsightSoftwareConsortium#855
to be compatible with InsightSoftwareConsortium#855
|
@blowekamp I'm getting warnings like: when using ImageToHistogramFilter of this PR with my |
|
@blowekamp I am also getting new warnings for every run of my application: |
`StatisticsImageFilter` is no longer an `ImageToImageFilter`, so it no longer supports `GetOutput()`, from pull request InsightSoftwareConsortium/ITK#855 InsightSoftwareConsortium/ITK@0efe8db "ENH: Add streaming support to StatisticsImageFilter", May 15, 2019
`StatisticsImageFilter` is no longer an `ImageToImageFilter`, so it no longer supports `GetOutput()`, from pull request InsightSoftwareConsortium/ITK#855 InsightSoftwareConsortium/ITK@0efe8db "ENH: Add streaming support to StatisticsImageFilter", May 15, 2019
…reamingBaseClasses Add streaming base classes and streaming statistics
to be compatible with InsightSoftwareConsortium#855
No description provided.