31 Superclass::Initialize(other);
58 bool useSmoothing(
false);
63 catch (std::invalid_argument &)
65 MITK_WARN <<
"\"Smooth\" parameter was not set: will use the default value (" << useSmoothing <<
").";
72 catch (std::invalid_argument &)
74 MITK_WARN <<
"\"RequestedLabel\" parameter was not set: will use the default value (" << m_RequestedLabel <<
").";
78 filter->SetInput(image);
80 filter->SetGenerateAllLabels(
false);
81 filter->SetRequestedLabel(m_RequestedLabel);
82 filter->SetUseSmoothing(useSmoothing);
88 catch (itk::ExceptionObject &e)
90 MITK_ERROR <<
"Exception caught: " << e.GetDescription();
93 catch (std::exception &e)
95 MITK_ERROR <<
"Exception caught: " << e.what();
104 m_Result = filter->GetOutput();
106 if (m_Result.IsNull() || !m_Result->GetVtkPolyData())
109 m_Result->DisconnectPipeline();
120 name.append(
"-surf");
123 node->SetData(m_Result);
126 mitk::Color color = image->GetLabel(m_RequestedLabel, image->GetActiveLayer())->GetColor();
127 node->SetColor(color);
131 Superclass::ThreadedUpdateSuccessful();
DataNode * GetGroupNode()
void InsertBelowGroupNode(mitk::DataNode *node)
virtual ~LabelSetImageToSurfaceThreadedFilter()
virtual void Initialize(const NonBlockingAlgorithm *other=nullptr) override
virtual void ThreadedUpdateSuccessful() override
bool GetName(std::string &nodeName, const mitk::BaseRenderer *renderer=nullptr, const char *propertyKey="name") const
Convenience access method for accessing the name of an object (instance of StringProperty with proper...
DataCollection - Class to facilitate loading/accessing structured data.
virtual bool ThreadedUpdateFunction() override
LabelSetImageToSurfaceThreadedFilter()
itk::RGBPixel< float > Color
Color Standard RGB color typedef (float)
virtual bool ReadyToRun() override
void GetPointerParameter(const char *parameter, itk::SmartPointer< T > &value) const
void GetParameter(const char *parameter, T &value) const