void clearImage()
        {
            if(imageView){
                Image image;
                image.clear();
                image.setSize(1,1,3);
                *image.pixels() = 0;
                imageView->setImage(image);
            }

            if(pointSetFromRangeCamera){
                pointSetFromRangeCamera->getOrCreateVertices()->clear();
                pointSetFromRangeCamera->getOrCreateColors()->clear();
            }

            if(pointSetFromRangeSensor){
                pointSetFromRangeSensor->getOrCreateVertices()->clear();
                pointSetFromRangeSensor->getOrCreateColors()->clear();
            }
        }
    void updatePointCloudFromRangeSensor()
        {
            if(!pointSetFromRangeSensor)
                return;

            SgVertexArray& disPoints = *pointSetFromRangeSensor->getOrCreateVertices();

            boost::mutex::scoped_lock lock(mtx);
            disPoints.resize(rangeSensorPoints.size());
            copy(rangeSensorPoints.begin(), rangeSensorPoints.end(), disPoints.begin());
            lock.unlock();

            pointSetFromRangeSensor->notifyUpdate();
        }
    void updatePointCloudFromRangeCamera()
        {
            if(!pointSetFromRangeCamera)
                return;

            SgVertexArray& disPoints = *pointSetFromRangeCamera->getOrCreateVertices();
            SgColorArray& disColors = *pointSetFromRangeCamera->getOrCreateColors();

            boost::mutex::scoped_lock lock(mtx);
            disPoints.resize(rangeCameraPoints.size());
            disColors.resize(rangeCameraColors.size());
            copy(rangeCameraPoints.begin(), rangeCameraPoints.end(), disPoints.begin());
            copy(rangeCameraColors.begin(), rangeCameraColors.end(), disColors.begin());
            lock.unlock();

            pointSetFromRangeCamera->notifyUpdate();

        }