Skip to content
Snippets Groups Projects
Commit 6c6db582 authored by Julien Michel's avatar Julien Michel
Browse files

BUG: Fixed bad inheritence of the ConnectedComponentFunctorImageFilter

parent 9deda200
No related branches found
No related tags found
No related merge requests found
...@@ -52,14 +52,14 @@ namespace itk ...@@ -52,14 +52,14 @@ namespace itk
template <class TInputImage, class TOutputImage, class TFunctor, class TMaskImage=TInputImage> template <class TInputImage, class TOutputImage, class TFunctor, class TMaskImage=TInputImage>
class ITK_EXPORT ConnectedComponentFunctorImageFilter : class ITK_EXPORT ConnectedComponentFunctorImageFilter :
public ConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage > public ImageToImageFilter< TInputImage, TOutputImage >
{ {
public: public:
/** /**
* Standard "Self" & Superclass typedef. * Standard "Self" & Superclass typedef.
*/ */
typedef ConnectedComponentFunctorImageFilter Self; typedef ConnectedComponentFunctorImageFilter Self;
typedef ConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage > Superclass; typedef ImageToImageFilter< TInputImage, TOutputImage > Superclass;
/** /**
* Types from the Superclass * Types from the Superclass
...@@ -150,9 +150,33 @@ public: ...@@ -150,9 +150,33 @@ public:
(Concept::IncrementDecrementOperators<OutputPixelType>)); (Concept::IncrementDecrementOperators<OutputPixelType>));
/** End concept checking */ /** End concept checking */
#endif #endif
/**
* Set/Get whether the connected components are defined strictly by
* face connectivity or by face+edge+vertex connectivity. Default is
* FullyConnectedOff. For objects that are 1 pixel wide, use
* FullyConnectedOn.
*/
itkSetMacro(FullyConnected, bool);
itkGetConstReferenceMacro(FullyConnected, bool);
itkBooleanMacro(FullyConnected);
void SetMaskImage(TMaskImage* mask)
{
this->SetNthInput(1, const_cast<TMaskImage *>( mask ));
}
const TMaskImage* GetMaskImage() const
{
return (static_cast<const TMaskImage*>(this->ProcessObject::GetInput(1)));
}
protected: protected:
ConnectedComponentFunctorImageFilter() {} ConnectedComponentFunctorImageFilter()
{
m_FullyConnected = false;
}
virtual ~ConnectedComponentFunctorImageFilter() {} virtual ~ConnectedComponentFunctorImageFilter() {}
ConnectedComponentFunctorImageFilter(const Self&) {} ConnectedComponentFunctorImageFilter(const Self&) {}
...@@ -163,6 +187,9 @@ protected: ...@@ -163,6 +187,9 @@ protected:
*/ */
void GenerateData(); void GenerateData();
bool m_FullyConnected;
}; };
} // end namespace itk } // end namespace itk
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment