27 Superclass::Initialize(other);
54 bool useSmoothing(
false);
59 catch (std::invalid_argument &)
61 MITK_WARN <<
"\"Smooth\" parameter was not set: will use the default value (" << useSmoothing <<
").";
68 catch (std::invalid_argument &)
70 MITK_WARN <<
"\"RequestedLabel\" parameter was not set: will use the default value (" << m_RequestedLabel <<
").";
74 filter->SetInput(image);
76 filter->SetGenerateAllLabels(
false);
77 filter->SetRequestedLabel(m_RequestedLabel);
78 filter->SetUseSmoothing(useSmoothing);
84 catch (itk::ExceptionObject &e)
86 MITK_ERROR <<
"Exception caught: " << e.GetDescription();
89 catch (std::exception &e)
91 MITK_ERROR <<
"Exception caught: " << e.what();
100 m_Result = filter->GetOutput();
102 if (m_Result.IsNull() || !m_Result->GetVtkPolyData())
105 m_Result->DisconnectPipeline();
116 name.append(
"-surf");
119 node->SetData(m_Result);
122 mitk::Color color = image->GetLabel(m_RequestedLabel, image->GetActiveLayer())->GetColor();
123 node->SetColor(color);
127 Superclass::ThreadedUpdateSuccessful();
DataNode * GetGroupNode()
void InsertBelowGroupNode(mitk::DataNode *node)
void Initialize(const NonBlockingAlgorithm *other=nullptr) override
void ThreadedUpdateSuccessful() override
DataCollection - Class to facilitate loading/accessing structured data.
bool ThreadedUpdateFunction() override
void GetParameter(const char *parameter, T &value) const
LabelSetImageToSurfaceThreadedFilter()
~LabelSetImageToSurfaceThreadedFilter() override
mitk::Image::Pointer image
itk::RGBPixel< float > Color
Color Standard RGB color typedef (float)
bool ReadyToRun() override
void GetPointerParameter(const char *parameter, itk::SmartPointer< T > &value) const
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...