31 lines
1.1 KiB
C#
31 lines
1.1 KiB
C#
using Livia.Models;
|
|
using Livia.ViewModels;
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
namespace Astroke.ViewModels;
|
|
|
|
public class AStrokeRoiSummaryControlViewModel(ILogger logger, IRoiLegendManager roiLegendManager)
|
|
: RoiSummaryControlViewModel(logger, roiLegendManager)
|
|
{
|
|
public float Ratio1 { get => _ratio1; private set => SetProperty(ref _ratio1, value); }
|
|
public float Ratio2 { get => _ratio2; private set => SetProperty(ref _ratio2, value); }
|
|
public bool ShowDiagnosis { get => _showDiagnosis; private set => SetProperty(ref _showDiagnosis, value); }
|
|
|
|
|
|
private float _ratio1;
|
|
private float _ratio2;
|
|
private bool _showDiagnosis;
|
|
//private const float ShowDiagnosisThreshold = 1.8f;
|
|
|
|
protected override void UpdateDiagnosis()
|
|
{
|
|
float iscVolume = SelectedIsCRoiExpanderGroupViewModel?.SelectedVolume ?? 0;
|
|
float ispVolume = SelectedIsPRoiExpanderGroupViewModel?.SelectedVolume ?? 0;
|
|
|
|
Ratio1 = ispVolume / iscVolume;
|
|
Ratio2 = 100 * ispVolume / (ispVolume + iscVolume);
|
|
|
|
//ShowDiagnosis = Ratio1 > ShowDiagnosisThreshold && iscVolume > 0;
|
|
ShowDiagnosis = false;
|
|
}
|
|
} |