Represents the enumeration that will be sent through the MedicalViewerCell.Data3DRequested and MedicalViewerCell.Data3DFrameRequested to request some 3D information.
public enum MedicalViewer3DRequestedInformationType Public Enum MedicalViewer3DRequestedInformationTypeInherits System.EnumImplements System.IComparable, System.IConvertible, System.IFormattable
public enum class MedicalViewer3DRequestedInformationType : public System.Enum, System.IComparable, System.IConvertible, System.IFormattable
| Value | Member | Description |
|---|---|---|
| 0 | None | No information |
| 1 | MPRImage | Request a new MPR image. |
| 2 | CrossHair | Request updating the cross hair data. |
| 3 | CutPlaneImage | Request a new cut plane image. |
| 4 | MPRExist | Request checking if a current MPR window exist or not. |
| 5 | SlabParameters | request updating the Slab parameters |
| 6 | EnableSlab | Request enabling the slab feature of the 3D. |
| 7 | Create3DObject | Request creating a 3D object. |
| 8 | RequestFrame | Request a frame that will be used to create a 3D object. |
| 9 | DeleteContainer | Request deleting the container and freeing all the resources. |
| 10 | WindowLevel | Request applying a window level on the 3D object. |
| 11 | MPRWindowLevel | Request applying window level on the MPR image. |
| 12 | DeAttachMPR | Request detaching the MPR from the 3D control. |
| 18 | RequestPanoramicForTheFirstTime | Request creating a panoramic image for the first time. |
| 19 | UpdatePanoramic | Request updating the current panoramic image. |
| 20 | RequestSpecificPage | Request a specific derivative page (MPR or cut-line image). |
| 21 | ObjectWindowLevel | Request applying a window level on the 3D object. |
| 22 | GetParaxialPages | Request paraaxial page. |
| 23 | MPRCalibrated | The MPR plane is calibrated. |
| 24 | RequestMPRWindow | Request an MPR window. |
the method that will provide the requested information to Leadtools.Medical3D.Medical3DEngine.Provide3DInformation.
using Leadtools;using Leadtools.Dicom;using Leadtools.Medical3D;using Leadtools.Codecs;using Leadtools.MedicalViewer;using Leadtools.ImageProcessing;using Leadtools.ImageProcessing.Core;using Leadtools.ImageProcessing.Color;using Leadtools.Annotations.Engine;using Leadtools.Annotations.Designers;class MedicalViewerCutLineForm : Form{private MedicalViewer _medicalViewer;private MedicalViewerSeriesManager _seriesManager;void MedicalViewerCutLineForm_SizeChanged(object sender, EventArgs e){_medicalViewer.Size = new Size(this.ClientRectangle.Right, this.ClientRectangle.Bottom);}public MedicalViewerCutLineForm(MedicalViewerSeriesManager output){RasterCodecs _codecs = new RasterCodecs();this.SizeChanged += new EventHandler(MedicalViewerCutLineForm_SizeChanged);// 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);_seriesManager = output;MedicalViewerMultiCell cell = new MedicalViewerMultiCell(null, true, 1, 1);int index;int count = output.Stacks[0].Items.Count;CodecsImageInfo codecsInformation;// Get the image information for each frame and send them to the low memory usage function.MedicalViewerImageInformation[] imageInformation = new MedicalViewerImageInformation[count];for (index = 0; index < count; index++){codecsInformation = _codecs.GetInformation((string)(output.Stacks[0].Items[index].Data), true);imageInformation[index] = new MedicalViewerImageInformation();imageInformation[index].ImageHeight = codecsInformation.Width;imageInformation[index].ImageWidth = codecsInformation.Width;imageInformation[index].XResolution = codecsInformation.XResolution;imageInformation[index].YResolution = codecsInformation.YResolution;}cell.Data3DRequested += new EventHandler<MedicalViewerData3DRequestedEventArgs>(cell_Data3DRequested);cell.Data3DFrameRequested += new EventHandler<MedicalViewer3DFrameRequestedEventArgs>(cell_Data3DFrameRequested);cell.FramesRequested +=new EventHandler<MedicalViewerRequestedFramesInformationEventArgs>(cell_FramesRequested);FormClosing += new FormClosingEventHandler(MedicalViewerCutLineForm_FormClosing);cell.EnableLowMemoryUsage(2, count, imageInformation);_medicalViewer.Cells.Add(cell);cell.PixelSpacing = output.Stacks[0].PixelSpacing;for (index = 0; index < count; index++){cell.SetImagePosition(index, output.Stacks[0].Items[index].ImagePosition, (index == count - 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.Alpha);cell.AddAction(MedicalViewerActionType.Offset);// 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.Alpha, MedicalViewerMouseButtons.Middle, MedicalViewerActionFlags.Active);cell.SetAction(MedicalViewerActionType.Offset, MedicalViewerMouseButtons.Right, MedicalViewerActionFlags.Active);// adjust some properties of the cell and add some tags._medicalViewer.Cells[0].SetTag(2, MedicalViewerTagAlignment.TopLeft, MedicalViewerTagType.UserData, "EX. ID 230-36-5448");_medicalViewer.Cells[0].SetTag(4, MedicalViewerTagAlignment.TopLeft, MedicalViewerTagType.Frame);_medicalViewer.Cells[0].SetTag(6, MedicalViewerTagAlignment.TopLeft, MedicalViewerTagType.Scale);_medicalViewer.Cells[0].SetTag(2, MedicalViewerTagAlignment.BottomLeft, MedicalViewerTagType.WindowLevelData);_medicalViewer.Cells[0].SetTag(1, MedicalViewerTagAlignment.BottomLeft, MedicalViewerTagType.FieldOfView);// Set the image DICOM datacell.PixelSpacing = output.Stacks[0].PixelSpacing;// Create some cells that will hold the derivative images resulted from the cut-planes.MedicalViewerCell singleDerivativeCell = new MedicalViewerCell();MedicalViewerCell firstDerivativeCell = new MedicalViewerCell();MedicalViewerCell secondDerivativeCell = new MedicalViewerCell();cell.DerivativeGenerated +=new EventHandler<MedicalViewerDerivativeGeneratedEventArgs>(cell_DerivativeGenerated);// create a single cut-plane and double cut-plane.cell.ReferenceLine.CutLines.Add(new MedicalViewerPlaneCutLine(singleDerivativeCell));cell.ReferenceLine.DoubleCutLines.Add(new MedicalViewerDoublePlaneCutLine(firstDerivativeCell, secondDerivativeCell));_medicalViewer.Cells.Add(singleDerivativeCell);_medicalViewer.Cells.Add(firstDerivativeCell);_medicalViewer.Cells.Add(secondDerivativeCell);Controls.Add(_medicalViewer);_medicalViewer.Dock = DockStyle.Fill;}void MedicalViewerCutLineForm_FormClosing(object sender, FormClosingEventArgs e){}void cell_Data3DRequested(object sender, MedicalViewerData3DRequestedEventArgs e){e.Succeed = Medical3DEngine.Provide3DInformation(e);}void cell_Data3DFrameRequested(object sender, MedicalViewer3DFrameRequestedEventArgs e){RasterCodecs _codecs = new RasterCodecs();e.Image = _codecs.Load((string)(_seriesManager.Stacks[0].Items[e.ImageIndex].Data));_codecs.Dispose();}void cell_DerivativeGenerated(object sender, MedicalViewerDerivativeGeneratedEventArgs e){e.DerivativeCell.ShowCellBoundaries = true;e.DerivativeCell.ReferenceLine.Enabled = true;}void cell_FramesRequested(object sender, MedicalViewerRequestedFramesInformationEventArgs e){MedicalViewerMultiCell cell = (MedicalViewerMultiCell)(sender);RasterCodecs _codecs = new RasterCodecs();int i;RasterImage image;string fileName;if (e.RequestedFramesIndexes.Length > 0){fileName = (string)(_seriesManager.Stacks[0].Items[e.RequestedFramesIndexes[0]].Data);image = _codecs.Load(fileName);}elsereturn;for (i = 1; i < e.RequestedFramesIndexes.Length; i++){fileName = (string)(_seriesManager.Stacks[0].Items[e.RequestedFramesIndexes[i]].Data);image.AddPage(_codecs.Load(fileName));}cell.SetRequestedImage(image, e.RequestedFramesIndexes, MedicalViewerSetImageOptions.Insert);}public MedicalViewer Viewer{get { return _medicalViewer; }}}MedicalViewerCutLineForm GetMedicalViewerCutLineControl(){MedicalViewerSeriesManagerFrom form = new MedicalViewerSeriesManagerFrom();MedicalViewerSeriesManager output = form.LoadJamesHead();return new MedicalViewerCutLineForm(output);}// This example changes the default window level value by decrease the width by 100. Then resets the images based on the new value.public void MedicalViewerCutLineExample(){MedicalViewerCutLineForm myForm = GetMedicalViewerCutLineControl();MedicalViewer medicalViewer = myForm.Viewer;myForm.ShowDialog();}
Imports LeadtoolsImports Leadtools.DicomImports Leadtools.Medical3DImports Leadtools.CodecsImports Leadtools.MedicalViewerImports Leadtools.Annotations.EngineImports Leadtools.Annotations.DesignersImports Leadtools.ImageProcessing.CorePrivate Class MedicalViewerCutLineForm : Inherits FormPrivate _medicalViewer As MedicalViewerPrivate _seriesManager As MedicalViewerSeriesManagerPrivate Sub MedicalViewerCutLineForm_SizeChanged(ByVal sender As Object, ByVal e As EventArgs)_medicalViewer.Size = New Size(Me.ClientRectangle.Right, Me.ClientRectangle.Bottom)End SubPublic Sub New(ByVal output As MedicalViewerSeriesManager)Dim _codecs As RasterCodecs = New RasterCodecs()AddHandler SizeChanged, AddressOf MedicalViewerCutLineForm_SizeChanged' 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)_seriesManager = outputDim cell As MedicalViewerMultiCell = New MedicalViewerMultiCell(Nothing, True, 1, 1)Dim index As IntegerDim count As Integer = output.Stacks(0).Items.CountDim codecsInformation As CodecsImageInfo' Get the image information for each frame and send them to the low memory usage function.Dim imageInformation As MedicalViewerImageInformation() = New MedicalViewerImageInformation(count - 1) {}index = 0Do While index < countcodecsInformation = _codecs.GetInformation(CStr(output.Stacks(0).Items(index).Data), True)imageInformation(index) = New MedicalViewerImageInformation()imageInformation(index).ImageHeight = codecsInformation.WidthimageInformation(index).ImageWidth = codecsInformation.WidthimageInformation(index).XResolution = codecsInformation.XResolutionimageInformation(index).YResolution = codecsInformation.YResolutionindex += 1LoopAddHandler cell.Data3DRequested, AddressOf cell_Data3DRequestedAddHandler cell.Data3DFrameRequested, AddressOf cell_Data3DFrameRequestedAddHandler cell.FramesRequested, AddressOf cell_FramesRequestedAddHandler FormClosing, AddressOf MedicalViewerCutLineForm_FormClosingcell.EnableLowMemoryUsage(2, count, imageInformation)_medicalViewer.Cells.Add(cell)cell.PixelSpacing = output.Stacks(0).PixelSpacingindex = 0Do While index < countcell.SetImagePosition(index, output.Stacks(0).Items(index).ImagePosition, (index = count - 1))index += 1Loop' add some actions that will be used to change the properties of the images inside the control.cell.AddAction(MedicalViewerActionType.WindowLevel)cell.AddAction(MedicalViewerActionType.Alpha)cell.AddAction(MedicalViewerActionType.Offset)' 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.Alpha, MedicalViewerMouseButtons.Middle, MedicalViewerActionFlags.Active)cell.SetAction(MedicalViewerActionType.Offset, MedicalViewerMouseButtons.Right, MedicalViewerActionFlags.Active)' adjust some properties of the cell and add some tags._medicalViewer.Cells(0).SetTag(2, MedicalViewerTagAlignment.TopLeft, MedicalViewerTagType.UserData, "EX. ID 230-36-5448")_medicalViewer.Cells(0).SetTag(4, MedicalViewerTagAlignment.TopLeft, MedicalViewerTagType.Frame)_medicalViewer.Cells(0).SetTag(6, MedicalViewerTagAlignment.TopLeft, MedicalViewerTagType.Scale)_medicalViewer.Cells(0).SetTag(2, MedicalViewerTagAlignment.BottomLeft, MedicalViewerTagType.WindowLevelData)_medicalViewer.Cells(0).SetTag(1, MedicalViewerTagAlignment.BottomLeft, MedicalViewerTagType.FieldOfView)' Set the image DICOM datacell.PixelSpacing = output.Stacks(0).PixelSpacing' Create some cells that will hold the derivative images resulted from the cut-planes.Dim singleDerivativeCell As MedicalViewerCell = New MedicalViewerCell()Dim firstDerivativeCell As MedicalViewerCell = New MedicalViewerCell()Dim secondDerivativeCell As MedicalViewerCell = New MedicalViewerCell()AddHandler cell.DerivativeGenerated, AddressOf cell_DerivativeGenerated' create a single cut-plane and double cut-plane.cell.ReferenceLine.CutLines.Add(New MedicalViewerPlaneCutLine(singleDerivativeCell))cell.ReferenceLine.DoubleCutLines.Add(New MedicalViewerDoublePlaneCutLine(firstDerivativeCell, secondDerivativeCell))_medicalViewer.Cells.Add(singleDerivativeCell)_medicalViewer.Cells.Add(firstDerivativeCell)_medicalViewer.Cells.Add(secondDerivativeCell)Controls.Add(_medicalViewer)_medicalViewer.Dock = DockStyle.FillEnd SubPrivate Sub MedicalViewerCutLineForm_FormClosing(ByVal sender As Object, ByVal e As FormClosingEventArgs)End SubPrivate Sub cell_Data3DRequested(ByVal sender As Object, ByVal e As MedicalViewerData3DRequestedEventArgs)e.Succeed = Medical3DEngine.Provide3DInformation(e)End SubPrivate Sub cell_Data3DFrameRequested(ByVal sender As Object, ByVal e As MedicalViewer3DFrameRequestedEventArgs)Dim _codecs As RasterCodecs = New RasterCodecs()e.Image = _codecs.Load(CStr(_seriesManager.Stacks(0).Items(e.ImageIndex).Data))_codecs.Dispose()End SubPrivate Sub cell_DerivativeGenerated(ByVal sender As Object, ByVal e As MedicalViewerDerivativeGeneratedEventArgs)e.DerivativeCell.ShowCellBoundaries = Truee.DerivativeCell.ReferenceLine.Enabled = TrueEnd SubPrivate Sub cell_FramesRequested(ByVal sender As Object, ByVal e As MedicalViewerRequestedFramesInformationEventArgs)Dim cell As MedicalViewerMultiCell = CType(sender, MedicalViewerMultiCell)Dim _codecs As RasterCodecs = New RasterCodecs()Dim i As IntegerDim image As RasterImageDim fileName As StringIf e.RequestedFramesIndexes.Length > 0 ThenfileName = CStr(_seriesManager.Stacks(0).Items(e.RequestedFramesIndexes(0)).Data)image = _codecs.Load(fileName)ElseReturnEnd Ifi = 1Do While i < e.RequestedFramesIndexes.LengthfileName = CStr(_seriesManager.Stacks(0).Items(e.RequestedFramesIndexes(i)).Data)image.AddPage(_codecs.Load(fileName))i += 1Loopcell.SetRequestedImage(image, e.RequestedFramesIndexes, MedicalViewerSetImageOptions.Insert)End SubPublic ReadOnly Property Viewer() As MedicalViewerGetReturn _medicalViewerEnd GetEnd PropertyEnd ClassPrivate Function GetMedicalViewerCutLineControl() As MedicalViewerCutLineFormDim form As MedicalViewerSeriesManagerFrom = New MedicalViewerSeriesManagerFrom()Dim output As MedicalViewerSeriesManager = form.LoadJamesHead()Return New MedicalViewerCutLineForm(output)End Function' This example changes the default window level value by decrease the width by 100. Then resets the images based on the new value.<TestMethod()> _Public Sub MedicalViewerCutLineExample()Dim myForm As MedicalViewerCutLineForm = GetMedicalViewerCutLineControl()Dim medicalViewer As MedicalViewer = myForm.ViewermyForm.ShowDialog()End Sub
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
