本文整理汇总了C++中CImage::CreateDerivedImage方法的典型用法代码示例。如果您正苦于以下问题:C++ CImage::CreateDerivedImage方法的具体用法?C++ CImage::CreateDerivedImage怎么用?C++ CImage::CreateDerivedImage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CImage
的用法示例。
在下文中一共展示了CImage::CreateDerivedImage方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QString
CPlanarWorkspace::CPlanarWorkspace(CObject *parent, const QPointF &position, const QPointF &size):
CObject(parent, position, size){
//iLayout = NULL;
iLastInnerHeight = 0;
iLastInnerWidth = 0;
iWorkspaceChanged = true;
iName = new QString();
iSaveSnapshot = false;
iSaveSnapshotFileName = NULL;
QString name;
name.clear();
name.append("MPR");
//name.append(QString::number(CWorkspaceManager::GetInstance()->GetWorkspaces().count()));
SetName(name);
iImage = NULL;
//SetLayout(layoutType);
iWorkspaceSnapshot =new CWorkspaceSnapshot(parent,(CWorkspace*)this,QPointF(400,400), QPointF(100,100));
SetBorders(Settings::GetBordersConstant(EWorkspaceBorders));
SetBorderColor(Settings::GetColorConstant(EWorkspaceBorderColor));
SetInnerColor(Settings::GetColorConstant(EWorkspaceInnerColor));
iPlanarCrossPosition.x=0.5;
iPlanarCrossPosition.y=0.5;
iPlanarCrossPosition.z=0.5;
setMouseTracking(true);
iEventHistory = new QPoint();
iCursorHistory = new QPoint();
iSensitivity = 1000;
CImage* image = CImageExplorer::GetInstance()->iActiveImage;
iImage1 = image->CreateDerivedImage(EImageOrientationAxial);
iImage2 = image->CreateDerivedImage(EImageOrientationAxial);
iImage3 = image->CreateDerivedImage(EImageOrientationAxial);
iImage1->SetOrientation(EImageOrientationAxial);
iImage2->SetOrientation(EImageOrientationSagittal);
iImage3->SetOrientation(EImageOrientationCoronal);
iImage1->SetGeometry(0, 0, iSize.x()/2, iSize.y()/2);
iImage2->SetGeometry(iSize.x()/2, 0, iSize.x()/2, iSize.y()/2);
iImage3->SetGeometry(0, iSize.y()/2, iSize.x()/2, iSize.y()/2);
float textureWidth = (float)iImage1->GetTexture()->GetWidth();
int textureHeight = iImage1->GetTexture()->GetHeight();
int textureDepth = iImage1->GetTexture()->GetDepth();
float zoom = iImage1->GetSize().x()/textureWidth;
iImage1->SetZoom(zoom);
iImage2->SetZoom(zoom);
iImage3->SetZoom(zoom);
iImage1->MoveToDepth(0.5);
iImage2->MoveToDepth(0.5);
iImage3->MoveToDepth(0.5);
CWidget::GetInstance()->paint();
}