Preprocessing OpenNI/NiTE depth frames

Hi, I would like to process a depth frame and use the results with NiTE skeleton tracking. I succesfully create an openni depth stream and an nite::UserTracker from the same openni device.

I manipulate a depth frame after a call to openni::VideoStream::readFrame (before nite::UserTracker::readFrame) then render the results from the same depth frame object and I can see those changes but when I render the depth frame obtained from nite::UserTrackerFrameRef::getDepthFrame instead I do not see any changes, so it seems like my changes have no effect to NiTE.

I just noitced openni::VideoFrameRef::getData returns const void* but I’ve seen code in another project const_cast away and does a similliar thing to what I’m trying to do but I don’t know if this program works correctly as I haven’t tested it.

Is what I’m trying to do possible? I’m using a libfreenect2 openni driver if this makes any difference.