MacheteImageFilter()
: Superclass()
{
- this->_AddInput("Input");
- this->_MakeOutput< cpPlugins::Interface::Image >("Output");
+ this->_AddInput( "Input" );
+ this->_AddOutput< cpPlugins::Interface::Image >("Output");
- this->m_Parameters->ConfigureAsReal("Radius", 20);
+ this->m_Parameters->ConfigureAsReal("Radius");
//this->m_Parameters->ConfigureAsPoint("Point", 3, 3);
- this->m_Parameters->ConfigureAsReal("X", 30);
- this->m_Parameters->ConfigureAsReal("Y", 30);
- this->m_Parameters->ConfigureAsReal("Z", 30);
-
-
+ this->m_Parameters->ConfigureAsReal("X");
+ this->m_Parameters->ConfigureAsReal("Y");
+ this->m_Parameters->ConfigureAsReal("Z");
+
+ this->m_Parameters->SetReal("Radius", 20);
+ //this->m_Parameters->SetPoint("Point", 3, 3);
+ this->m_Parameters->SetReal("X", 30);
+ this->m_Parameters->SetReal("Y", 30);
+ this->m_Parameters->SetReal("Z", 30);
}
// -------------------------------------------------------------------------
std::string cpPlugins::BasicFilters::MacheteImageFilter::
_GenerateData()
{
- cpPlugins::Interface::Image* image =
- this->GetInput< cpPlugins::Interface::Image >("Input");
- if (image == NULL)
- return("MacheteImageFilter: No input image.");
-
+ auto image = this->GetInputData< cpPlugins::Interface::Image >("Input");
itk::DataObject* itk_image = NULL;
std::string r = "";
cpPlugins_Image_Demangle_AllScalarTypes(2, image, itk_image, r, _GD0);
{
return(
this->_RealGD< I, itk::Image< unsigned char, I::ImageDimension > >(
- image
- )
+ image
+ )
);
}
filter->Update();
// Connect output
- cpPlugins::Interface::Image* out =
- this->GetOutput< cpPlugins::Interface::Image >("Output");
- if (out != NULL)
- {
- out->SetITK< O >( filter->GetOutput( ) );
- return("");
- }
- else
- return("MacheteImageFilter: output not correctly created.");
+ auto out = this->GetOutputData< cpPlugins::Interface::Image >("Output");
+ out->SetITK( filter->GetOutput( ) );
+ return("");
}
// eof - $RCSfile$