X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=itk%2FclitkAddRelativePositionConstraintToLabelImageFilter.txx;h=a9f8a910893efd4049270c3dbfeb8bf2b794524e;hb=573d80d0f7a17607d2ee883c21c940c0ba020282;hp=f56c4f44bedf4c303fe11f74dfdf808b77e1acc3;hpb=9e5e119f00eb9051aa56e480aba3e86d053cdb80;p=clitk.git diff --git a/itk/clitkAddRelativePositionConstraintToLabelImageFilter.txx b/itk/clitkAddRelativePositionConstraintToLabelImageFilter.txx index f56c4f4..a9f8a91 100644 --- a/itk/clitkAddRelativePositionConstraintToLabelImageFilter.txx +++ b/itk/clitkAddRelativePositionConstraintToLabelImageFilter.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 - ======================================================================-====*/ + ===========================================================================**/ // clitk #include "clitkCommon.h" @@ -55,6 +55,8 @@ AddRelativePositionConstraintToLabelImageFilter(): InverseOrientationFlagOff(); RemoveObjectFlagOn(); CombineWithOrFlagOff(); + VerboseStepFlagOff(); + WriteStepFlagOff(); } //-------------------------------------------------------------------- @@ -122,7 +124,14 @@ AddOrientationTypeString(std::string t) case 'P' : AddOrientationType(PostTo);break; case 'S' : AddOrientationType(SupTo);break; case 'I' : AddOrientationType(InfTo);break; - default: clitkExceptionMacro("Error, you must provide L,R or A,P or S,I"); + case 'N': + if (t == "NotLeftTo") { AddOrientationType(AtLeftTo); InverseOrientationFlagOn(); break; } + if (t == "NotRightTo") { AddOrientationType(AtRightTo); InverseOrientationFlagOn(); break; } + if (t == "NotAntTo") { AddOrientationType(AntTo); InverseOrientationFlagOn(); break; } + if (t == "NotPostTo") { AddOrientationType(PostTo); InverseOrientationFlagOn(); break; } + if (t == "NotSupTo") { AddOrientationType(SupTo); InverseOrientationFlagOn(); break; } + if (t == "NotInfTo") { AddOrientationType(InfTo); InverseOrientationFlagOn(); break; } + default: clitkExceptionMacro("Error, you must provide L,R or A,P or S,I (or NotLeftTo, NotRightTo etc)"); } } //-------------------------------------------------------------------- @@ -425,7 +434,6 @@ GenerateData() typename PasteFilterType::Pointer padFilter2 = PasteFilterType::New(); padFilter2->SetSourceImage(working_image); padFilter2->SetDestinationImage(temp); - // DD(input->GetLargestPossibleRegion().GetIndex()); padFilter2->SetDestinationIndex(input->GetLargestPossibleRegion().GetIndex()); padFilter2->SetSourceRegion(working_image->GetLargestPossibleRegion()); padFilter2->Update();