-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathFilterParameters.cs
1055 lines (990 loc) · 36.8 KB
/
FilterParameters.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Versioning;
using System.Windows.Forms;
[SupportedOSPlatform("windows")]
public class Filter
{
public string FriendlyName { get; set; }
public string GmicCommand { get; set; }
public List<SingleParameterInfo> Parameters { get; set; }
public Filter(string friendlyName, string gmicCommand)
{
// Create parts of the filter object
FriendlyName = friendlyName;
GmicCommand = gmicCommand;
Parameters = new List<SingleParameterInfo>();
}
}
[SupportedOSPlatform("windows")]
public class SingleParameterInfo
{
public int ParamIndex { get; set; }
public string Name { get; set; }
public double DefaultStart { get; set; }
public double DefaultEnd { get; set; }
public double Min { get; set; }
public double Max { get; set; }
public double ExtendedMin { get; set; }
public double ExtendedMax { get; set; }
public string Type { get; set; } // "Binary", "Step", "Continuous"
public int Decimals { get; set; } // How many decimals to keep in the value after random generation
public double DefaultExponent { get; set; }
public Dictionary<string, object> Properties { get; set; }
public SingleParameterInfo(int paramIndex, string name, double defaultStart, double defaultEnd, double min, double max, double extendedMin, double extendedMax, string type, int decimals, double defaultExponent)
{
ParamIndex = paramIndex;
Name = name;
DefaultStart = defaultStart;
DefaultEnd = defaultEnd;
Min = min;
Max = max;
ExtendedMin = extendedMin;
ExtendedMax = extendedMax;
Type = type;
Decimals = decimals;
DefaultExponent = defaultExponent;
Properties = new Dictionary<string, object>();
}
}
[SupportedOSPlatform("windows")]
public static class FilterParameters
{
public static List<Filter> Filters { get; private set; } = new List<Filter>();
public static Filter ActiveFilter { get; private set; } // Property to store the currently active filter
private static List<SingleParameterInfo> parameters = new List<SingleParameterInfo>();
public static List<SingleParameterInfo> GetActiveFilterParameters()
{
return ActiveFilter.Parameters;
}
// Gets the parameters for a specific filter by name, or returns empty list if a null return is received
public static List<SingleParameterInfo> GetSpecificFilterParameters(string filterName)
{
string checkedFilterName = FilterExists(filterName);
if (checkedFilterName != null)
{
var filter = Filters.FirstOrDefault(f => f.FriendlyName == checkedFilterName);
return filter?.Parameters ?? new List<SingleParameterInfo>();
}
else
{
return new List<SingleParameterInfo>();
}
}
public static string ConvertParametersToString()
{
// Use List<string> to handle dynamic data size
List<string> tempList = new List<string>();
for (int i = 0; i < ActiveFilter.Parameters.Count; i++)
{
// If variable is text type, get the text value
if (ActiveFilter.Parameters[i].Type.ToLower() == "text")
{
tempList.Add(ActiveFilter.Parameters[i].Properties["CurrentTextValue"].ToString());
}
else
{
tempList.Add(ActiveFilter.Parameters[i].ToString());
}
}
return string.Join(",", tempList);
}
public static string[] filtersToNotLoadFromFile = new string[] {
// Put any names of filters here that should not be loaded from file
};
public const string customBuiltInDrosteName = "*Continuous Droste (Custom)";
private static void SetParameters(List<SingleParameterInfo> value)
{
parameters = value;
}
// Static initializer to set up default parameters
static FilterParameters()
{
LoadDefaultParameters(customBuiltInDrosteName);
}
public static List<string> GetListOfLoadedFilterCommands()
{
List<string> filterCommandsList = new List<string>();
foreach (var filter in Filters)
{
filterCommandsList.Add(filter.GmicCommand);
}
return filterCommandsList;
}
public static void LoadDefaultParameters(string filterFriendlyName)
{
switch (filterFriendlyName)
{
case customBuiltInDrosteName:
InitializeSoupheadDroste10();
SetActiveFilter(customBuiltInDrosteName);
break;
// Add cases for other filters
default:
throw new ArgumentException("Filter not recognized");
}
}
// Create setter to set the CurrentTextValue property of a parameter for the active filter
public static void SetTextParameterValue(int paramIndex, string newTextValue)
{
ActiveFilter.Parameters[paramIndex].Properties["CurrentTextValue"] = newTextValue;
}
public static string GetParameterValuesAsString(string propertyName)
{
switch (propertyName)
{
case "DefaultStart":
// Retrieve the list, perform necessary manipulation, and then convert to string
var startList = GetActiveFilterParameters().Select(p => p.DefaultStart.ToString()).ToList();
UpdateListForTextType(startList);
return string.Join(",", startList);
case "DefaultEnd":
// Retrieve the list, perform necessary manipulation, and then convert to string
var endList = GetActiveFilterParameters().Select(p => p.DefaultEnd.ToString()).ToList();
UpdateListForTextType(endList);
return string.Join(",", endList);
case "Min":
return string.Join(",", GetActiveFilterParameters().Select(p => p.Min.ToString()));
case "Max":
return string.Join(",", GetActiveFilterParameters().Select(p => p.Max.ToString()));
case "ExtendedMin":
return string.Join(",", GetActiveFilterParameters().Select(p => p.ExtendedMin.ToString()));
case "ExtendedMax":
return string.Join(",", GetActiveFilterParameters().Select(p => p.ExtendedMax.ToString()));
case "Type":
return string.Join(",", GetActiveFilterParameters().Select(p => p.Type));
case "Decimals":
return string.Join(",", GetActiveFilterParameters().Select(p => p.Decimals.ToString()));
case "DefaultExponent":
return string.Join(",", GetActiveFilterParameters().Select(p => p.DefaultExponent.ToString()));
default:
throw new ArgumentException("Property name not recognized", nameof(propertyName));
}
// Local function to update list based on type
void UpdateListForTextType(List<string> list)
{
var parameters = GetActiveFilterParameters(); // Get the parameters once to avoid multiple calls
for (int i = 0; i < list.Count; i++)
{
if (parameters[i].Type == "Text")
{
list[i] = parameters[i].Properties["CurrentTextValue"].ToString();
}
}
}
}
// Put default values for each parameter into an array of doubels
public static double[] GetParameterValuesAsList(string propertyName)
{
switch (propertyName)
{
case "DefaultStart":
return GetActiveFilterParameters().Select(p => p.DefaultStart).ToArray();
case "DefaultEnd":
return GetActiveFilterParameters().Select(p => p.DefaultEnd).ToArray();
case "Min":
return GetActiveFilterParameters().Select(p => p.Min).ToArray();
case "Max":
return GetActiveFilterParameters().Select(p => p.Max).ToArray();
case "ExtendedMin":
return GetActiveFilterParameters().Select(p => p.ExtendedMin).ToArray();
case "ExtendedMax":
return GetActiveFilterParameters().Select(p => p.ExtendedMax).ToArray();
case "DefaultExponent":
return GetActiveFilterParameters().Select(p => p.DefaultExponent).ToArray();
default:
throw new ArgumentException("Property name not recognized", nameof(propertyName));
}
}
public static string[] GetParameterNamesList()
{
return GetActiveFilterParameters().Select(p => p.Name).ToArray();
}
public static string GetParameterType(int index)
{
return ActiveFilter.Parameters[index].Type;
}
public static List<int> GetNonExponentableParamIndexes()
{
// Return indexes of parameters that are not continuous or step
List<int> nonExponentableIndexes = new List<int>();
for (int i = 0; i < GetActiveFilterParameters().Count; i++)
{
if (GetActiveFilterParameters()[i].Type != "Continuous" && GetActiveFilterParameters()[i].Type != "Step")
{
nonExponentableIndexes.Add(i);
}
}
return nonExponentableIndexes;
}
public static int GetActiveParameterCount()
{
return GetActiveFilterParameters().Count;
}
// Possible variable types are: int, float, choice, bool, file, file_in, file_out, color, text, value, point
// Some can seemingly have underscore or tilde prefixes, but I'm not sure what that means
// Example: ~int, _int, ~float, ~choice, ~color, ~bool, _bool, others
public static void LoadParametersForAllFiltersFromJson(string jsonText, bool clearExistingFilters, bool isCustom, string fileName)
{
if (clearExistingFilters)
{
//Create copy of custom droste10 filter to add back in after clearing
var tempDroste = Filters.FirstOrDefault(f => f.FriendlyName == customBuiltInDrosteName);
// Clear existing filters if re-loading. Don't clear if adding to existing filters like custom filters
Filters.Clear();
// Add custom built in souphead droste10 filter when refreshing filters
Filters.Add(tempDroste);
}
if (!String.IsNullOrEmpty(jsonText))
{
// First take out any lines at the beginning that start with a #, as these are comments
string[] jsonLines;
// Split jsonText into lines
jsonLines = jsonText.Split(new[] { "\r\n", "\r", "\n" }, StringSplitOptions.None);
// Remove lines starting with # or are empty, but stop once it reaches one not like that, because that means it's the start of the JSON
foreach (string line in jsonLines)
{
if (line.Trim().StartsWith("#") || string.IsNullOrWhiteSpace(line))
{
jsonLines = jsonLines.Skip(1).ToArray();
}
else
{
break;
}
}
// Put lines back together without lines starting with #
jsonText = jsonText = string.Join("\n", jsonLines);
// Start parsing
JArray filtersArray = null;
try
{
// Load data from JSON string
filtersArray = JArray.Parse(jsonText);
}
catch (Exception ex)
{
MessageBox.Show($"Error parsing JSON from filters file {fileName}\n\nError Message:\n" + ex.Message +
"\n\nIt may have been corrupted or data was entered in the wrong format. " +
"Try renaming it and letting the program create a new blank one, then copy the old data in, ensuring it is correct.",
"Error",
MessageBoxButtons.OK,
MessageBoxIcon.Error);
return;
}
foreach (JObject filterObj in filtersArray)
{
LoadIndividualFilterFromJSON(filterObj: filterObj, isCustom: isCustom);
}
}
if (Filters.Count > 0)
{
// Sort Filters by FriendlyName
Filters = Filters.OrderBy(f => f.FriendlyName).ToList();
}
}
// Methods that automatically generates parameter info for a filter from loaded data. Call this one from the main program
public static void LoadIndividualFilterFromJSON(JObject filterObj, bool isCustom)
{
string friendlyName = (string)filterObj["FriendlyName"];
string gmicCommand = (string)filterObj["GmicCommand"];
// If it's a custom filter, prepend an asterisk to the friendly name
if (isCustom)
{
friendlyName = "*" + friendlyName;
}
var filter = new Filter(friendlyName, gmicCommand);
JArray parameters = (JArray)filterObj["Parameters"];
foreach (JObject param in parameters)
{
var name = (string)param["Name"];
var minValue = param["MinValue"]?.Value<double?>();
var maxValue = param["MaxValue"]?.Value<double?>();
// Special handling of default value because it might be a hex string for colors, need to convert to decimal
string defaultValueString = param["DefaultValue"]?.Value<string>();
double defaultValue;
if (defaultValueString != null && defaultValueString.StartsWith("#"))
{
defaultValue = Convert.ToInt32(defaultValueString.Substring(1), 16);
}
else if (defaultValueString != null)
{
// Try to parse to double
double.TryParse(defaultValueString, out defaultValue);
}
// Otherwise set to 0 if can't be parsed
else
{
defaultValue = 0;
}
// Special handling of choices becaue it might be either a list or null
var choicesNode = param["Choices"];
List<string> choices = null;
if (choicesNode != null && choicesNode.Type == JTokenType.Array)
{
choices = choicesNode.Values<string>().ToList();
}
// Set defaults, will override with more specifics next
double tempDefaultEnd = maxValue ?? defaultValue;
double tempExtendedMin = (minValue * 2) ?? 0;
double tempExtendedMax = maxValue ?? defaultValue;
double tempMin = minValue ?? 0;
double tempMax = minValue ?? defaultValue;
string tempType = (string)param["Type"];
tempType = CleanType(tempType); // Removes any prefixes like ~ or _
if (tempType == "float")
{
tempType = "Continuous";
}
else if (tempType == "int")
{
tempType = "Step";
}
else if (tempType == "bool")
{
tempType = "Binary";
}
else if (tempType == "choice")
{
tempType = "Choice";
}
else if (tempType == "text")
{
tempType = "Text";
}
JObject properties = (JObject)param["Properties"];
// Depending on type, assign other default values if not assigned already via existing defaults
if (tempType.ToLower() == "binary")
{
tempMin = 0;
tempMax = 1;
tempExtendedMin = 0;
tempExtendedMax = 1;
tempDefaultEnd = defaultValue;
}
else if (tempType.ToLower() == "step")
{
tempMin = 0;
tempMax = 100;
tempExtendedMin = 0;
tempExtendedMax = 200;
tempDefaultEnd = defaultValue;
}
else if (tempType.ToLower() == "choice")
{
// Count how many choices are in the parameter
int choiceCount = choices.Count;
tempMin = 0;
tempMax = choiceCount;
tempExtendedMin = 0;
tempExtendedMax = choiceCount;
tempDefaultEnd = defaultValue;
}
else if (tempType.ToLower() == "color")
{
tempType = "Step";
tempExtendedMin = 0;
tempExtendedMax = 255;
tempDefaultEnd = defaultValue;
}
// Safe access to 'IsPercentage' property
if (properties.TryGetValue("IsPercentage", out JToken isPercentageToken))
{
bool isPercentage = (bool)isPercentageToken;
if (isPercentage)
{
tempType = "Continuous";
tempMin = 0;
tempMax = 100;
tempExtendedMin = 0;
tempExtendedMax = 100;
tempDefaultEnd = defaultValue;
}
}
// Check for TypeDetails
if (properties.TryGetValue("TypeDetail", out JToken typeDetailsToken))
{
// Directly get the value as a string, since it's not a JObject but a simple JValue
string typeDetailValue = typeDetailsToken.ToString();
// Check if the value indicates 'Trinary'
if (typeDetailValue == "Trinary")
{
tempType = "Trinary";
tempMin = -1;
tempMax = 1;
tempExtendedMin = -1;
tempExtendedMax = 1;
tempDefaultEnd = defaultValue;
}
}
// Currently possible types: "Binary", "Trinary", "Step", "Continuous", "Choice", "Text"
var parameterInfo = new SingleParameterInfo(
paramIndex: GetActiveFilterParameters().Count, // Index is dynamically set based on count. As each gets added the count and therefore the index increases
name: name,
defaultStart: defaultValue, // Using null-coalescing operator if DefaultValue is nullable
defaultEnd: tempDefaultEnd, // You might want to adjust this as per your logic
min: tempMin, // Assume defaults if null
max: tempMax, // Assume defaults if null
extendedMin: tempExtendedMin, // Same as min for extendedMin
extendedMax: tempExtendedMax, // Same as max for extendedMax
type: tempType,
decimals: DetermineDecimalsFromType((string)param["Type"]), // A method to determine decimals
defaultExponent: 1.0 // Default exponent
);
// If it's text get the string
if (tempType.ToLower() == "text")
{
if (properties.TryGetValue("TextString", out JToken textString))
{
// Assign to properties dictionary
parameterInfo.Properties.Add("DefaultTextValue", textString.ToString());
parameterInfo.Properties.Add("CurrentTextValue", textString.ToString());
}
}
filter.Parameters.Add(parameterInfo);
}
// If it doesn't contain a filter that shouldn't be loaded from file, add it to the list
if (!filtersToNotLoadFromFile.Contains(gmicCommand) && !filtersToNotLoadFromFile.Contains(friendlyName))
{
Filters.Add(filter);
}
}
private static string CleanType(string typeString)
{
if (typeString.Contains("~") || typeString.Contains("_"))
{
// Removes prefixes like '~' if your logic requires it
typeString = typeString.Trim('~');
typeString = typeString.Trim('_');
}
return typeString;
}
// Print out list of loaded filters
public static (int, string) GetFilterCount(bool sample = false)
{
// Get random sampling of 5 filters
string filterNames = "";
if (sample)
{
var random = new Random();
var sampleFilters = Filters.OrderBy(x => random.Next()).Take(5);
foreach (var filter in sampleFilters)
{
filterNames += filter.FriendlyName + "\n";
}
return (Filters.Count, filterNames);
}
else
{
return (Filters.Count, "");
}
}
private static int DetermineDecimalsFromType(string type)
{
// Simple logic to determine the number of decimal places
if (type.Contains("float"))
return 2;
return 0;
}
public static void InitializeChosenFilter(string filterFriendlyName)
{
// Only do this if the filter is not already the active filter
if (ActiveFilter != null && (ActiveFilter.FriendlyName == filterFriendlyName))
{
return;
}
// Clear existing parameters
ActiveFilter.Parameters.Clear();
// Find the filter with the given name
var selectedFilter = Filters.FirstOrDefault(f => f.FriendlyName.Equals(filterFriendlyName, StringComparison.OrdinalIgnoreCase) || f.GmicCommand.Equals(filterFriendlyName, StringComparison.OrdinalIgnoreCase));
if (selectedFilter != null)
{
// Load parameters from the found filter
ActiveFilter.Parameters.AddRange(selectedFilter.Parameters);
// Set friendly name and G'MIC command
ActiveFilter.FriendlyName = selectedFilter.FriendlyName;
ActiveFilter.GmicCommand = selectedFilter.GmicCommand;
}
else
{
// Handle the case where the filter is not found
MessageBox.Show("Filter not found: " + filterFriendlyName, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
// Find if filter exists
public static string FilterExists(string filterFriendlyName)
{
var selectedFilter = SearchExactFilterName(filterFriendlyName);
if (selectedFilter != null)
{
return selectedFilter.ToString();
}
else if (filterFriendlyName.StartsWith("*") && SearchExactFilterName(filterFriendlyName.Substring(1)) != null)
{
// If it's a custom filter, remove the asterisk and check again
selectedFilter = SearchExactFilterName(filterFriendlyName.Substring(1));
return selectedFilter;
}
// Try adding asterisk to the searched name in case it's a custom filter
else if (SearchExactFilterName("*" + filterFriendlyName) != null)
{
selectedFilter = SearchExactFilterName("*" + filterFriendlyName);
return selectedFilter;
}
else
{
return null;
}
}
private static string SearchExactFilterName(string filterName)
{
var foundFilter = Filters.FirstOrDefault(f => f.FriendlyName.Equals(filterName, StringComparison.OrdinalIgnoreCase) || f.GmicCommand.Equals(filterName, StringComparison.OrdinalIgnoreCase));
if (foundFilter != null)
{
return foundFilter.FriendlyName.ToString();
}
else
{
return null;
}
}
// Method to set the active filter by name. Technically it can find both by friendly name and G'MIC command, but ideally the friendly name should be used
public static void SetActiveFilter(string filterFriendlyName)
{
// Get the true filter name
string matchedFilterName = FilterExists(filterFriendlyName);
if (matchedFilterName != null) { filterFriendlyName = matchedFilterName;}
// Need to use friendly name in case user has multiple custom filters with the same G'MIC command
var filter = Filters.FirstOrDefault(f => f.FriendlyName == filterFriendlyName || f.GmicCommand == filterFriendlyName);
if (filter != null)
{
ActiveFilter = filter;
InitializeChosenFilter(filterFriendlyName);
}
else
{
throw new ArgumentException("Filter name not found.", nameof(filterFriendlyName));
}
}
// Method to retrieve the active filter
public static Filter GetActiveFilter()
{
return ActiveFilter;
}
// Manually prepared parameter info for the Souphead Droste 10 filter
private static void InitializeSoupheadDroste10()
{
var localParameters = new List<SingleParameterInfo>
{
new SingleParameterInfo(
paramIndex: 0,
name: "Inner Radius",
defaultStart: 40,
defaultEnd: 100,
min: 1,
max: 100,
extendedMin: 0,
extendedMax: 200,
type: "Continuous",
decimals: 0,
defaultExponent: 2.0
),
new SingleParameterInfo(
paramIndex: 1,
name: "Outer Radius",
defaultStart: 100,
defaultEnd: 100,
min: 1,
max: 100,
extendedMin: 0,
extendedMax: 200,
type: "Continuous",
decimals: 0,
defaultExponent: 3.0
),
new SingleParameterInfo(
paramIndex: 2,
name: "Periodicity",
defaultStart: 1,
defaultEnd: 1,
min: -6,
max: 6,
extendedMin: -6,
extendedMax: 6,
type: "Continuous",
decimals: 2,
defaultExponent: 1.0
),
new SingleParameterInfo(
paramIndex: 3,
name: "Strands",
defaultStart: 1,
defaultEnd: 1,
min: -6,
max: 6,
extendedMin: -100,
extendedMax: 100,
type: "Step",
decimals: 1,
defaultExponent: 1.0
),
new SingleParameterInfo(
paramIndex: 4,
name: "Zoom",
defaultStart: 1,
defaultEnd: 1,
min: 1,
max: 100,
extendedMin: -1000,
extendedMax: 1000,
type: "Continuous",
decimals: 0,
defaultExponent: 1.0
),
new SingleParameterInfo(
paramIndex: 5,
name: "Rotate",
defaultStart: 0,
defaultEnd: 0,
min: -360,
max: 360,
extendedMin: -720,
extendedMax: 720,
type: "Continuous",
decimals: 0,
defaultExponent: 1.0
),
new SingleParameterInfo(
paramIndex: 6,
name: "X-Shift",
defaultStart: 0,
defaultEnd: 0,
min: -100,
max: 100,
extendedMin: -200,
extendedMax: 200,
type: "Continuous",
decimals: 0,
defaultExponent: 1.0
),
new SingleParameterInfo(
paramIndex: 7,
name: "Y-Shift",
defaultStart: 0,
defaultEnd: 0,
min: -100,
max: 100,
extendedMin: -200,
extendedMax: 200,
type: "Continuous",
decimals: 0,
defaultExponent: 1.0
),
new SingleParameterInfo(
paramIndex: 8,
name: "Center X-Shift",
defaultStart: 0,
defaultEnd: 0,
min: -100,
max: 100,
extendedMin: -200,
extendedMax: 200,
type: "Continuous",
decimals: 0,
defaultExponent: 1.0
),
new SingleParameterInfo(
paramIndex: 9,
name: "Center Y-Shift",
defaultStart: 0,
defaultEnd: 0,
min: -100,
max: 100,
extendedMin: -200,
extendedMax: 200,
type: "Continuous",
decimals: 0,
defaultExponent: 1.0
),
new SingleParameterInfo(
paramIndex: 10,
name: "Starting Level",
defaultStart: 10,
defaultEnd: 10,
min: 1,
max: 20,
extendedMin: 1,
extendedMax: 50,
type: "Step",
decimals: 0,
defaultExponent: 1.0
),
new SingleParameterInfo(
paramIndex: 11,
name: "Number of Levels",
defaultStart: 30,
defaultEnd: 30,
min: 1,
max: 30,
extendedMin: 0,
extendedMax: 50,
type: "Step",
decimals: 0,
defaultExponent: 1.0
),
new SingleParameterInfo(
paramIndex: 12,
name: "Level Frequency",
defaultStart: 1,
defaultEnd: 1,
min: 1,
max: 10,
extendedMin: 1,
extendedMax: 20,
type: "Step",
decimals: 1,
defaultExponent: 1.0
),
new SingleParameterInfo(
paramIndex: 13,
name: "Show Both Poles",
defaultStart: 0,
defaultEnd: 0,
min: 0,
max: 1,
extendedMin: 0,
extendedMax: 1,
type: "Binary",
decimals: 0,
defaultExponent: 0
),
new SingleParameterInfo(
paramIndex: 14,
name: "Pole Rotation",
defaultStart: 90,
defaultEnd: 90,
min: -180,
max: 180,
extendedMin: -200,
extendedMax: 200,
type: "Continuous",
decimals: 0,
defaultExponent: 1.0
),
new SingleParameterInfo(
paramIndex: 15,
name: "Pole Long",
defaultStart: 0,
defaultEnd: 0,
min: -100,
max: 100,
extendedMin: -200,
extendedMax: 200,
type: "Continuous",
decimals: 0,
defaultExponent: 1.0
),
new SingleParameterInfo(
paramIndex: 16,
name: "Pole Lat",
defaultStart: 0,
defaultEnd: 0,
min: -100,
max: 100,
extendedMin: -200,
extendedMax: 200,
type: "Continuous",
decimals: 0,
defaultExponent: 1.0
),
new SingleParameterInfo(
paramIndex: 17,
name: "Tile Poles",
defaultStart: 0,
defaultEnd: 0,
min: 0,
max: 1,
extendedMin: 0,
extendedMax: 1,
type: "Binary",
decimals: 0,
defaultExponent: 0
),
new SingleParameterInfo(
paramIndex: 18,
name: "Hyper Droste",
defaultStart: 0,
defaultEnd: 0,
min: 0,
max: 1,
extendedMin: 0,
extendedMax: 1,
type: "Binary",
decimals: 0,
defaultExponent: 0
),
new SingleParameterInfo(
paramIndex: 19,
name: "Fractal Points",
defaultStart: 1,
defaultEnd: 1,
min: 1,
max: 10,
extendedMin: 0,
extendedMax: 20,
type: "Continuous",
decimals: 1,
defaultExponent: 1.0
),
new SingleParameterInfo(
paramIndex: 20,
name: "Auto-Set Periodicity",
defaultStart: 0,
defaultEnd: 0,
min: 0,
max: 1,
extendedMin: 0,
extendedMax: 1,
type: "Binary",
decimals: 0,
defaultExponent: 0
),
new SingleParameterInfo(
paramIndex: 21,
name: "No Transparency",
defaultStart: 0,
defaultEnd: 0,
min: 0,
max: 1,
extendedMin: 0,
extendedMax: 1,
type: "Binary",
decimals: 0,
defaultExponent: 0
),
new SingleParameterInfo(
paramIndex: 22,
name: "External Transparency",
defaultStart: 1,
defaultEnd: 1,
min: 0,
max: 1,
extendedMin: 0,
extendedMax: 1,
type: "Binary",
decimals: 0,
defaultExponent: 0
),
new SingleParameterInfo(
paramIndex: 23,
name: "Mirror Effect",
defaultStart: 0,
defaultEnd: 0,
min: 0,
max: 1,
extendedMin: 0,
extendedMax: 1,
type: "Binary",
decimals: 0,
defaultExponent: 0
),
new SingleParameterInfo(
paramIndex: 24,
name: "Untwist",
defaultStart: 0,
defaultEnd: 0,
min: 0,
max: 1,
extendedMin: 0,
extendedMax: 1,
type: "Binary",
decimals: 0,
defaultExponent: 0
),
new SingleParameterInfo(
paramIndex: 25,
name: "Do Not Flatten Transparency",
defaultStart: 1,
defaultEnd: 1,
min: 0,
max: 1,
extendedMin: 0,
extendedMax: 1,
type: "Binary",
decimals: 0,
defaultExponent: 0
),
new SingleParameterInfo(
paramIndex: 26,
name: "Show Grid",
defaultStart: 0,
defaultEnd: 0,
min: 0,
max: 1,
extendedMin: 0,
extendedMax: 1,
type: "Binary",
decimals: 0,
defaultExponent: 0
),
new SingleParameterInfo(
paramIndex: 27,
name: "Show Frame",
defaultStart: 0,