LEADTOOLS Medical(Leadtools.MedicalViewerアセンブリ)

フレームを表示

MedicalViewerクラス






メンバ 
医用画像を表示するために、LEADTOOLS MedicalViewerコントロールを表します。
オブジェクトモデル
構文
解説

MedicalViewerは、ビットマップ、メタファイル、アイコン、JPEG、GIFまたはPNG(またはLEADTOOLSツールキットでサポートされる他のどの画像ファイル形式も)ファイルからグラフィクスを示すのに用いられます。それは、一つ以上のイメージを示していて、一つ以上のイメージのリアルタイム操作のためであるをサポートします。このコントロールは、医療ツールキットだけで利用できます。詳細については、「Document/Medicalエディションサポートと許可要件」を参照してください。

このコントロールは、医学的なディスプレイアプリケーション(例えば放射線学と他の医学専門分野部で見つけられるDICOMビューワ、表示ステーション、テレラジオロジーソリューションとハイエンドの診断用ワークステーション)を造るための高水準コンポーネントです。放射線学、心臓学、乳房X線撮影、眼科学、病理学、皮膚科学、歯科医業または他のどの専門のためにもPACSを造るとき、このコントロールはプロジェクト複雑さを除いて、しっかりした、信頼できる基礎を提供します。

このコントロールを用いて構築されることができる代表的アプリケーションは、以下を含みます: 主な特長: 詳細については、「行動を適用して、画像ビューアーを使用すること」を参照してください。
サンプル

この例コントロール作成する、そして、image追加する、

Copy Code  
Imports Leadtools
Imports Leadtools.Codecs
Imports Leadtools.MedicalViewer

<TestMethod()> _
Public Sub MedicalViewerExample()
   Dim form As MainForm1 = New MainForm1()
   form.ShowDialog()
