Пример #1
0
VideoGraphics::VideoGraphics()
{
	mPlaneActor = vtkActorPtr::New();
	mPlaneSource = vtkPlaneSourcePtr::New();

	mDataRedirecter = vtkImageChangeInformationPtr::New();
	mUSSource = UltrasoundSectorSourcePtr::New();

	// set a filter that map all zeros in the input to ones. This enables us to
	// use zero as a special transparency value, to be used in masking.
	mMapZeroToOne = vtkImageThresholdPtr::New();
	mMapZeroToOne->ThresholdByLower(1.0);
	mMapZeroToOne->SetInValue(1);
	mMapZeroToOne->SetReplaceIn(true);

	// set the filter that applies a mask to the stream data
	mMaskFilter = vtkImageMaskPtr::New();
	mMaskFilter->SetMaskInputData(vtkImageDataPtr());
	mMaskFilter->SetMaskedOutputValue(0.0);

	// generate texture coords for mPlaneSource
	mTextureMapToPlane = vtkTextureMapToPlanePtr::New();

	mTransformTextureCoords = vtkTransformTextureCoordsPtr::New();
	mTransformTextureCoords->SetOrigin( 0, 0.5, 0);
	mTransformTextureCoords->SetScale( 1, 1, 0);
	mTransformTextureCoords->FlipROn(); // flip around axis

	mTexture = vtkTexturePtr::New();
	mTexture->RepeatOff();

	mDataSetMapper = vtkDataSetMapperPtr::New();

	mPlaneActor->SetTexture(mTexture);
	mPlaneActor->SetMapper(mDataSetMapper);
	mPlaneActor->SetVisibility(false);
	mPlaneActor->GetProperty()->LightingOff();	// Turning off lighting to remove shadow effects (Fix for #644: 2D ultrasound in 3D scene was too dark)
//	mPlaneActor->GetProperty()->ShadingOff();
}
Пример #2
0
TemporalCalibration::TemporalCalibration()
{
	mAddRawToDebug = false;
	mMask = vtkImageDataPtr();
}
UnsignedDerivedImage::UnsignedDerivedImage(ImagePtr base) : Image(base->getUid()+"_u", vtkImageDataPtr(), base->getName())
{
    this->mBase = base;

    // redirected signals:
    connect(base.get(), SIGNAL(transformChanged()), this, SIGNAL(transformChanged()));
    connect(base.get(), SIGNAL(propertiesChanged()), this, SIGNAL(propertiesChanged()));
    connect(base.get(), SIGNAL(clipPlanesChanged()), this, SIGNAL(clipPlanesChanged()));
    connect(base.get(), SIGNAL(cropBoxChanged()), this, SIGNAL(cropBoxChanged()));

    // override signals:
    connect(base.get(), SIGNAL(transferFunctionsChanged()), this, SLOT(unsignedTransferFunctionsChangedSlot()));
    connect(base.get(), SIGNAL(vtkImageDataChanged()), this, SLOT(unsignedImageChangedSlot()));

	connect(this, SIGNAL(transferFunctionsChanged()), this, SLOT(testSlot()));
	this->unsignedImageChangedSlot();
    this->unsignedTransferFunctionsChangedSlot();
}
Пример #4
0
#include "cxMesh.h"
#include "cxImage.h"
#include "cxDataMetric.h"
#include "cxPointMetric.h"
#include "cxViewWrapper.h"
#include "cxTypeConversions.h"
#include "cxtestSpaceProviderMock.h"
#include "cxCoreServices.h"
#include "cxtestPatientModelServiceMock.h"
#include "cxLogger.h"

TEST_CASE("Sort cx::Data user-friendly using getPriority()", "[unit][service][visualization]")
{
	cx::MeshPtr mesh(new cx::Mesh("mesh1     "));
	cx::ImagePtr image_mr(new cx::Image("image1_mr ", vtkImageDataPtr()));
	image_mr->setModality("MR");
	cx::ImagePtr image_ct(new cx::Image("image1_ct ", vtkImageDataPtr()));
	image_ct->setModality("CT");
	cx::ImagePtr image_us(new cx::Image("image1_us ", vtkImageDataPtr()));
	image_us->setModality("US");
	image_us->setImageType("B-Mode");
	cx::ImagePtr image_usa(new cx::Image("image1_usa", vtkImageDataPtr()));
	image_usa->setModality("US");
	image_usa->setImageType("Angio");
	cx::PointMetricPtr point = cx::PointMetric::create("point1    ", "", cx::PatientModelServicePtr(), cxtest::SpaceProviderMock::create());

	std::vector<cx::DataPtr> unsorted1;
	unsorted1.push_back(image_us);
	unsorted1.push_back(point);
	unsorted1.push_back(image_mr);
Пример #5
0
ImagePtr Image::create(const QString& uid, const QString& name)
{
	return ImagePtr(new Image(uid, vtkImageDataPtr(), name));
}