Skip to content
Snippets Groups Projects
Commit fd998699 authored by remi cresson's avatar remi cresson
Browse files

REFAC: remove ioRegion.SetIndex(i, streamRegion.GetIndex(i))

parent f55c18be
No related branches found
No related tags found
No related merge requests found
...@@ -469,8 +469,6 @@ ImageFileWriter<TInputImage> ...@@ -469,8 +469,6 @@ ImageFileWriter<TInputImage>
inputPtr->UpdateOutputInformation(); inputPtr->UpdateOutputInformation();
InputImageRegionType inputRegion = inputPtr->GetLargestPossibleRegion(); InputImageRegionType inputRegion = inputPtr->GetLargestPossibleRegion();
typename TInputImage::PointType origin = inputPtr->GetOrigin(); typename TInputImage::PointType origin = inputPtr->GetOrigin();
const typename TInputImage::SpacingType& spacing = inputPtr->GetSpacing();
const typename TInputImage::DirectionType& direction = inputPtr->GetDirection();
/** Parse region size modes */ /** Parse region size modes */
if(m_FilenameHelper->BoxIsSet()) if(m_FilenameHelper->BoxIsSet())
...@@ -546,6 +544,8 @@ ImageFileWriter<TInputImage> ...@@ -546,6 +544,8 @@ ImageFileWriter<TInputImage>
// //
// Setup the ImageIO with information from inputPtr // Setup the ImageIO with information from inputPtr
// //
const typename TInputImage::SpacingType& spacing = inputPtr->GetSpacing();
const typename TInputImage::DirectionType& direction = inputPtr->GetDirection();
m_ImageIO->SetNumberOfDimensions(TInputImage::ImageDimension); m_ImageIO->SetNumberOfDimensions(TInputImage::ImageDimension);
int direction_sign(0); int direction_sign(0);
for (unsigned int i = 0; i < TInputImage::ImageDimension; ++i) for (unsigned int i = 0; i < TInputImage::ImageDimension; ++i)
...@@ -620,7 +620,6 @@ ImageFileWriter<TInputImage> ...@@ -620,7 +620,6 @@ ImageFileWriter<TInputImage>
for (unsigned int i = 0; i < TInputImage::ImageDimension; ++i) for (unsigned int i = 0; i < TInputImage::ImageDimension; ++i)
{ {
ioRegion.SetSize(i, streamRegion.GetSize(i)); ioRegion.SetSize(i, streamRegion.GetSize(i));
ioRegion.SetIndex(i, streamRegion.GetIndex(i));
//Set the ioRegion index using the shifted index ( (0,0 without box parameter)) //Set the ioRegion index using the shifted index ( (0,0 without box parameter))
ioRegion.SetIndex(i, streamRegion.GetIndex(i) - m_ShiftOutputIndex[i]); ioRegion.SetIndex(i, streamRegion.GetIndex(i) - m_ShiftOutputIndex[i]);
} }
......
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