35 #include <ctkPluginContext.h>
67 return "Route to target";
72 return "routetotarget_filter";
78 "<h3>Route to target.</h3>"
79 "<p>Calculates the route to a selected target in navigated bronchocopy."
80 "The rout starts at the top of trachea and ends at the most adjacent airway centerline"
81 "from the target.</p>"
95 centerline->setValueName(
"Centerline");
96 centerline->setHelp(
"Select centerline");
101 targetPoint->setValueName(
"Target point");
102 targetPoint->setHelp(
"Select point metric input");
113 tempMeshStringAdapter->setValueName(
"Centerline mesh");
114 tempMeshStringAdapter->setHelp(
"Generated route to target mesh (vtk-format).");
128 vtkPolyDataPtr centerline_r = mesh->getTransformedPolyData(mesh->get_rMd());
134 Vector3D targetCoordinate_r = targetPoint->getCoordinate();
136 mRouteToTarget->processCenterline(centerline_r);
139 mOutput = mRouteToTarget->findRouteToTarget(targetCoordinate_r);
140 mExtendedRoute = mRouteToTarget->findExtendedRoute(targetCoordinate_r);
152 QString uidCenterline = inputMesh->getUid() +
"_rtt_cl%1";
153 QString nameCenterline = inputMesh->getName()+
"_rtt_cl%1";
158 QString uidCenterlineExt = outputCenterline->getUid() +
"_ext";
159 QString nameCenterlineExt = outputCenterline->getName()+
"_ext";
162 outputCenterlineExt->setColor(QColor(0, 0, 255, 255));
169 outputCenterline->get_rMd_History()->setParentSpace(inputMesh->getUid());
170 outputCenterlineExt->get_rMd_History()->setParentSpace(inputMesh->getUid());
172 mServices->view()->autoShowData(outputCenterline);
virtual QString getName() const
virtual void createOutputTypes()
std::vector< SelectDataStringPropertyBasePtr > mInputTypes
virtual void createOptions()
boost::shared_ptr< class VisServices > VisServicesPtr
RouteToTargetFilter(VisServicesPtr services)
vtkSmartPointer< class vtkPolyData > vtkPolyDataPtr
PatientModelServicePtr patientService()
void setVtkPolyData(const vtkPolyDataPtr &polyData)
virtual bool postProcess()
virtual void createInputTypes()
virtual QString getType() const
virtual QString getHelp() const
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
boost::shared_ptr< class PointMetric > PointMetricPtr