fix(analysis): appliquer la rotation du crop sur l'image en modes calibration et plotting

This commit is contained in:
qguillaume
2026-05-27 12:11:00 +02:00
parent 04c1204116
commit 95e62abe47
2 changed files with 47 additions and 26 deletions

View File

@@ -50,6 +50,9 @@ class AnalysisProvider extends ChangeNotifier {
String? _imagePath;
TargetType? _targetType;
// AJOUT PROTECTION DU PLOTTING : Stockage permanent de la rotation du Crop
double _cropRotation = 0.0;
// Target detection results
double _targetCenterX = 0.5;
double _targetCenterY = 0.5;
@@ -82,6 +85,7 @@ class AnalysisProvider extends ChangeNotifier {
String? get errorMessage => _errorMessage;
String? get imagePath => _imagePath;
TargetType? get targetType => _targetType;
double get cropRotation => _cropRotation; // Getter pour le Plotting
double get targetCenterX => _targetCenterX;
double get targetCenterY => _targetCenterY;
double get targetRadius => _targetRadius;
@@ -112,6 +116,12 @@ class AnalysisProvider extends ChangeNotifier {
? _correctedImagePath
: _imagePath;
/// Modifie et mémorise la rotation de l'image pour le Plotting
void setCropRotation(double rotation) {
_cropRotation = rotation;
notifyListeners();
}
/// Analyze an image
///
/// [autoAnalyze] determines if we should run automatic detection immediately.
@@ -778,6 +788,7 @@ class AnalysisProvider extends ChangeNotifier {
_errorMessage = null;
_imagePath = null;
_targetType = null;
_cropRotation = 0.0; // Reset de la rotation
_targetCenterX = 0.5;
_targetCenterY = 0.5;
_targetRadius = 0.4;