# Extract Image Filter ForceStrategy

Disambiguate the behavior of the resulting image direction when collapsing to a lower dimensional image.
itk::ExtractImageFilter<ImageType>::Pointer myfilter=itk::ExtractImageFilter<ImageType>::New();
itk::ExtractImageFilter<ImageType>::Pointer myfilter=itk::ExtractImageFilter<ImageType>::New(); #if ITK_VERSION_MAJOR >=4 myfilter->SetDirectionCollapseToSubmatrix(); //When collapsing from a list of properly defined phsycial spaces (i.e. collapsing on time in a 3D+time image) myfilter->SetDirectionCollapseToGuess(); //ITKv3 compatible, but not recommended myfilter->SetDirectionCollapseToIdentity(); //If you don't care about resulting image dimension #endif
I5e5f1cfc3efbc235ade2cd824f2f23ec40a4546c
Code/BasicFilters/itkCropImageFilter.h Code/BasicFilters/itkExtractImageFilter.h Code/BasicFilters/itkExtractImageFilter.txx Code/IO/itkTestDriver.cxx Examples/IO/ImageReadExtractFilterInsertWrite.cxx Examples/IO/ImageReadExtractWrite.cxx Examples/IO/VisibleHumanStreamReadWrite.cxx Examples/Registration/ImageRegistration8.cxx Testing/Code/BasicFilters/itkExtractImageTest.cxx Testing/Code/BasicFilters/itkJoinSeriesImageFilterStreamingTest.cxx Testing/Code/BasicFilters/itkMaximumProjectionImageFilterTest2.cxx Testing/Code/BasicFilters/itkMaximumProjectionImageFilterTest3.cxx Testing/Code/IO/ImageCompare.cxx Testing/Code/IO/ImageCompareCommand.cxx Testing/Code/IO/itkImageFileReaderStreamingTest2.cxx Testing/Code/IO/itkImageFileWriterPastingTest2.cxx Testing/Code/IO/itkImageFileWriterStreamingPastingCompressingTest1.cxx
ExtractImageFilter
Based on desired behavior, select the desired strategy for collapsing.