Skip to content
Snippets Groups Projects
Commit e50bc0fc authored by Julien Malik's avatar Julien Malik
Browse files

BUG: keep a reference on the extract filter

parent 0dc226a9
No related branches found
No related tags found
No related merge requests found
......@@ -154,12 +154,12 @@ private:
otbAppLogINFO("Using input mask");
// Load mask image and cast into LabeledImageType
FloatVectorImageType::Pointer inMask = GetParameterImage("mask");
ExtractImageFilterType::Pointer extract = ExtractImageFilterType::New();
extract->SetInput( inMask );
extract->SetChannel(0);
extract->UpdateOutputInformation();
m_Extract = ExtractImageFilterType::New();
m_Extract->SetInput( inMask );
m_Extract->SetChannel(0);
m_Extract->UpdateOutputInformation();
m_ClassificationFilter->SetInputMask(extract->GetOutput());
m_ClassificationFilter->SetInputMask(m_Extract->GetOutput());
}
SetParameterOutputImage<UInt8ImageType>("out", m_ClassificationFilter->GetOutput());
......@@ -168,7 +168,7 @@ private:
ClassificationFilterType::Pointer m_ClassificationFilter;
ModelPointerType m_ModelSVM;
RescalerType::Pointer m_Rescaler;
CastImageFilterType::Pointer m_FinalCast;
ExtractImageFilterType::Pointer m_Extract;
};
......
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