14 #include <ctkPluginContext.h> 35 #include <vtkPolyData.h> 49 return "Route to target";
54 return "routetotarget_filter";
60 "<h3>Route to target.</h3>" 61 "<p>Calculates the route to a selected target in navigated bronchocopy. " 62 "The route starts at the top of trachea and ends at the most adjacent airway centerline" 63 "from the target.</p>" 87 centerline->setValueName(
"Airways centerline");
88 centerline->setHelp(
"Select airways centerline");
93 targetPoint->setValueName(
"Target point");
94 targetPoint->setHelp(
"Select target point metric");
103 tempRTTMeshStringAdapter->setValueName(
"Route to target mesh");
104 tempRTTMeshStringAdapter->setHelp(
"Generated route to target mesh (vtk-format).");
109 tempRTTEXTMeshStringAdapter->setValueName(
"Route to target extended mesh");
110 tempRTTEXTMeshStringAdapter->setHelp(
"Generated route to target extended mesh (vtk-format).");
123 vtkPolyDataPtr centerline_r = mesh->getTransformedPolyDataCopy(mesh->get_rMd());
129 Vector3D targetCoordinate_r = targetPoint->getCoordinate();
131 mRouteToTarget->processCenterline(centerline_r);
134 mOutput = mRouteToTarget->findRouteToTarget(targetCoordinate_r);
136 if(mOutput->GetNumberOfPoints() < 1)
139 mExtendedRoute = mRouteToTarget->findExtendedRoute(targetCoordinate_r);
153 if (!mTargetName.isEmpty())
155 uidCenterline.append(
"_" + mTargetName);
156 nameCenterline.append(
"_" + mTargetName);
167 outputCenterlineExt->setColor(QColor(0, 0, 255, 255));
174 outputCenterline->get_rMd_History()->setParentSpace(inputMesh->getUid());
175 outputCenterlineExt->get_rMd_History()->setParentSpace(inputMesh->getUid());
177 mServices->view()->autoShowData(outputCenterline);
182 mOutputTypes[1]->setValue(outputCenterlineExt->getUid());
virtual QString getName() const
virtual void createOutputTypes()
std::vector< SelectDataStringPropertyBasePtr > mInputTypes
virtual void createOptions()
boost::shared_ptr< class VisServices > VisServicesPtr
RouteToTargetFilter(VisServicesPtr services)
static QString getNameSuffixExtension()
static QString getNameSuffix()
PatientModelServicePtr patientService()
virtual void setTargetName(QString name)
void setVtkPolyData(const vtkPolyDataPtr &polyData)
virtual bool postProcess()
virtual void createInputTypes()
virtual QString getType() const
virtual QString getHelp() const
vtkSmartPointer< vtkPolyData > vtkPolyDataPtr
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
std::vector< SelectDataStringPropertyBasePtr > mOutputTypes
static StringPropertySelectPointMetricPtr New(PatientModelServicePtr patientModelService)
static StringPropertySelectMeshPtr New(PatientModelServicePtr patientModelService)
boost::shared_ptr< class StringPropertySelectPointMetric > StringPropertySelectPointMetricPtr
boost::shared_ptr< class Mesh > MeshPtr
boost::shared_ptr< class StringPropertySelectMesh > StringPropertySelectMeshPtr
Namespace for all CustusX production code.
boost::shared_ptr< class PointMetric > PointMetricPtr