Edit Image Data in Scalar Volume Node

Hello,

I am working on an extension where I am instantiating a new scalar volume node and then want to edit the values of the data for use later. I notice when I instantiate a new node that there is no image data, so I was hoping for guidance on how to set up a 3d array that is blank and then edit that with something similar to the SetScalarComponentFromDouble method.

Thanks in advance!

https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Create_a_new_volume