Updating data input for VolumeMapper without copying data


I use the following pipeline:

ImageData -> SmartVolumeMapper -> … with 1 scalar component

To prevent copying data I want to retrieve a pointer to the image data array and give it to another interface
If I use ImageData->GetScalarPointer() I still have to use SmartVolumeMapper->SetInputData(ImageData), is that correct?
If so, is there a way to prevent this additional copy (e.g. by using another data container or accessing the VolumeMapper?) What would be the right way to inform the pipeline that the data has changed?

Thanks for your help,


The only copy happening here is a pointer copy, not a deep copy of the data, so you shouldn’t have to worry about the extra copying.

Invoke ImageData->Modified() after changing the scalars.

Thanks that solved my problems.

Have a nice day :slight_smile: