35 #include <ctkPluginContext.h> 56 #include <vtkPolyData.h> 70 return "Route to target";
75 return "routetotarget_filter";
81 "<h3>Route to target.</h3>" 82 "<p>Calculates the route to a selected target in navigated bronchocopy. " 83 "The route starts at the top of trachea and ends at the most adjacent airway centerline" 84 "from the target.</p>" 108 centerline->setValueName(
"Airways centerline");
109 centerline->setHelp(
"Select airways centerline");
114 targetPoint->setValueName(
"Target point");
115 targetPoint->setHelp(
"Select target point metric");
124 tempRTTMeshStringAdapter->setValueName(
"Route to target mesh");
125 tempRTTMeshStringAdapter->setHelp(
"Generated route to target mesh (vtk-format).");
130 tempRTTEXTMeshStringAdapter->setValueName(
"Route to target extended mesh");
131 tempRTTEXTMeshStringAdapter->setHelp(
"Generated route to target extended mesh (vtk-format).");
144 vtkPolyDataPtr centerline_r = mesh->getTransformedPolyDataCopy(mesh->get_rMd());
150 Vector3D targetCoordinate_r = targetPoint->getCoordinate();
152 mRouteToTarget->processCenterline(centerline_r);
155 mOutput = mRouteToTarget->findRouteToTarget(targetCoordinate_r);
157 if(mOutput->GetNumberOfPoints() < 1)
160 mExtendedRoute = mRouteToTarget->findExtendedRoute(targetCoordinate_r);
174 if (!mTargetName.isEmpty())
176 uidCenterline.append(
"_" + mTargetName);
177 nameCenterline.append(
"_" + mTargetName);
188 outputCenterlineExt->setColor(QColor(0, 0, 255, 255));
195 outputCenterline->get_rMd_History()->setParentSpace(inputMesh->getUid());
196 outputCenterlineExt->get_rMd_History()->setParentSpace(inputMesh->getUid());
198 mServices->view()->autoShowData(outputCenterline);
203 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