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

FIX: enforce new ITK rule against pixel spacing

No related merge requests found
Showing with 5 additions and 5 deletions
+5 -5
...@@ -201,7 +201,7 @@ public: ...@@ -201,7 +201,7 @@ public:
m_RasterizeFilter = RasteriseFilterType::New(); m_RasterizeFilter = RasteriseFilterType::New();
m_RasterizeFilter->AddVectorData(m_VectorDataReprojectionFilter->GetOutput()); m_RasterizeFilter->AddVectorData(m_VectorDataReprojectionFilter->GetOutput());
m_RasterizeFilter->SetOutputOrigin(xs->GetOrigin()); m_RasterizeFilter->SetOutputOrigin(xs->GetOrigin());
m_RasterizeFilter->SetOutputSpacing(xs->GetSpacing()); m_RasterizeFilter->SetOutputSpacing(xs->GetSignedSpacing());
m_RasterizeFilter->SetOutputSize(xs->GetLargestPossibleRegion().GetSize()); m_RasterizeFilter->SetOutputSize(xs->GetLargestPossibleRegion().GetSize());
m_RasterizeFilter->SetBurnMaxValueMode(true); m_RasterizeFilter->SetBurnMaxValueMode(true);
m_RasterizeFilter->SetOutputProjectionRef(xs->GetProjectionRef()); m_RasterizeFilter->SetOutputProjectionRef(xs->GetProjectionRef());
......
...@@ -119,7 +119,7 @@ VectorDataToLabelImageCustomFilter<TVectorData, TOutputImage> ...@@ -119,7 +119,7 @@ VectorDataToLabelImageCustomFilter<TVectorData, TOutputImage>
::SetOutputParametersFromImage(const ImageBaseType * src) ::SetOutputParametersFromImage(const ImageBaseType * src)
{ {
this->SetOutputOrigin ( src->GetOrigin() ); this->SetOutputOrigin ( src->GetOrigin() );
this->SetOutputSpacing ( src->GetSpacing() ); this->SetOutputSignedSpacing ( src->GetSignedSpacing() );
this->SetOutputSize ( src->GetLargestPossibleRegion().GetSize() ); this->SetOutputSize ( src->GetLargestPossibleRegion().GetSize() );
otb::ImageMetadataInterfaceBase::Pointer imi = otb::ImageMetadataInterfaceFactory::CreateIMI(src->GetMetaDataDictionary()); otb::ImageMetadataInterfaceBase::Pointer imi = otb::ImageMetadataInterfaceFactory::CreateIMI(src->GetMetaDataDictionary());
this->SetOutputProjectionRef(imi->GetProjectionRef()); this->SetOutputProjectionRef(imi->GetProjectionRef());
...@@ -144,7 +144,7 @@ VectorDataToLabelImageCustomFilter<TVectorData, TOutputImage> ...@@ -144,7 +144,7 @@ VectorDataToLabelImageCustomFilter<TVectorData, TOutputImage>
outputPtr->SetLargestPossibleRegion(outputLargestPossibleRegion); outputPtr->SetLargestPossibleRegion(outputLargestPossibleRegion);
// Set spacing and origin // Set spacing and origin
outputPtr->SetSpacing(m_OutputSpacing); outputPtr->SetSignedSpacing(m_OutputSpacing);
outputPtr->SetOrigin(m_OutputOrigin); outputPtr->SetOrigin(m_OutputOrigin);
itk::MetaDataDictionary& dict = outputPtr->GetMetaDataDictionary(); itk::MetaDataDictionary& dict = outputPtr->GetMetaDataDictionary();
...@@ -295,8 +295,8 @@ VectorDataToLabelImageCustomFilter<TVectorData, TOutputImage>::GenerateData() ...@@ -295,8 +295,8 @@ VectorDataToLabelImageCustomFilter<TVectorData, TOutputImage>::GenerateData()
this->GetOutput()->TransformIndexToPhysicalPoint(bufferIndexOrigin, bufferOrigin); this->GetOutput()->TransformIndexToPhysicalPoint(bufferIndexOrigin, bufferOrigin);
geoTransform[0] = bufferOrigin[0]; geoTransform[0] = bufferOrigin[0];
geoTransform[3] = bufferOrigin[1]; geoTransform[3] = bufferOrigin[1];
geoTransform[1] = this->GetOutput()->GetSpacing()[0]; geoTransform[1] = this->GetOutput()->GetSignedSpacing()[0];
geoTransform[5] = this->GetOutput()->GetSpacing()[1]; geoTransform[5] = this->GetOutput()->GetSignedSpacing()[1];
// FIXME: Here component 1 and 4 should be replaced by the orientation parameters // FIXME: Here component 1 and 4 should be replaced by the orientation parameters
geoTransform[2] = 0.; geoTransform[2] = 0.;
......
Supports Markdown
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