How to perform morphological closing in VTK

Hi all,
I am attempting to perform morphological closing on a binary 3D volume (all voxels have values of 0 or 1). It looks like I can use the method vtkImageOpenClose3D for this:

However, I don’t understand exactly what I should set the values of OpenValue and CloseValue to:


In addition, this blog post ( uses vtkImageDilateErode3D for morphological closing instead of vtkImageOpenClose3D. Is vtkImageOpenClose3D equivalent to running vtkImageDilateErode3D twice (i.e., once for dilation and once for erosion)?
thank you very much,