#pragma once #include "itkCommandObjectBase.h" #include "itkDTIEstimatorTensorImageFilter.h" #include "itkRemoveNonPositiveTensorsTensorImageFilter.h" #include "itkTensorImageIO.h" #include #include #include #include "itkNumericTraits.h" #include "itkGradientFileReader.h" #include namespace itk { class DTIMultiEstimatorCommand : public CommandObjectBase { public: typedef DTIMultiEstimatorCommand Self; typedef CommandObjectBase Superclass; typedef SmartPointer Pointer; typedef SmartPointer ConstPointer; itkTypeMacro(DTIMultiEstimatorCommand, CommandObjectBase); itkNewMacro(Self); typedef double ScalarType; typedef itk::Image ImageType; typedef itk::Image Image4DType; typedef itk::TensorImageIO IOType; typedef IOType::TensorImageType TensorImageType; typedef itk::ImageFileReader ReaderType; typedef itk::ImageFileReader Reader4DType; typedef itk::DTIEstimatorTensorImageFilter EstimatorType; typedef EstimatorType::GradientType GradientType; typedef EstimatorType::GradientListType GradientListType; typedef itk::RemoveNonPositiveTensorsTensorImageFilter RemoveNPTFilterType; typedef Image4DType::RegionType Region4dType; typedef Image4DType::SpacingType Spacing4Dtype; typedef itk::ImageRegionIterator Iterator4DType; typedef Iterator4DType::IndexType Index4DType; typedef ImageType::DirectionType Direction3Dtype; typedef Image4DType::DirectionType Direction4Dtype; typedef std::pair DWIType; typedef std::vector ListOfDWIType; const char *GetCommandName(void) { return "estimate-multi"; } int Execute(int nargs, const char *args[]); protected: DTIMultiEstimatorCommand(); ~DTIMultiEstimatorCommand(); private: DTIMultiEstimatorCommand(const Self&); void operator=(const Self&); std::vector GetAllPossibleDWILists (ListOfDWIType input); std::vector GetDWIListsWithOneRemoval (ListOfDWIType input); std::vector GetAllNSubsets (ListOfDWIType input, unsigned int outputsize); }; }