fix: fix image rorate bug
This commit is contained in:
@@ -42,6 +42,7 @@ DicomImageView::DicomImageView(QWidget *parent)
|
|||||||
// create layout for main container
|
// create layout for main container
|
||||||
QGridLayout *controlLayout = new QGridLayout(wrapper);
|
QGridLayout *controlLayout = new QGridLayout(wrapper);
|
||||||
mGLWidget->setParent(wrapper);
|
mGLWidget->setParent(wrapper);
|
||||||
|
mGLRenWin.Get()->SetMultiSamples(8);
|
||||||
mGLWidget->setRenderWindow(mGLRenWin.Get());
|
mGLWidget->setRenderWindow(mGLRenWin.Get());
|
||||||
controlLayout->addWidget(mGLWidget, 0, 0);
|
controlLayout->addWidget(mGLWidget, 0, 0);
|
||||||
|
|
||||||
@@ -649,8 +650,8 @@ void DicomImageView::rotateImage(double angle, TransFormType operation) {
|
|||||||
if (hasSeries()) {
|
if (hasSeries()) {
|
||||||
int slice = mImageViewer->GetSlice();
|
int slice = mImageViewer->GetSlice();
|
||||||
resetPanZoom();
|
resetPanZoom();
|
||||||
mImageViewer->GetRenderer()->GetActiveCamera()->Roll(mCurrentRAngle + angle);
|
mImageViewer->GetRenderer()->GetActiveCamera()->Roll(angle);
|
||||||
mCurrentRAngle=mCurrentRAngle+angle;
|
mCurrentRAngle=(mCurrentRAngle+(int)angle)%360;
|
||||||
//to avoid black out problem during slicing
|
//to avoid black out problem during slicing
|
||||||
//slcing is related with rotation, you have to recalculate to get it right
|
//slcing is related with rotation, you have to recalculate to get it right
|
||||||
mImageViewer->GetRenderer()->ResetCameraClippingRange();
|
mImageViewer->GetRenderer()->ResetCameraClippingRange();
|
||||||
|
|||||||
Reference in New Issue
Block a user