X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=segmentation%2FclitkFillMaskFilter.txx;h=7d2369cdf9839eb317ed0ec26b747eca351e3855;hb=2d9ef51e893a0b5b93d44a88594c9c76e4b61239;hp=7ddda01b3f19f4a3cd4650741f5f010e01672cda;hpb=205ae7d81e6049af88e1cf14dde9c3473240887a;p=clitk.git diff --git a/segmentation/clitkFillMaskFilter.txx b/segmentation/clitkFillMaskFilter.txx index 7ddda01..7d2369c 100644 --- a/segmentation/clitkFillMaskFilter.txx +++ b/segmentation/clitkFillMaskFilter.txx @@ -3,7 +3,7 @@ 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 @@ -14,7 +14,7 @@ - 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 @@ -27,9 +27,6 @@ clitk::FillMaskFilter::FillMaskFilter(): // Default global options this->SetNumberOfRequiredInputs(1); ResetDirections(); - AddDirection(2); - AddDirection(1); - AddDirection(0); } //-------------------------------------------------------------------- @@ -108,7 +105,6 @@ GenerateData() //---------------------------------------- typename InternalImageType::Pointer output = inputCaster->GetOutput(); for (unsigned int i=0; iSetExtractionRegion( desiredRegion ); +#if ITK_VERSION_MAJOR == 4 + extractFilter->SetDirectionCollapseToSubmatrix(); +#endif extractFilter->Update( ); typename ImageSliceType::Pointer slice= extractFilter->GetOutput(); @@ -196,7 +195,6 @@ GenerateData() } // Join to a 3D image - std::cout<<"Joining the slices..."<Update(); // Permute the axes to reset to orientation @@ -229,17 +227,13 @@ GenerateData() output->SetOrigin(input->GetOrigin()); } - writeImage(output, "toto.mhd"); - // Cast - DD("cast"); typedef itk::CastImageFilter OutputCastImageFilterType; typename OutputCastImageFilterType::Pointer outputCaster =OutputCastImageFilterType::New(); outputCaster->SetInput(output); outputCaster->Update(); // Output - DD("Graft"); this->GraftOutput(outputCaster->GetOutput()); } //--------------------------------------------------------------------