14 #include <ctkPluginContext.h> 35 #include <vtkPolyData.h> 44 mGenerateFileWithRouteInformation(createRouteInformationFile)
50 return "Route to target";
55 return "routetotarget_filter";
61 "<h3>Route to target.</h3>" 62 "<p>Calculates the route to a selected target in navigated bronchocopy. " 63 "The route starts at the top of trachea and ends at the most adjacent airway centerline" 64 "from the target.</p>" 88 centerline->setValueName(
"Airways centerline");
89 centerline->setHelp(
"Select airways centerline");
94 targetPoint->setValueName(
"Target point");
95 targetPoint->setHelp(
"Select target point metric");
104 tempRTTMeshStringAdapter->setValueName(
"Route to target mesh");
105 tempRTTMeshStringAdapter->setHelp(
"Generated route to target mesh (vtk-format).");
110 tempRTTEXTMeshStringAdapter->setValueName(
"Route to target extended mesh");
111 tempRTTEXTMeshStringAdapter->setHelp(
"Generated route to target extended mesh (vtk-format).");
124 vtkPolyDataPtr centerline_r = mesh->getTransformedPolyDataCopy(mesh->get_rMd());
130 Vector3D targetCoordinate_r = targetPoint->getCoordinate();
132 mRouteToTarget->processCenterline(centerline_r);
135 mOutput = mRouteToTarget->findRouteToTarget(targetCoordinate_r);
137 if(mOutput->GetNumberOfPoints() < 1)
140 mExtendedRoute = mRouteToTarget->findExtendedRoute(targetCoordinate_r);
142 if (mGenerateFileWithRouteInformation)
143 mRouteToTarget->addRouteInformationToFile(
mServices);
157 if (!mTargetName.isEmpty())
159 uidCenterline.append(
"_" + mTargetName);
160 nameCenterline.append(
"_" + mTargetName);
171 outputCenterlineExt->setColor(QColor(0, 0, 255, 255));
178 outputCenterline->get_rMd_History()->setParentSpace(inputMesh->getUid());
179 outputCenterlineExt->get_rMd_History()->setParentSpace(inputMesh->getUid());
181 mServices->view()->autoShowData(outputCenterline);
186 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
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
RouteToTargetFilter(VisServicesPtr services, bool createRouteInformationFile=false)
boost::shared_ptr< class StringPropertySelectMesh > StringPropertySelectMeshPtr
Namespace for all CustusX production code.
boost::shared_ptr< class PointMetric > PointMetricPtr