public AnonymizerEngine(AnonymizerConfigurationManager configurationManager)
        {
            _processors = new Dictionary <string, IAnonymizerProcessor>();

            InitializeProcessors(configurationManager);

            _rulesByTag = configurationManager.DicomTagRules;
        }
        public AnonymizerEngine(string configFilePath = "configuration-sample.json")
        {
            var configurationManager = AnonymizerConfigurationManager.CreateFromConfigurationFile(configFilePath);

            InitializeProcessors(configurationManager);
            _rulesByTag = configurationManager.DicomTagRules;
            // _rulesByVR = configurationManager.DicomVRRules;
        }
 private void InitializeProcessors(AnonymizerConfigurationManager configurationManager)
 {
     _processors.Add(AnonymizerMethod.Redact.ToString().ToUpperInvariant(), new RedactProcessor(configurationManager.GetParameterConfiguration()));
     _processors.Add(AnonymizerMethod.Keep.ToString().ToUpperInvariant(), new KeepProcessor());
     _processors.Add(AnonymizerMethod.Perturb.ToString().ToUpperInvariant(), new PerturbProcessor());
     _processors.Add(AnonymizerMethod.Encrypt.ToString().ToUpperInvariant(), new EncryptionProcessor(configurationManager.GetParameterConfiguration()));
     _processors.Add(AnonymizerMethod.CryptoHash.ToString().ToUpperInvariant(), new CryptoHashProcessor(configurationManager.GetParameterConfiguration()));
     _processors.Add(AnonymizerMethod.DateShift.ToString().ToUpperInvariant(), new DateShiftProcessor(configurationManager.GetParameterConfiguration()));
 }