fo-dicom

Render JPEG 2000 Image Compression Dicom with Fo-Dicom

天大地大妈咪最大 提交于 2020-07-20 04:36:24
问题 I'm try to create a simple WinForms viewer to show DICOM files generated in a NOVARAD pacs system. I'm using the following code from their GitHub page: var image = new DicomImage(@"C:\myDicom.dcm"); image.RenderImage().AsClonedBitmap().Save(@"test.jpg"); Process.Start("test.jpg"); When I run the code I get the following error: Dicom.Imaging.Codec.DicomCodecException: 'Decoding dataset with transfer syntax: JPEG 2000 Image Compression (Lossless Only) is not supported.' I'm assuming I need to

Changing the font size of a Presentation State

痴心易碎 提交于 2020-04-17 21:33:17
问题 I am currently trying to create the Grayscale Softcopy Presentation State file that holds some text comment. I am creating text object sequence like this: DicomDataset textObjectSequenceDataset = new DicomDataset(); textObjectSequenceDataset.Add(DicomTag.BoundingBoxAnnotationUnits, "DISPLAY"); textObjectSequenceDataset.Add(DicomTag.UnformattedTextValue, "TERE"); textObjectSequenceDataset.Add(DicomTag.BoundingBoxTopLeftHandCorner, @"0\0"); textObjectSequenceDataset.Add(DicomTag

Changing the font size of a Presentation State

两盒软妹~` 提交于 2020-04-17 21:30:11
问题 I am currently trying to create the Grayscale Softcopy Presentation State file that holds some text comment. I am creating text object sequence like this: DicomDataset textObjectSequenceDataset = new DicomDataset(); textObjectSequenceDataset.Add(DicomTag.BoundingBoxAnnotationUnits, "DISPLAY"); textObjectSequenceDataset.Add(DicomTag.UnformattedTextValue, "TERE"); textObjectSequenceDataset.Add(DicomTag.BoundingBoxTopLeftHandCorner, @"0\0"); textObjectSequenceDataset.Add(DicomTag

Changing the font size of a Presentation State

◇◆丶佛笑我妖孽 提交于 2020-04-17 21:29:23
问题 I am currently trying to create the Grayscale Softcopy Presentation State file that holds some text comment. I am creating text object sequence like this: DicomDataset textObjectSequenceDataset = new DicomDataset(); textObjectSequenceDataset.Add(DicomTag.BoundingBoxAnnotationUnits, "DISPLAY"); textObjectSequenceDataset.Add(DicomTag.UnformattedTextValue, "TERE"); textObjectSequenceDataset.Add(DicomTag.BoundingBoxTopLeftHandCorner, @"0\0"); textObjectSequenceDataset.Add(DicomTag

fo-dicom - How can I download dcm images from PACS and save them?

别等时光非礼了梦想. 提交于 2020-01-24 22:55:08
问题 I'm trying to download dcm image from PACS server, but this is generating an empty dcm file. Following is the code: public void VisoresPacsController(string ipAddress, string aeTitle, string accessId, int port) { /* this.ipAddress = ipAddress; this.aeTitle = aeTitle; this.accessId = accessId; this.port = port; visores.Add(new VisorCommandLine("Radiant", "")); ///new DicomCStoreRequest. */ DicomClient client = new DicomClient(); var query = DicomCFindRequest.CreateImageQuery("1.2.250.1.31.2

C# System.Drawing.Image.get_Width() throws exception on WinForms form is maximized

浪尽此生 提交于 2020-01-16 21:58:09
问题 I writing Windows Forms Application application which should show image on the PictureBox control. To retrieve this image from DICOMDIR file I use fo-dicom library (driven by this guide): .... private void MainForm_Load(object sender, EventArgs e) { ImageManager.SetImplementation(WinFormsImageManager.Instance); } .... // this function is just for example // real function is bit complicated private void ShowImage() { // Getting DICOM file, retrieving all info from it // Getting dicomDataset

.NET CORE ALINK : warning AL1073: Referenced assembly 'mscorlib.dll' targets a different processor

你说的曾经没有我的故事 提交于 2020-01-04 23:25:50
问题 I am using VS2019 and .NET CORE 2.2 I am getting the warning AL1073 ALINK warning AL1073: Referenced assembly 'mscorlib.dll' targets a different processor I know this is close to the question as: ALINK : warning AL1073: Referenced assembly 'mscorlib.dll' targets a different processor BUT: I am on .NET CORE 2.2 not on 4.x The solutions proposed there do not work on .NET core in particular, attempting to add: <PropertyGroup> <TargetFrameworkSDKToolsDirectory Condition=" '$(PlatformTarget)' ==

.NET CORE ALINK : warning AL1073: Referenced assembly 'mscorlib.dll' targets a different processor

你离开我真会死。 提交于 2020-01-04 23:24:24
问题 I am using VS2019 and .NET CORE 2.2 I am getting the warning AL1073 ALINK warning AL1073: Referenced assembly 'mscorlib.dll' targets a different processor I know this is close to the question as: ALINK : warning AL1073: Referenced assembly 'mscorlib.dll' targets a different processor BUT: I am on .NET CORE 2.2 not on 4.x The solutions proposed there do not work on .NET core in particular, attempting to add: <PropertyGroup> <TargetFrameworkSDKToolsDirectory Condition=" '$(PlatformTarget)' ==

Manipulating and Converting PixelData of CT Image with fo-dicom in C#

…衆ロ難τιáo~ 提交于 2020-01-03 19:15:52
问题 For some tests I'm trying to manipulate the PixelData element of a CT image stored in dicom format and write it back in the file with Fellow Oak Dicom in C#. After some research I found out that the matrix I want to deal with is in the Buffer of PixelData stored in a byte -array. So I wrote following code: DicomFile ctFile = DicomFile.Open(image); var pixDat = ctFile.Dataset.Get<byte[]>(DicomTag.PixelData); for (int i = 0; i < pixData.Length; i++) { pixDat[i] = Convert.ToByte(200); } ctFile

How to read nested/child DICOM tags from sequences using fo-dicom?

a 夏天 提交于 2019-12-20 07:35:57
问题 For my project, I'm trying to read a radiation therapy plan (RT Plan) out of a DICOM file with fo-dicom 3.0.2 and C# in VS2015 (.Net 4.5.2). Thanks to a DICOM Editor, I know the values stored in the different DicomTags , but I cant get access to all Tag s. e.g I'm trying to read the DicomTag.BeamDose and I know the value isn't empty. string storedfile = file_path + file_name; Dicom.DicomFile file = Dicom.DicomFile.Open(@storedfile); MessageBox.Show(file.Dataset.Get<string>(Dicom.DicomTag