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


C++ CAnimation::IsActive方法代码示例

本文整理汇总了C++中CAnimation::IsActive方法的典型用法代码示例。如果您正苦于以下问题:C++ CAnimation::IsActive方法的具体用法?C++ CAnimation::IsActive怎么用?C++ CAnimation::IsActive使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CAnimation的用法示例。


在下文中一共展示了CAnimation::IsActive方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: SetSourceImage


//.........这里部分代码省略.........
	iTableHeader->setItem(row,0,new QTableWidgetItem("Image height"));
	iTableHeader->setItem(row,1,new QTableWidgetItem(QString::number(source->GetTexture()->GetHeight())));
	row++;
		iTableHeader->setItem(row,0,new QTableWidgetItem("Image depth"));
	iTableHeader->setItem(row,1,new QTableWidgetItem(QString::number(source->GetTexture()->GetDepth())));
	row++;
		iTableHeader->setItem(row,0,new QTableWidgetItem("Slice thickness"));
		float sliceThickness =0;
		try{
			int frameNr = source->GetActualFrameNr();
			if(source->GetOrientation() != EImageOrientationAxial)
			{
				frameNr = 0;//default
			}
			CDicomHeader& header = source->GetTexture()->GetDicomHeader(frameNr);
		
			sliceThickness = header.GetImageInfo().GetSliceThickness();
			iTableHeader->setItem(row,1,new QTableWidgetItem(QString::number(sliceThickness)));
	row++;
	float slicePosition = header.GetImageInfo().GetSliceLocation();
		iTableHeader->setItem(row,0,new QTableWidgetItem("Slice position"));
		iTableHeader->setItem(row,1,new QTableWidgetItem(QString::number(slicePosition)));
	row++;
	iTableHeader->setItem(row,0,new QTableWidgetItem("Series UID"));
	iTableHeader->setItem(row,1,new QTableWidgetItem(header.GetSeriesInfo().GetSeriesInstanceUID()));
	row++;
	
	iTableHeader->setItem(row,0,new QTableWidgetItem("Patient's name"));
	iTableHeader->setItem(row,1,new QTableWidgetItem(header.GetPatientInfo().GetName ()));
	
		}
		catch (exception *e)
		{
			e;
		}
		

	//DERIVED IMAGES TABLE
	iTableOfOpenedImageCopies->clearContents();
	//Has it derived images ?? if yes it is image in image explorer window
	QListIterator<CGLImage*> images(source->GetDerivedImages());
	images.toFront();
	row=0;
	while(images.hasNext())
	{

		CGLImage *im = images.next();
		iTableOfOpenedImageCopies->setRowCount(row+1);
		iTableOfOpenedImageCopies->setItem(row,0,new QTableWidgetItem(im->GetParentWorkspace()->GetName()));
		iTableOfOpenedImageCopies->setItem(row,1,new QTableWidgetItem(im->GetName()));
		QTableWidgetItem *item = iTableOfOpenedImageCopies->item(row,0);
		item->setFlags(Qt::ItemIsEnabled|Qt::ItemIsSelectable);
		item->setFlags(Qt::ItemIsEnabled|Qt::ItemIsSelectable);
		item = iTableOfOpenedImageCopies->item(row,1);
		item->setFlags(Qt::ItemIsEnabled|Qt::ItemIsSelectable);
		item->setFlags(Qt::ItemIsEnabled|Qt::ItemIsSelectable);
		row++;	
	}
	
	//Animation
	if(source)
	{
		CAnimation* anim = source->GetAnimation();
		if(anim)
		{
			//save ms interval before it will be changed by set maximum
				int msInterval = anim->GetMSInterval();
				int start = anim->GetStartFrame();
				int stop = anim->GetStopFrame();
			iAnimationStartField->setMaximum(iSourceImage->GetActualTextureDepth());
			iAnimationStopField->setMaximum(iSourceImage->GetActualTextureDepth());
			//iAnimationMSIntervalField->setMaximum(anim->GetStartFrame());
			iAnimationStopField->setValue(stop);
			iAnimationStartField->setValue(start);
			iAnimationMSIntervalField->setValue(msInterval);
		
			if(anim->IsActive())
			{
				iAnimationGroupBox->setChecked(true);
				//iCheckBoxAnimate->setCheckState(Qt::Checked);
			}
			else
			{
				iAnimationGroupBox->setChecked(false);
			}
		}
		else
		{
			iAnimationGroupBox->setChecked(false);
			iAnimationStartField->setMaximum(iSourceImage->GetActualTextureDepth());
			iAnimationStopField->setMaximum(iSourceImage->GetActualTextureDepth());
			
			iAnimationStopField->setValue(iSourceImage->GetActualTextureDepth());
			iAnimationStartField->setValue(1);
			iAnimationMSIntervalField->setValue(40.0f);
			//iCheckBoxAnimate->setCheckState(Qt::Unchecked);
		}
	}

}
开发者ID:flaska,项目名称:Dicom-Presenter-VisualStudio,代码行数:101,代码来源:infoPanel.cpp


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