Commit 768e7862 authored by remi cresson's avatar remi cresson

FIX: enforce new ITK rule against pixel spacing

parent 12341e81
......@@ -201,7 +201,7 @@ public:
m_RasterizeFilter = RasteriseFilterType::New();
m_RasterizeFilter->AddVectorData(m_VectorDataReprojectionFilter->GetOutput());
m_RasterizeFilter->SetOutputOrigin(xs->GetOrigin());
m_RasterizeFilter->SetOutputSpacing(xs->GetSpacing());
m_RasterizeFilter->SetOutputSpacing(xs->GetSignedSpacing());
m_RasterizeFilter->SetOutputSize(xs->GetLargestPossibleRegion().GetSize());
m_RasterizeFilter->SetBurnMaxValueMode(true);
m_RasterizeFilter->SetOutputProjectionRef(xs->GetProjectionRef());
......
......@@ -119,7 +119,7 @@ VectorDataToLabelImageCustomFilter<TVectorData, TOutputImage>
::SetOutputParametersFromImage(const ImageBaseType * src)
{
this->SetOutputOrigin ( src->GetOrigin() );
this->SetOutputSpacing ( src->GetSpacing() );
this->SetOutputSignedSpacing ( src->GetSignedSpacing() );
this->SetOutputSize ( src->GetLargestPossibleRegion().GetSize() );
otb::ImageMetadataInterfaceBase::Pointer imi = otb::ImageMetadataInterfaceFactory::CreateIMI(src->GetMetaDataDictionary());
this->SetOutputProjectionRef(imi->GetProjectionRef());
......@@ -144,7 +144,7 @@ VectorDataToLabelImageCustomFilter<TVectorData, TOutputImage>
outputPtr->SetLargestPossibleRegion(outputLargestPossibleRegion);
// Set spacing and origin
outputPtr->SetSpacing(m_OutputSpacing);
outputPtr->SetSignedSpacing(m_OutputSpacing);
outputPtr->SetOrigin(m_OutputOrigin);
itk::MetaDataDictionary& dict = outputPtr->GetMetaDataDictionary();
......@@ -295,8 +295,8 @@ VectorDataToLabelImageCustomFilter<TVectorData, TOutputImage>::GenerateData()
this->GetOutput()->TransformIndexToPhysicalPoint(bufferIndexOrigin, bufferOrigin);
geoTransform[0] = bufferOrigin[0];
geoTransform[3] = bufferOrigin[1];
geoTransform[1] = this->GetOutput()->GetSpacing()[0];
geoTransform[5] = this->GetOutput()->GetSpacing()[1];
geoTransform[1] = this->GetOutput()->GetSignedSpacing()[0];
geoTransform[5] = this->GetOutput()->GetSignedSpacing()[1];
// FIXME: Here component 1 and 4 should be replaced by the orientation parameters
geoTransform[2] = 0.;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment