当前位置: 首页>>代码示例>>C++>>正文


C++ CImage::CreateDerivedImage方法代码示例

本文整理汇总了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();
}
开发者ID:flaska,项目名称:DPEngine,代码行数:50,代码来源:cPlanarWorkspace.cpp


注:本文中的CImage::CreateDerivedImage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。