From 7bbf556a8baf42b1631f5a589a2ceccb3ec0dfef Mon Sep 17 00:00:00 2001 From: rodrigovimieiro Date: Tue, 16 Apr 2024 13:50:20 -0300 Subject: [PATCH] Get where was cropped --- pydbt/functions/dataPreProcess.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pydbt/functions/dataPreProcess.py b/pydbt/functions/dataPreProcess.py index a3d8711..369c1df 100644 --- a/pydbt/functions/dataPreProcess.py +++ b/pydbt/functions/dataPreProcess.py @@ -12,8 +12,10 @@ def dataPreProcess(proj, geo, flagtransfIntensity=True, flagCropProj=True): + indX = 0 + if flagCropProj: - proj = cropProj(proj) + proj, indX = cropProj(proj) if flagtransfIntensity: proj = transfIntensity(proj) @@ -21,7 +23,7 @@ def dataPreProcess(proj, geo, flagtransfIntensity=True, flagCropProj=True): # Modifies parameters based on segmentation geo.nu = proj.shape[1] # Number of pixels (columns) - return proj + return proj, indX @@ -61,7 +63,7 @@ def cropProj(proj): proj_crop = proj[:,indX::,:] - return proj_crop + return proj_crop, indX def transfIntensity(proj):