Authors belong to:
- University of LYON http://www.universite-lyon.fr/
- - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr
+ - Léon Bérard cancer center http://www.centreleonberard.fr
- CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
This software is distributed WITHOUT ANY WARRANTY; without even
- BSD See included LICENSE.txt file
- CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- ======================================================================-====*/
+ ===========================================================================**/
#ifndef CLITKFILLMASKFILTER_TXX
#define CLITKFILLMASKFILTER_TXX
// Default global options
this->SetNumberOfRequiredInputs(1);
ResetDirections();
- AddDirection(2);
- AddDirection(1);
- AddDirection(0);
}
//--------------------------------------------------------------------
//----------------------------------------
typename InternalImageType::Pointer output = inputCaster->GetOutput();
for (unsigned int i=0; i<m_Directions.size();i++) {
- DD(i);
//----------------------------------------
// Fill the holes of a mask in 2D
//----------------------------------------
start2D[m_Directions[i]]=sliceIndex;
desiredRegion.SetIndex( start2D );
extractFilter->SetExtractionRegion( desiredRegion );
+#if ITK_VERSION_MAJOR == 4
+ extractFilter->SetDirectionCollapseToSubmatrix();
+#endif
extractFilter->Update( );
typename ImageSliceType::Pointer slice= extractFilter->GetOutput();
}
// Join to a 3D image
- std::cout<<"Joining the slices..."<<std::endl;
joinFilter->Update();
// Permute the axes to reset to orientation
output->SetOrigin(input->GetOrigin());
}
- writeImage<InternalImageType>(output, "toto.mhd");
-
// Cast
- DD("cast");
typedef itk::CastImageFilter<InternalImageType,ImageType> OutputCastImageFilterType;
typename OutputCastImageFilterType::Pointer outputCaster =OutputCastImageFilterType::New();
outputCaster->SetInput(output);
outputCaster->Update();
// Output
- DD("Graft");
this->GraftOutput(outputCaster->GetOutput());
}
//--------------------------------------------------------------------