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

BUG: LineSegmentDetector waits for an image with MetadataDictionnary

parent 05f7dd2b
Branches
Tags
No related merge requests found
...@@ -71,15 +71,18 @@ PersistentStreamingLineSegmentDetector<TInputImage> ...@@ -71,15 +71,18 @@ PersistentStreamingLineSegmentDetector<TInputImage>
typename ExtractImageFilterType::Pointer extract = ExtractImageFilterType::New(); typename ExtractImageFilterType::Pointer extract = ExtractImageFilterType::New();
extract->SetInput( this->GetInput() ); extract->SetInput( this->GetInput() );
extract->SetExtractionRegion( this->GetInput()->GetBufferedRegion() ); extract->SetExtractionRegion( this->GetInput()->GetBufferedRegion() );
extract->Update();
// WARNING: itk::ExtractImageFilter does not copy the MetadataDictionnary // WARNING: itk::ExtractImageFilter does not copy the MetadataDictionnary
// We are in index coordinates from now on // but LSD filter need the projection ref if available
extract->GetOutput()->SetMetaDataDictionary(this->GetInput()->GetMetaDataDictionary());
typename LSDType::Pointer lsd = LSDType::New(); typename LSDType::Pointer lsd = LSDType::New();
lsd->SetInput(extract->GetOutput()); lsd->SetInput(extract->GetOutput());
lsd->UpdateOutputInformation(); lsd->UpdateOutputInformation();
lsd->Update(); lsd->Update();
// return the LSD VectorData in image index coordinates // return the LSD VectorData in image physical coordinates
return lsd->GetOutput(); return lsd->GetOutput();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment