X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=itk%2FclitkAddRelativePositionConstraintToLabelImageFilter.h;h=df052838b2f7e12e139a77fccdd734b3a0f80a16;hb=b07ea516b22fea80f721f2f984c4ae9e3c33ef0a;hp=6e578db10276ebd408bea9055b384f7058ffee7b;hpb=6c46b5b1d02d65fdb3fdccc8174346b49a05a32f;p=clitk.git diff --git a/itk/clitkAddRelativePositionConstraintToLabelImageFilter.h b/itk/clitkAddRelativePositionConstraintToLabelImageFilter.h index 6e578db..df05283 100644 --- a/itk/clitkAddRelativePositionConstraintToLabelImageFilter.h +++ b/itk/clitkAddRelativePositionConstraintToLabelImageFilter.h @@ -21,6 +21,7 @@ // clitk #include "clitkFilterBase.h" +#include "clitkCropLikeImageFilter.h" // itk #include @@ -78,20 +79,23 @@ namespace clitk { typedef itk::Image FloatImageType; /** Orientation types */ - typedef enum { AtRightTo = 0, AtLeftTo = 1, + typedef enum { RightTo = 0, LeftTo = 1, AntTo = 2, PostTo = 3, InfTo = 4, SupTo = 5, Angle = 6 } OrientationTypeEnumeration; /** Input : initial image and object */ - void SetInput(const ImageType * image); + void SetInput(const ImageType * image) ITK_OVERRIDE; void SetInputObject(const ImageType * image); // Options void AddOrientationType(OrientationTypeEnumeration orientation); void AddOrientationTypeString(std::string s); void ClearOrientationType(); - void AddAngles(double a, double b); + void AddAnglesInRad(double a, double b); + void AddAnglesInDeg(double a, double b); + double GetAngle1InRad(int i) { return m_Angle1[i]; } + double GetAngle2InRad(int i) { return m_Angle2[i]; } int GetNumberOfAngles(); std::string GetOrientationTypeString(int i) { return m_OrientationTypeString[i]; } std::vector & GetOrientationTypeString() { return m_OrientationTypeString; } @@ -128,8 +132,31 @@ namespace clitk { itkSetMacro(CombineWithOrFlag, bool); itkBooleanMacro(CombineWithOrFlag); + itkGetConstMacro(FuzzyMapOnlyFlag, bool); + itkSetMacro(FuzzyMapOnlyFlag, bool); + itkBooleanMacro(FuzzyMapOnlyFlag); + + itkGetConstMacro(FastFlag, bool); + itkSetMacro(FastFlag, bool); + itkBooleanMacro(FastFlag); + + itkGetConstMacro(Radius, double); + itkSetMacro(Radius, double); + + itkSetMacro(K1, double); + itkGetMacro(K1, double); + + typename FloatImageType::Pointer GetFuzzyMap() { return m_FuzzyMap; } + // I dont want to verify inputs information - virtual void VerifyInputInformation() { } +#if ITK_VERSION_MAJOR <= 4 + virtual void VerifyInputInformation() ITK_OVERRIDE { } +#else + virtual void VerifyInputInformation() const ITK_OVERRIDE { } +#endif + + // For debug + void PrintOptions(); protected: AddRelativePositionConstraintToLabelImageFilter(); @@ -148,15 +175,21 @@ namespace clitk { bool m_InverseOrientationFlag; bool m_RemoveObjectFlag; bool m_CombineWithOrFlag; + bool m_FuzzyMapOnlyFlag; + bool m_FastFlag; + double m_Radius; + double m_K1; - virtual void GenerateOutputInformation(); - virtual void GenerateInputRequestedRegion(); - virtual void GenerateData(); + virtual void GenerateOutputInformation() ITK_OVERRIDE; + virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; + virtual void GenerateData() ITK_OVERRIDE; typedef itk::PasteImageFilter PasteFilterType; + typedef itk::PasteImageFilter PasteFloatFilterType; typename ImageType::Pointer working_image; typename ImageType::Pointer object_resampled; typename FloatImageType::Pointer relPos; + typename FloatImageType::Pointer m_FuzzyMap; ImagePointer input; ImagePointer object;