Eager mode for ReadImageFilter
I was wondering if one could enable/disable a specific behavior of the processing workflow. In particular I am wondering if the reading and the processing operations could be done in parallel in an OTB pipeline. This could be an interesting feature when accessing the input takes a while, e.g. when processing remote images (/vsicurl/http://.../image.tif). Indeed one region could be downloaded while another one is processed.
The typical processing flow in OTB is the following (we consider a simple pipeline composed of 1 reader --> 1 filter --> 1 writer):
- Propagates the filter's requested output region to the reader. At the end of this step, the filter knows which region of the input it has to fetch.
- Read the input data over this requested region
- Process the requested region
- Write the output
It's sequential. What if we could run step 2 and 3 in parallel? I am just wondering if that is somehow possible. The only thing to do is for the reader, to not wait until the filter ask him the data, to go grab it. But this supposes that the reader knows in advance what the next requested region would be. I am wondering if somehow this is doable in the ITK framework? I'll ask for toughs here, then I guess I will ask the ITK community... Thanks,
Rémi