19 #include <itkImageRegionIterator.h>
26 this->SetNumberOfRequiredInputs(1);
27 this->SetNumberOfIndexedOutputs(1);
28 this->SetNthOutput(0, output.GetPointer());
37 this->SetInput(0, input);
43 if (idx + 1 > this->GetNumberOfInputs())
45 this->SetNumberOfRequiredInputs(idx + 1);
47 if (input != static_cast<InputType *>(this->ProcessObject::GetInput(idx)))
49 this->ProcessObject::SetNthInput(idx, const_cast<InputType *>(input));
56 if (this->GetNumberOfInputs() < 1)
63 if (this->GetNumberOfInputs() < 1)
75 itkExceptionMacro(
"mitk::ImageToLiveWireContourFilter: No input available. Please set the input!");
79 if (input->GetDimension() != 2)
81 MITK_ERROR <<
"Filter is only working on 2D images.";
82 itkExceptionMacro(
"mitk::ImageToLiveWireContourFilter: Filter is only working on 2D images.. Please make sure that "
87 input->GetGeometry()->WorldToIndex(m_StartPoint, m_StartPointInIndex);
88 input->GetGeometry()->WorldToIndex(m_EndPoint, m_EndPointInIndex);
93 template <
typename TPixel,
unsigned int VImageDimension>
94 void mitk::ImageToLiveWireContourFilter::ItkProcessImage(
const itk::Image<TPixel, VImageDimension> *)
virtual ~ImageToLiveWireContourFilter()
ContourModel is a structure of linked vertices defining a contour in 3D space. The vertices are store...
#define AccessFixedDimensionByItk(mitkImage, itkImageTypeFunction, dimension)
Access a mitk-image with known dimension by an itk-image.
const InputType * GetInput(void)
ImageToLiveWireContourFilter()
void GenerateData() override
virtual mitkBaseDataSourceGetOutputDeclarations itk::DataObject::Pointer MakeOutput(DataObjectPointerArraySizeType idx) override
Image class for storing images.
virtual void SetInput(const InputType *input)