module ParasitemiaUI.Analysis
open System
-open System.IO
open System.Linq
open System.Windows
-open System.Windows.Media
-open System.Windows.Markup
-open System.Windows.Shapes
open System.Windows.Controls
-open System.Diagnostics
-open Microsoft.Win32 // For the common dialogs.
-
-open Emgu.CV.WPF
+open ParasitemiaUIControls
open ParasitemiaCore.UnitsOfMeasure
open ParasitemiaCore.Config
open Types
let showWindow (parent : Window) (state : State.State) : bool =
- let win = Views.AnalysisWindow ()
+ let win = AnalysisWindow ()
win.Owner <- parent
win.Left <- (if parent.WindowState = WindowState.Maximized then 0. else parent.Left) + parent.ActualWidth / 2. - win.Width / 2.
win.Top <- (if parent.WindowState = WindowState.Maximized then 0. else parent.Top) + parent.ActualHeight / 2. - win.Height / 2.
win.stackSourceImagesSelection.Children.Clear ()
let width = int win.stackSourceImagesSelection.ActualWidth
for srcImg in state.SourceImages do
- let imageSourceSelection = Views.ImageSourceSelection (Tag = srcImg, Margin = Thickness 3.)
+ let imageSourceSelection = ImageSourceSelection (Tag = srcImg, Margin = Thickness 3.)
imageSourceSelection.Tag <- srcImg
imageSourceSelection.txtImageNumber.Text <- string srcImg.RomanNum
// Get the new parameters for each image. If an error occurs then 'None' is returned and a message box is displayed.
// The boolean is 'true' if the image is selected (checked).
let getInputImagesParameters () : (SourceImage * bool * Parameters) list option =
- let sourceImagesControls = win.stackSourceImagesSelection.Children |> Seq.cast<Views.ImageSourceSelection>
+ let sourceImagesControls = win.stackSourceImagesSelection.Children |> Seq.cast<ImageSourceSelection>
let parameters =
seq {
for srcImgCtrl in sourceImagesControls do