X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=tools%2FclitkImageExtractLine.cxx;h=7584d94a62403fddb8c4d45f9bf383ac9743c342;hb=dd5f76100aae9f0a2dc7163327163ffceb37b07e;hp=a4040dd2b05f1a6ce39ab52eb873e277286970f7;hpb=7b7aa6a850620a9932b5a65ec035845c5800319e;p=clitk.git diff --git a/tools/clitkImageExtractLine.cxx b/tools/clitkImageExtractLine.cxx index a4040dd..7584d94 100644 --- a/tools/clitkImageExtractLine.cxx +++ b/tools/clitkImageExtractLine.cxx @@ -104,75 +104,71 @@ int main(int argc, char * argv[]) } } // args_info.integral_arg=1, so, it computes the integral - else if (lastIndex[0]-firstIndex[0]==0 && lastIndex[1]-firstIndex[1]==0 && lastIndex[2]-firstIndex[2]>0) - direction=1; - else if (lastIndex[0]-firstIndex[0]==0 && lastIndex[1]-firstIndex[1]>0 && lastIndex[2]-firstIndex[2]==0) - direction=2; - else if (lastIndex[0]-firstIndex[0]>0 && lastIndex[1]-firstIndex[1]==0 && lastIndex[2]-firstIndex[2]==0) - direction=3; - else{ - //std::cout<GetLargestPossibleRegion().GetSize(); - DD(dim); - DD(direction); - int a=0, b=0, c=0; - - if (direction==2){ - a=0; - b=1; - c=2; + if (args_info.integralAxis_arg==0){ + a=1; + b=0; + c=2; + } + else if (args_info.integralAxis_arg==1){ + a=0; + b=1; + c=2; + } + else if (args_info.integralAxis_arg==2){ + a=2; + b=0; + c=1; + } + else {std::cout<<"Wrong axis"<GetLargestPossibleRegion().GetSize(); + DD(dim); + DD(direction); - int k; - for (int i=0; i iter(input, firstIndex, lastIndex); - iter.GoToBegin(); - // std::cout<<"B"< val(dim[b]); + for (int i=0; i iter(input, firstIndex, lastIndex); + iter.GoToBegin(); + // std::cout<<"B"<