- int k;
- for (int i=0; i<dim[a]; i++){
- for (int j=0; j<dim[c]; j++){
- // std::cout<<"i "<<i<<" j "<<j<<std::endl;
- k=0;
- firstIndex[a]=i;
- firstIndex[c]=j;
- lastIndex[a]=i;
- lastIndex[c]=j;
- // std::cout<<"A"<<std::endl;
- itk::LineConstIterator<ImageType> iter(input, firstIndex, lastIndex);
- iter.GoToBegin();
- // std::cout<<"B"<<std::endl;
- val[k]+=iter.Get();
- k++;
- // std::cout<<"C"<<std::endl;
- while (!iter.IsAtEnd()) {
- // std::cout<<"D "<<k<<std::endl;
+ std::vector<double> val(dim[b]);
+ for (size_t i=0; i<dim[b]; i++)
+ val[i]=0;
+
+ int k;
+
+ for (int i=args_info.firstIndex_arg[a]; i<args_info.lastIndex_arg[a]; i++){
+ for (int j=args_info.firstIndex_arg[c]; j<args_info.lastIndex_arg[c]; j++){
+ // std::cout<<"i "<<i<<" j "<<j<<std::endl;
+ k=0;
+ firstIndex[a]=i;
+ firstIndex[c]=j;
+ lastIndex[a]=i;
+ lastIndex[c]=j;
+ // std::cout<<"A"<<std::endl;
+ itk::LineConstIterator<ImageType> iter(input, firstIndex, lastIndex);
+ iter.GoToBegin();
+ // std::cout<<"B"<<std::endl;