63 return "BinaryThinningImageFilter3DFilter";
69 "<h3>itk::BinaryThinningImageFilter3D</h3>"
71 "This filter computes one-pixel-wide skeleton of a 3D input image."
73 "This class is parametrized over the type of the input image "
74 "and the type of the output image."
76 "The input is assumed to be a binary image. All non-zero valued voxels "
77 "are set to 1 internally to simplify the computation. The filter will "
78 "produce a skeleton of the object. The output background values are 0, "
79 "and the foreground values are 1."
81 "A 26-neighbourhood configuration is used for the foreground and a "
82 "6-neighbourhood configuration for the background. Thinning is performed "
83 "symmetrically in order to guarantee that the skeleton lies medial within "
86 "This filter is a parallel thinning algorithm and is an implementation "
87 "of the algorithm described in:"
89 "T.C. Lee, R.L. Kashyap, and C.N. Chu.<br>"
90 "Building skeleton models via 3-D medial surface/axis thinning algorithms.<br>"
91 "Computer Vision, Graphics, and Image Processing, 56(6):462--478, 1994."
98 "Color of output model.",
99 QColor(
"green"), root);
112 temp->setValueName(
"Input");
113 temp->setHelp(
"Select binary volume input for thinning");
123 temp->setValueName(
"Output");
124 temp->setHelp(
"Output centerline model");
138 if (input->getMax() != 1 || input->getMin() != 0)
140 reportWarning(QString(
"Centerline: Input image %1 must be binary, aborting.").arg(input->getName()));
153 if (input->getMax() != 1 || input->getMin() != 0)
164 centerlineFilterType::Pointer centerlineFilter = centerlineFilterType::New();
165 centerlineFilter->SetInput(itkImage);
166 centerlineFilter->Update();
167 itkImage = centerlineFilter->GetOutput();
171 itkToVtkFilter->SetInput(itkImage);
172 itkToVtkFilter->Update();
175 rawResult->DeepCopy(itkToVtkFilter->GetOutput());
177 mRawResult = rawResult;
183 bool success =
false;
192 input->getUid() +
"_cl_temp%1", input->getName()+
" cl_temp%1",
196 outImage->resetTransferFunctions();
201 QString uid = input->getUid() +
"_cl%1";
202 QString name = input->getName()+
" cl%1";
205 mesh->setColor(outputColor->getValue());
206 mesh->get_rMd_History()->setParentSpace(input->getUid());
virtual void createInputTypes()
virtual QString getName() const
std::vector< SelectDataStringPropertyBasePtr > mInputTypes
QDomElement mCopiedOptions
virtual QString getHelp() const
boost::shared_ptr< class VisServices > VisServicesPtr
virtual bool preProcess()
virtual void createOptions()
boost::shared_ptr< class Image > ImagePtr
virtual QString getType() const
std::vector< PropertyPtr > mOptionsAdapters
vtkSmartPointer< class vtkPolyData > vtkPolyDataPtr
ImagePtr createDerivedImage(PatientModelServicePtr dataManager, QString uid, QString name, vtkImageDataPtr raw, ImagePtr parent)
boost::shared_ptr< class SelectDataStringPropertyBase > SelectDataStringPropertyBasePtr
virtual bool preProcess()
void reportWarning(QString msg)
void setVtkPolyData(const vtkPolyDataPtr &polyData)
ColorPropertyBasePtr getColorOption(QDomElement root)
virtual void createOutputTypes()
SmartPointer< Self > Pointer
ImagePtr getCopiedInputImage(int index=0)
BinaryThinningImageFilter3DFilter(VisServicesPtr services)
static vtkPolyDataPtr extractPolyData(ImagePtr image, int p_neighborhoodFilterThreshold, double p_BoundingBox[6])
virtual bool postProcess()
std::vector< SelectDataStringPropertyBasePtr > mOutputTypes
boost::shared_ptr< class ColorPropertyBase > ColorPropertyBasePtr
static StringPropertySelectMeshPtr New(PatientModelServicePtr patientModelService)
static itkImageType::ConstPointer getITKfromSSCImage(ImagePtr image)
static StringPropertySelectImagePtr New(PatientModelServicePtr patientModelService)
static ColorPropertyPtr initialize(const QString &uid, QString name, QString help, QColor value, QDomNode root=QDomNode())
boost::shared_ptr< class Mesh > MeshPtr
This filter computes one-pixel-wide skeleton of a 3D input image.