End Sub
' MainForm1 will be the owner of the medical viewer control.
Private Class MainForm1 : Inherits Form
   Private _medicalViewer As MedicalViewer

   Private Sub MedicalViewerForm_SizeChanged(ByVal sender As Object, ByVal e As EventArgs)
      _medicalViewer.Size = New Size(Me.ClientRectangle.Right, Me.ClientRectangle.Bottom)
   End Sub

   Public Sub New()
      Dim _codecs As RasterCodecs = New RasterCodecs()
      Dim _image As RasterImage

      ' Create the medical viewer and adjust the size and the location.
      _medicalViewer = New MedicalViewer(1, 2)
      _medicalViewer.Location = New Point(0, 0)
      _medicalViewer.Size = New Size(Me.ClientRectangle.Right, Me.ClientRectangle.Bottom)

      ' Load an image and then add it to the control.
      _image = _codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "ImageProcessingDemo\Image3.cmp"))

      Dim cell As MedicalViewerMultiCell = New MedicalViewerMultiCell(_image, True, 1, 1)

          ' add some actions that will be used to change the properties of the images inside the control.
      cell.AddAction(MedicalViewerActionType.WindowLevel)
      cell.AddAction(MedicalViewerActionType.Scale)
      cell.AddAction(MedicalViewerActionType.Offset)
      cell.AddAction(MedicalViewerActionType.Stack)

          ' assign the added actions to a mouse button, meaning that when the user clicks and drags the mouse button, the associated action will be activated.
          cell.SetAction(MedicalViewerActionType.WindowLevel, MedicalViewerMouseButtons.Left, MedicalViewerActionFlags.Active)
          cell.SetAction(MedicalViewerActionType.Offset, MedicalViewerMouseButtons.Right, MedicalViewerActionFlags.Active)
          cell.SetAction(MedicalViewerActionType.Scale, MedicalViewerMouseButtons.Middle, MedicalViewerActionFlags.Active)
          cell.SetAction(MedicalViewerActionType.Stack, MedicalViewerMouseButtons.Wheel, MedicalViewerActionFlags.Active)

          ' assign the added actions to a keyboard keys that will work like the mouse.
          Dim medicalKeys As MedicalViewerKeys = New MedicalViewerKeys(Keys.Down, Keys.Up, Keys.Left, Keys.Right, MedicalViewerModifiers.None)
          cell.SetActionKeys(MedicalViewerActionType.Offset, medicalKeys)
          medicalKeys.Modifiers = MedicalViewerModifiers.Ctrl
          cell.SetActionKeys(MedicalViewerActionType.WindowLevel, medicalKeys)
          medicalKeys.MouseDown = Keys.PageDown
          medicalKeys.MouseUp = Keys.PageUp
          cell.SetActionKeys(MedicalViewerActionType.Stack, medicalKeys)
          medicalKeys.MouseDown = Keys.Subtract
          medicalKeys.MouseUp = Keys.Add
          cell.SetActionKeys(MedicalViewerActionType.Scale, medicalKeys)

          _medicalViewer.Cells.Add(cell)

          ' adjust some properties of the cell and add some tags.
          cell.SetTag(2, MedicalViewerTagAlignment.TopLeft, MedicalViewerTagType.UserData, "EX. ID 230-36-5448")
          cell.SetTag(4, MedicalViewerTagAlignment.TopLeft, MedicalViewerTagType.Frame)
          cell.SetTag(6, MedicalViewerTagAlignment.TopLeft, MedicalViewerTagType.Scale)
          cell.SetTag(2, MedicalViewerTagAlignment.BottomLeft, MedicalViewerTagType.WindowLevelData)
          cell.SetTag(1, MedicalViewerTagAlignment.BottomLeft, MedicalViewerTagType.FieldOfView)
          cell.SetTag(1, MedicalViewerTagAlignment.TopRight, MedicalViewerTagType.UserData, "Good, Guy")
          cell.SetTag(2, MedicalViewerTagAlignment.TopRight, MedicalViewerTagType.UserData, "PID 125-98-445")
          cell.SetTag(3, MedicalViewerTagAlignment.TopRight, MedicalViewerTagType.UserData, "DOB 08/02/1929")
          cell.SetTag(5, MedicalViewerTagAlignment.TopRight, MedicalViewerTagType.UserData, "03/16/1999")
          cell.SetTag(0, MedicalViewerTagAlignment.BottomLeft, MedicalViewerTagType.RulerUnit)
          cell.Rows = 1
          cell.Columns = 1
          cell.Frozen = False
          cell.DisplayRulers = MedicalViewerRulers.Both
          cell.ApplyOnIndividualSubCell = False
          cell.ApplyActionOnMove = True
          cell.FitImageToCell = True
          cell.Selected = True
          cell.ShowTags = True

          ' Load an image and then add it to the control.
          _image = _codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "image2.cmp"))

          Dim cell1 As MedicalViewerMultiCell = New MedicalViewerMultiCell(_image)
          _medicalViewer.Cells.Add(cell1)


          ' add some actions that will be used to change the properties of the images inside the control.
          cell1.AddAction(MedicalViewerActionType.WindowLevel)
          cell1.AddAction(MedicalViewerActionType.Scale)
          cell1.AddAction(MedicalViewerActionType.Offset)
          cell1.AddAction(MedicalViewerActionType.Stack)

          ' assign the added actions to a mouse button, meaning that when the user clicks and drags the mouse button, the associated action will be activated.
          cell1.SetAction(MedicalViewerActionType.WindowLevel, MedicalViewerMouseButtons.Left, MedicalViewerActionFlags.Active)
          cell1.SetAction(MedicalViewerActionType.Offset, MedicalViewerMouseButtons.Right, MedicalViewerActionFlags.Active)
          cell1.SetAction(MedicalViewerActionType.Scale, MedicalViewerMouseButtons.Middle, MedicalViewerActionFlags.Active)
          cell1.SetAction(MedicalViewerActionType.Stack, MedicalViewerMouseButtons.Wheel, MedicalViewerActionFlags.Active)

          ' assign the added actions to a keyboard keys that will work like the mouse.
          medicalKeys = New MedicalViewerKeys(Keys.Down, Keys.Up, Keys.Left, Keys.Right, MedicalViewerModifiers.None)
          cell1.SetActionKeys(MedicalViewerActionType.Offset, medicalKeys)
          medicalKeys.Modifiers = MedicalViewerModifiers.Ctrl
          cell1.SetActionKeys(MedicalViewerActionType.WindowLevel, medicalKeys)
          medicalKeys.MouseDown = Keys.PageDown
          medicalKeys.MouseUp = Keys.PageUp
          cell1.SetActionKeys(MedicalViewerActionType.Stack, medicalKeys)
          medicalKeys.MouseDown = Keys.Subtract
          medicalKeys.MouseUp = Keys.Add
          cell1.SetActionKeys(MedicalViewerActionType.Scale, medicalKeys)

          ' adjust some properties of the cell and add some tags.
          cell1.SetTag(2, MedicalViewerTagAlignment.TopLeft, MedicalViewerTagType.UserData, "EX. ID 230-36-5448")
          cell1.SetTag(4, MedicalViewerTagAlignment.TopLeft, MedicalViewerTagType.Frame)
          cell1.SetTag(6, MedicalViewerTagAlignment.TopLeft, MedicalViewerTagType.Scale)
          cell1.SetTag(2, MedicalViewerTagAlignment.BottomLeft, MedicalViewerTagType.WindowLevelData)
          cell1.SetTag(1, MedicalViewerTagAlignment.BottomLeft, MedicalViewerTagType.FieldOfView)
          cell1.SetTag(1, MedicalViewerTagAlignment.TopRight, MedicalViewerTagType.UserData, "Good, Guy")
          cell1.SetTag(2, MedicalViewerTagAlignment.TopRight, MedicalViewerTagType.UserData, "PID 125-98-445")
          cell1.SetTag(3, MedicalViewerTagAlignment.TopRight, MedicalViewerTagType.UserData, "DOB 08/02/1929")
          cell1.SetTag(5, MedicalViewerTagAlignment.TopRight, MedicalViewerTagType.UserData, "03/16/1999")
          cell1.SetTag(0, MedicalViewerTagAlignment.BottomLeft, MedicalViewerTagType.RulerUnit)
          cell1.Rows = 2
          cell1.Columns = 2
          cell1.Frozen = False
          cell1.DisplayRulers = MedicalViewerRulers.Both
          cell1.ApplyOnIndividualSubCell = False
          cell1.ApplyActionOnMove = True
          cell1.FitImageToCell = True
          cell1.Selected = True
          cell1.ShowTags = True

          Controls.Add(_medicalViewer)
          _medicalViewer.Dock = DockStyle.Fill
      End Sub
  End Class

