]> Creatis software - creaVtk.git/commitdiff
#2468 creaVtk Feature New Normal - Clean UnMosaic Code
authordavila <eduardo.davila@creatis.insa-lyon.fr>
Mon, 20 Oct 2014 13:38:02 +0000 (15:38 +0200)
committerdavila <eduardo.davila@creatis.insa-lyon.fr>
Mon, 20 Oct 2014 13:38:02 +0000 (15:38 +0200)
lib/creaVtk/creaVtkUnMosaicVectorVtkImageData.cpp

index 59a5235a62d63db06fde945bb140f65f683313b2..c3334e9d1ed5ce08ceca573cc8ec3e3ed862e734 100644 (file)
@@ -41,14 +41,14 @@ std::vector<vtkImageData*> creaVtkUnMosaicVectorVtkImageData::unMosaicVectorVtkI
        std::vector<int> nbImagesInMosaic;
 
        for(int i = 0; i < NbImagesInMosaicVector.size(); i++){
-               nbImagesInMosaic.push_back(NbImagesInMosaicVector[i]);
                nbImagesPerRow.push_back( ceil(sqrt(NbImagesInMosaicVector[i])) );
+               nbImagesInMosaic.push_back(NbImagesInMosaicVector[i]);
        }
 
        if(imageInput.size() != NbImagesInMosaicVector.size()){
                for(int j = NbImagesInMosaicVector.size(); j < imageInput.size(); j++)  {       
-                       nbImagesInMosaic.push_back( NbImagesInMosaicVector[NbImagesInMosaicVector.size()-1] );
                        nbImagesPerRow.push_back( ceil(sqrt(NbImagesInMosaicVector[NbImagesInMosaicVector.size()-1])) );                
+                       nbImagesInMosaic.push_back( NbImagesInMosaicVector[NbImagesInMosaicVector.size()-1] );
                }
        }