Developer Meetings/20120515

From Slicer Wiki
Jump to: navigation, search
Home < Developer Meetings < 20120515

Attendees:

To discuss

= Volume streaming and MRML

From Laurent:

Hello,

I've seen Andriy is using vtkMRMLDiffusionWeightedImageNode to store several volumes in his 4D module.
I would like to use it with the same purpose, but with streaming volumes.

The major difference is I don't know number of volumes I will receive. I looked at the vtkMRMLDiffusionWeightedImageNode and, when we call SetNumberOfGradient, it seems, it's reseting BValue array and gradient array. 

If I understood it, we use gradient array to store our ImageData. 

My first thought has been, when I  receive a volume, increase the value of NumberOfGradients, then, add the new volume in the gradient array.
However, if SetNumberOfGradient is reseting these arrays, this will erase my previous volumes store in it.

I still can copy them before, then SetNumberOfGradient, then put them in the array (with the new size) and add my new volume at the end, but this is not efficient at all (especially when number of volumes is increasing).

Please, could you let me know if I misunderstood something. If not, is there any workaround ?

Thank you.

Conclusion