本文整理汇总了C#中History.ApplyStep方法的典型用法代码示例。如果您正苦于以下问题:C# History.ApplyStep方法的具体用法?C# History.ApplyStep怎么用?C# History.ApplyStep使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类History
的用法示例。
在下文中一共展示了History.ApplyStep方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Setup
public void Setup (XrayImageEffect effect, Image image, History history, float[] data)
{
_Effect = effect;
m_History = history;
m_History.CurrentHistoryChangedEvent += new CurrentHistoryChanged(ApplyHistory);
HistoryHistogram histogram = new HistoryHistogram();
histogram.effecttype = "Gray";
histogram.start = rangeSlider.RangeStart;
histogram.end = rangeSlider.RangeStop;
m_History.SetFirstStep(histogram);
SetDataPoints(image, data);
m_History.ApplyStep();
}
示例2: Setup
public void Setup (ViewObject content, History history, SysConfiguration sysConfig)
{
if (!IsSetup)
{
m_ViewObject = content;
m_History = history;
m_History.CurrentHistoryChangedEvent += new CurrentHistoryChanged(ApplyHistory);
if (m_ViewObject.HighEnergy != null)
{
m_SourceObject = m_ViewObject.HighEnergy;
HEImage.Source = new BitmapImage(new Uri(@"/L3.Cargo.Workstation.Plugins.XRayImageBase;component/Resources/Icons/HEOn.png", UriKind.Relative));
LEImage.Source = new BitmapImage(new Uri(@"/L3.Cargo.Workstation.Plugins.XRayImageBase;component/Resources/Icons/LEOff.png", UriKind.Relative));
}
else if (m_ViewObject.LowEnergy != null)
{
m_SourceObject = m_ViewObject.LowEnergy;
HEImage.Source = new BitmapImage(new Uri(@"/L3.Cargo.Workstation.Plugins.XRayImageBase;component/Resources/Icons/HEOff.png", UriKind.Relative));
LEImage.Source = new BitmapImage(new Uri(@"/L3.Cargo.Workstation.Plugins.XRayImageBase;component/Resources/Icons/LEOn.png", UriKind.Relative));
}
else
{
throw new Exception();
}
if (m_ViewObject.LowEnergy == null ||
m_ViewObject.HighEnergy == null)
{
XRayDualEnergy_ToolBar.Visibility = Visibility.Collapsed;
}
else
{
HistoryDualEnergy dualEnergy = new HistoryDualEnergy();
dualEnergy.name = "HighEnergy";
m_History.SetFirstStep(dualEnergy);
}
if (sysConfig != null)
{
m_sysConfig = sysConfig;
CreateUserMacroControls();
Macro_Toolbar.Visibility = Visibility.Visible;
}
CreateBufferControls();
CreateFilterControls();
CreateColorMappingControls();
MainImage.Source = m_SourceObject.Source;
MainImage.Height = m_SourceObject.Height;
MainImage.Width = m_SourceObject.Width;
HistoryBuffer buffer = new HistoryBuffer();
buffer.name = "Original Gray Scale";
m_History.SetFirstStep(buffer);
HistoryList.DataContext = m_History.Step;
IsApplyHistoryFromSetup = true;
m_History.ApplyStep();
IsApplyHistoryFromSetup = false;
IsSetup = true;
}
}