X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=tools%2FclitkImageExtractLine.cxx;h=3d59bf57882f0f502a0d05fe3a065c12d789fe29;hb=c167ace7ba7780e29e52c4450d69c3123c9bbcee;hp=a4040dd2b05f1a6ce39ab52eb873e277286970f7;hpb=7b7aa6a850620a9932b5a65ec035845c5800319e;p=clitk.git diff --git a/tools/clitkImageExtractLine.cxx b/tools/clitkImageExtractLine.cxx index a4040dd..3d59bf5 100644 --- a/tools/clitkImageExtractLine.cxx +++ b/tools/clitkImageExtractLine.cxx @@ -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 -======================================================================-====*/ +===========================================================================**/ #ifndef CLITKIMAGEEXTRACTLINE_CXX #define 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 (size_t i=0; i iter(input, firstIndex, lastIndex); + iter.GoToBegin(); + // std::cout<<"B"<