Skip to content
Snippets Groups Projects
Commit 7df9289f authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

BUG: Mantis-942: pixel convention consistency for BasicFilters

parent c91f36b2
No related branches found
No related tags found
No related merge requests found
......@@ -370,6 +370,8 @@ SpatialObjectToImageDrawingFilter<TInputSpatialObject, TOutputImage>
if (originspecified)
{
origine[0] += 0.5 * m_Spacing[0];
origine[1] += 0.5 * m_Spacing[1];
OutputImage->SetOrigin(origine); // and origin
m_Origin[0] = OutputImage->GetOrigin()[0];
m_Origin[1] = OutputImage->GetOrigin()[1];
......
......@@ -288,8 +288,8 @@ VectorDataToLabelImageFilter<TVectorData, TOutputImage>::GenerateData()
OutputIndexType bufferIndexOrigin = bufferedRegion.GetIndex();
OutputOriginType bufferOrigin;
this->GetOutput()->TransformIndexToPhysicalPoint(bufferIndexOrigin, bufferOrigin);
geoTransform[0] = bufferOrigin[0];
geoTransform[3] = bufferOrigin[1];
geoTransform[0] = bufferOrigin[0] - 0.5 * this->GetOutput()->GetSpacing()[0];
geoTransform[3] = bufferOrigin[1] - 0.5 * this->GetOutput()->GetSpacing()[1];
geoTransform[1] = this->GetOutput()->GetSpacing()[0];
geoTransform[5] = this->GetOutput()->GetSpacing()[1];
......
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