Subversion Repositories seema-scanner

Rev

Rev 248 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 248 Rev 250
Line 78... Line 78...
78
    Eigen::Affine3f Transform;
78
    Eigen::Affine3f Transform;
79
    cv::cv2eigen(TransformCV, Transform.matrix());
79
    cv::cv2eigen(TransformCV, Transform.matrix());
80
 
80
 
81
    visualizer->updatePointCloudPose(stringId, Transform.inverse());
81
    visualizer->updatePointCloudPose(stringId, Transform.inverse());
82
 
82
 
83
    this->repaint();
83
    this->update();
84
 
84
 
85
    emit pointCloudDataChanged();
85
    emit pointCloudDataChanged();
86
 
86
 
87
}
87
}
88
 
88
 
Line 98... Line 98...
98
        visualizer->addPointCloud(pointCloud.pointCloud, *colorHandler, stringId);
98
        visualizer->addPointCloud(pointCloud.pointCloud, *colorHandler, stringId);
99
        visualizer->setPointCloudRenderingProperties(
99
        visualizer->setPointCloudRenderingProperties(
100
                    pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 2.0, stringId);
100
                    pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 2.0, stringId);
101
     }
101
     }
102
 
102
 
103
    this->repaint();
103
    this->update();
104
    emit pointCloudDataChanged();
104
    emit pointCloudDataChanged();
105
 
105
 
106
}
106
}
107
 
107
 
108
void SMPointCloudWidget::removePointCloud(int id){
108
void SMPointCloudWidget::removePointCloud(int id){
Line 110... Line 110...
110
    std::string stringId = QString::number(id).toStdString();
110
    std::string stringId = QString::number(id).toStdString();
111
//    std::string stringId = QString("id%1").arg(id).toStdString();
111
//    std::string stringId = QString("id%1").arg(id).toStdString();
112
 
112
 
113
    visualizer->removePointCloud(stringId);
113
    visualizer->removePointCloud(stringId);
114
 
114
 
115
    this->repaint();
115
    this->update();
116
    emit pointCloudDataChanged();
116
    emit pointCloudDataChanged();
117
 
117
 
118
}
118
}
119
 
119
 
120
void SMPointCloudWidget::removeAllPointClouds(){
120
void SMPointCloudWidget::removeAllPointClouds(){
Line 192... Line 192...
192
    lineCoefficients.values[4] = v[1];
192
    lineCoefficients.values[4] = v[1];
193
    lineCoefficients.values[5] = v[2];
193
    lineCoefficients.values[5] = v[2];
194
    visualizer->removeShape("line");
194
    visualizer->removeShape("line");
195
    visualizer->addLine(lineCoefficients, "line");
195
    visualizer->addLine(lineCoefficients, "line");
196
 
196
 
197
    this->repaint();
197
    this->update();
-
 
198
 
-
 
199
}
-
 
200
 
-
 
201
void SMPointCloudWidget::update(){
198
 
202
 
-
 
203
    this->GetRenderWindow()->Render();
-
 
204
    QVTKOpenGLWidget::update();
199
}
205
}
200
 
206
 
201
SMPointCloudWidget::~SMPointCloudWidget(){
207
SMPointCloudWidget::~SMPointCloudWidget(){
202
 
208
 
203
    //delete visualizer;
209
    //delete visualizer;