Public NotInheritable Class LEAD_VARS
Public Const ImagesDir As String = "C:\Users\Public\Documents\LEADTOOLS Images"
End Class
using Leadtools;
using Leadtools.Codecs;
using Leadtools.MedicalViewer;

[TestMethod]
public void MedicalViewerExample()
{
   MainForm1 form = new MainForm1();
   form.ShowDialog();
}
// MainForm1 will be the owner of the medical viewer control.
class MainForm1 : Form
{
   private MedicalViewer _medicalViewer;

   void MedicalViewerForm_SizeChanged(object sender, EventArgs e)
   {
      _medicalViewer.Size = new Size(this.ClientRectangle.Right, this.ClientRectangle.Bottom);
   }

   public MainForm1()
   {
      RasterCodecs _codecs = new RasterCodecs();
      RasterImage _image;

      // Create the medical viewer and adjust the size and the location.
      _medicalViewer = new MedicalViewer(1, 2);
      _medicalViewer.Location = new Point(0, 0);
      _medicalViewer.Size = new Size(this.ClientRectangle.Right, this.ClientRectangle.Bottom);

      // Load an image and then add it to the control.
      _image = _codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, @"ImageProcessingDemo\Image3.cmp"));

      MedicalViewerMultiCell cell = new MedicalViewerMultiCell(_image, true, 1, 1);

      // add some actions that will be used to change the properties of the images inside the control.
      cell.AddAction(MedicalViewerActionType.WindowLevel);
      cell.AddAction(MedicalViewerActionType.Scale);
      cell.AddAction(MedicalViewerActionType.Offset);
      cell.AddAction(MedicalViewerActionType.Stack);

      // assign the added actions to a mouse button, meaning that when the user clicks and drags the mouse button, the associated action will be activated.
      cell.SetAction(MedicalViewerActionType.WindowLevel, MedicalViewerMouseButtons.Left, MedicalViewerActionFlags.Active);
      cell.SetAction(MedicalViewerActionType.Offset, MedicalViewerMouseButtons.Right, MedicalViewerActionFlags.Active);
      cell.SetAction(MedicalViewerActionType.Scale, MedicalViewerMouseButtons.Middle, MedicalViewerActionFlags.Active);
      cell.SetAction(MedicalViewerActionType.Stack, MedicalViewerMouseButtons.Wheel, MedicalViewerActionFlags.Active);

      // assign the added actions to a keyboard keys that will work like the mouse.
      MedicalViewerKeys medicalKeys = new MedicalViewerKeys(Keys.Down, Keys.Up, Keys.Left, Keys.Right, MedicalViewerModifiers.None);
      cell.SetActionKeys(MedicalViewerActionType.Offset, medicalKeys);
      medicalKeys.Modifiers = MedicalViewerModifiers.Ctrl;
      cell.SetActionKeys(MedicalViewerActionType.WindowLevel, medicalKeys);
      medicalKeys.MouseDown = Keys.PageDown;
      medicalKeys.MouseUp = Keys.PageUp;
      cell.SetActionKeys(MedicalViewerActionType.Stack, medicalKeys);
      medicalKeys.MouseDown = Keys.Subtract;
      medicalKeys.MouseUp = Keys.Add;
      cell.SetActionKeys(MedicalViewerActionType.Scale, medicalKeys);

      _medicalViewer.Cells.Add(cell);

      // adjust some properties of the cell and add some tags.
      cell.SetTag(2, MedicalViewerTagAlignment.TopLeft, MedicalViewerTagType.UserData, "EX. ID 230-36-5448");
      cell.SetTag(4, MedicalViewerTagAlignment.TopLeft, MedicalViewerTagType.Frame);
      cell.SetTag(6, MedicalViewerTagAlignment.TopLeft, MedicalViewerTagType.Scale);
      cell.SetTag(2, MedicalViewerTagAlignment.BottomLeft, MedicalViewerTagType.WindowLevelData);
      cell.SetTag(1, MedicalViewerTagAlignment.BottomLeft, MedicalViewerTagType.FieldOfView);
      cell.SetTag(1, MedicalViewerTagAlignment.TopRight, MedicalViewerTagType.UserData, "Good, Guy");
      cell.SetTag(2, MedicalViewerTagAlignment.TopRight, MedicalViewerTagType.UserData, "PID 125-98-445");
      cell.SetTag(3, MedicalViewerTagAlignment.TopRight, MedicalViewerTagType.UserData, "DOB 08/02/1929");
      cell.SetTag(5, MedicalViewerTagAlignment.TopRight, MedicalViewerTagType.UserData, "03/16/1999");
      cell.SetTag(0, MedicalViewerTagAlignment.BottomLeft, MedicalViewerTagType.RulerUnit);
      cell.Rows = 1;
      cell.Columns = 1;
      cell.Frozen = false;
      cell.DisplayRulers = MedicalViewerRulers.Both;
      cell.ApplyOnIndividualSubCell = false;
      cell.ApplyActionOnMove = true;
      cell.FitImageToCell = true;
      cell.Selected = true;
      cell.ShowTags = true;

      // Load an image and then add it to the control.
      _image = _codecs.Load(Path.Combine(LEAD_VARS.ImagesDir,"image2.cmp"));

      MedicalViewerMultiCell cell1 = new MedicalViewerMultiCell(_image);
      _medicalViewer.Cells.Add(cell1);


      // add some actions that will be used to change the properties of the images inside the control.
      cell1.AddAction(MedicalViewerActionType.WindowLevel);
      cell1.AddAction(MedicalViewerActionType.Scale);
      cell1.AddAction(MedicalViewerActionType.Offset);
      cell1.AddAction(MedicalViewerActionType.Stack);

      // assign the added actions to a mouse button, meaning that when the user clicks and drags the mouse button, the associated action will be activated.
      cell1.SetAction(MedicalViewerActionType.WindowLevel, MedicalViewerMouseButtons.Left, MedicalViewerActionFlags.Active);
      cell1.SetAction(MedicalViewerActionType.Offset, MedicalViewerMouseButtons.Right, MedicalViewerActionFlags.Active);
      cell1.SetAction(MedicalViewerActionType.Scale, MedicalViewerMouseButtons.Middle, MedicalViewerActionFlags.Active);
      cell1.SetAction(MedicalViewerActionType.Stack, MedicalViewerMouseButtons.Wheel, MedicalViewerActionFlags.Active);

      // assign the added actions to a keyboard keys that will work like the mouse.
      medicalKeys = new MedicalViewerKeys(Keys.Down, Keys.Up, Keys.Left, Keys.Right, MedicalViewerModifiers.None);
      cell1.SetActionKeys(MedicalViewerActionType.Offset, medicalKeys);
      medicalKeys.Modifiers = MedicalViewerModifiers.Ctrl;
      cell1.SetActionKeys(MedicalViewerActionType.WindowLevel, medicalKeys);
      medicalKeys.MouseDown = Keys.PageDown;
      medicalKeys.MouseUp = Keys.PageUp;
      cell1.SetActionKeys(MedicalViewerActionType.Stack, medicalKeys);
      medicalKeys.MouseDown = Keys.Subtract;
      medicalKeys.MouseUp = Keys.Add;
      cell1.SetActionKeys(MedicalViewerActionType.Scale, medicalKeys);

      // adjust some properties of the cell and add some tags.
      cell1.SetTag(2, MedicalViewerTagAlignment.TopLeft, MedicalViewerTagType.UserData, "EX. ID 230-36-5448");
      cell1.SetTag(4, MedicalViewerTagAlignment.TopLeft, MedicalViewerTagType.Frame);
      cell1.SetTag(6, MedicalViewerTagAlignment.TopLeft, MedicalViewerTagType.Scale);
      cell1.SetTag(2, MedicalViewerTagAlignment.BottomLeft, MedicalViewerTagType.WindowLevelData);
      cell1.SetTag(1, MedicalViewerTagAlignment.BottomLeft, MedicalViewerTagType.FieldOfView);
      cell1.SetTag(1, MedicalViewerTagAlignment.TopRight, MedicalViewerTagType.UserData, "Good, Guy");
      cell1.SetTag(2, MedicalViewerTagAlignment.TopRight, MedicalViewerTagType.UserData, "PID 125-98-445");
      cell1.SetTag(3, MedicalViewerTagAlignment.TopRight, MedicalViewerTagType.UserData, "DOB 08/02/1929");
      cell1.SetTag(5, MedicalViewerTagAlignment.TopRight, MedicalViewerTagType.UserData, "03/16/1999");
      cell1.SetTag(0, MedicalViewerTagAlignment.BottomLeft, MedicalViewerTagType.RulerUnit);
      cell1.Rows = 2;
      cell1.Columns = 2;
      cell1.Frozen = false;
      cell1.DisplayRulers = MedicalViewerRulers.Both;
      cell1.ApplyOnIndividualSubCell = false;
      cell1.ApplyActionOnMove = true;
      cell1.FitImageToCell = true;
      cell1.Selected = true;
      cell1.ShowTags = true;

      Controls.Add(_medicalViewer);
      _medicalViewer.Dock = DockStyle.Fill;
   }
}

static class LEAD_VARS
{
public const string ImagesDir = @"C:\Users\Public\Documents\LEADTOOLS Images";
}
必要条件

ターゲットプラットホーム

参照

参照

MedicalViewerメンバ
Leadtools.MedicalViewer名前空間

Leadtools.MedicalViewerは、Medical Imagingのライセンスと、解除キーが必要です。詳細は、以下を参照してください。Imaging Pro/Document/Medicalの機能