|
NorMIT-nav
22.09
An IGT application
|
Go to the documentation of this file.
42 return "binary_thinning_image_filter_3d_filter";
48 "<h3>itk::BinaryThinningImageFilter3D</h3>"
50 "This filter computes one-pixel-wide skeleton of a 3D input image."
52 "This class is parametrized over the type of the input image "
53 "and the type of the output image."
55 "The input is assumed to be a binary image. All non-zero valued voxels "
56 "are set to 1 internally to simplify the computation. The filter will "
57 "produce a skeleton of the object. The output background values are 0, "
58 "and the foreground values are 1."
60 "A 26-neighbourhood configuration is used for the foreground and a "
61 "6-neighbourhood configuration for the background. Thinning is performed "
62 "symmetrically in order to guarantee that the skeleton lies medial within "
65 "This filter is a parallel thinning algorithm and is an implementation "
66 "of the algorithm described in:"
68 "T.C. Lee, R.L. Kashyap, and C.N. Chu.<br>"
69 "Building skeleton models via 3-D medial surface/axis thinning algorithms.<br>"
70 "Computer Vision, Graphics, and Image Processing, 56(6):462--478, 1994."
77 "Color of output model.",
78 QColor(
"green"), root);
91 temp->setValueName(
"Input");
92 temp->setHelp(
"Select binary volume input for thinning");
102 temp->setValueName(
"Output");
103 temp->setHelp(
"Output centerline model");
117 if (input->getMax() != 1 || input->getMin() != 0)
119 reportWarning(QString(
"Centerline: Input image %1 must be binary, aborting.").arg(input->getName()));
132 if (input->getMax() != 1 || input->getMin() != 0)
143 centerlineFilterType::Pointer centerlineFilter = centerlineFilterType::New();
144 centerlineFilter->SetInput(itkImage);
145 centerlineFilter->Update();
146 itkImage = centerlineFilter->GetOutput();
150 itkToVtkFilter->SetInput(itkImage);
151 itkToVtkFilter->Update();
154 rawResult->DeepCopy(itkToVtkFilter->GetOutput());
156 mRawResult = rawResult;
162 bool success =
false;
171 input->getUid() +
"_cl_temp%1", input->getName()+
" cl_temp%1",
175 outImage->resetTransferFunctions();
180 QString uid = input->getUid() +
"_cl%1";
181 QString name = input->getName()+
" cl%1";
184 mesh->setColor(outputColor->getValue());
185 mesh->get_rMd_History()->setParentSpace(input->getUid());
static StringPropertySelectMeshPtr New(PatientModelServicePtr patientModelService)
void setVtkPolyData(const vtkPolyDataPtr &polyData)
static itkImageType::ConstPointer getITKfromSSCImage(ImagePtr image)
ColorPropertyBasePtr getColorOption(QDomElement root)
virtual void createInputTypes()
Namespace for all CustusX production code.
virtual QString getType() const
boost::shared_ptr< class VisServices > VisServicesPtr
BinaryThinningImageFilter3DFilter(VisServicesPtr services)
std::vector< SelectDataStringPropertyBasePtr > mOutputTypes
static ColorPropertyPtr initialize(const QString &uid, QString name, QString help, QColor value, QDomNode root=QDomNode())
virtual QString getName() const
std::vector< SelectDataStringPropertyBasePtr > mInputTypes
QDomElement mCopiedOptions
ImagePtr getCopiedInputImage(int index=0)
boost::shared_ptr< class Mesh > MeshPtr
static StringPropertySelectImagePtr New(PatientModelServicePtr patientModelService)
boost::shared_ptr< class Image > ImagePtr
static vtkPolyDataPtr extractPolyData(ImagePtr image, int p_neighborhoodFilterThreshold, double p_BoundingBox[6])
virtual bool preProcess()
vtkSmartPointer< vtkPolyData > vtkPolyDataPtr
virtual void createOutputTypes()
ImagePtr createDerivedImage(PatientModelServicePtr dataManager, QString uid, QString name, vtkImageDataPtr raw, ImagePtr parent)
boost::shared_ptr< class ColorPropertyBase > ColorPropertyBasePtr
virtual void createOptions()
SmartPointer< Self > Pointer
virtual bool preProcess()
virtual bool postProcess()
virtual QString getHelp() const
std::vector< PropertyPtr > mOptionsAdapters
This filter computes one-pixel-wide skeleton of a 3D input image.
void reportWarning(QString msg)
boost::shared_ptr< class SelectDataStringPropertyBase > SelectDataStringPropertyBasePtr