Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 11 04:47
    mrbean-bremen closed #1427
  • Aug 11 04:47
    mrbean-bremen commented #1427
  • Aug 10 18:48
    khaledyasser95 commented #1427
  • Aug 10 18:47
    mrbean-bremen commented #1427
  • Aug 10 18:41
    khaledyasser95 commented #1427
  • Aug 10 18:37
    mrbean-bremen commented #1427
  • Aug 10 18:36
    mrbean-bremen commented #1427
  • Aug 10 18:34
    khaledyasser95 commented #1427
  • Aug 10 18:33
    khaledyasser95 commented #1427
  • Aug 10 18:21
    mrbean-bremen commented #1427
  • Aug 10 12:57
    bjorn-malmo labeled #1428
  • Aug 10 12:57
    bjorn-malmo opened #1428
  • Aug 10 00:39
    khaledyasser95 opened #1427
  • Aug 04 06:30
    amoerie commented #1425
  • Aug 04 05:56
    gajendra2001 closed #1425
  • Aug 04 05:56
    gajendra2001 commented #1425
  • Aug 03 11:15
    amoerie commented #1425
  • Aug 03 10:45
    gajendra2001 edited #1425
  • Aug 03 09:13
    gajendra2001 edited #1425
  • Aug 02 14:35
    ge-bus commented #1422
Todilo
@Todilo
Anyone have any ideas on how to create a bitmap from a DicomImage ? I can't find any documentation to cover this, and so many different libraries that don't seem to be unified with the documentation.
howff
@howff
Hello. I'm just wondering if there's any support in fo-dicom for anonymisation/de-identification of the actual pixel data?
bobdog1986
@bobdog1986
Hello everyone, is there any demo shows how to create a RDSR dicom file ? Our device is X-ray and I need export RDSR from patient/study/series levels.
Reinhard Gruber
@gofal
@tboby Agree, the serilog logging implementation has not been migrated so far. Please add an github issue for that.
Reinhard Gruber
@gofal
@Shuun26 Seems like the tags are queried via some CFind requests. If you need more values, then first you have to add the desired values in the CFindRequest already. And secondly the server has to support those tags, meaning the server has to fill in those values in the response. Most of the servers I know only support a limited number of Tags. So you cannot expect the server to return the value of any tag you are requesting.
@Todilo I assume you are using version 5? on the main github readme page there is a link to api help: https://fo-dicom.github.io/dev/v5/usage/image_rendering.html. And I recomment do take a look at the fo-dicom-samples project. But you are right, documentation is not a strength of fo-dicom. Any help is welcome on that field.
Reinhard Gruber
@gofal
@howff Anonymization is supported as it is defined in DICOM-standard. There is a DicomAnonymizer class that does the anonymization in various profiles. But fo-dicom does not support image recognizion to analyze pixeldata if there is some burnt in text information, or to to modify the pixels of a face to make a person not recognizable in 3d volume of head.
nagulandev
@nagulandev
Hi There, I need help with Syntax to update these tag values.
DicomDataset dcmRegion = dicomimage2.Dataset.Get<DicomSequence>(DicomTag.SequenceOfUltrasoundRegions).Items[0];
dcmRegion.AddOrUpdate<ulong>(DicomTag.RegionLocationMinX0,(ulong)(0));
dcmRegion.AddOrUpdate<ulong>(Dicom.DicomTag.RegionLocationMinY0, (ulong)(0));
dcmRegion.AddOrUpdate<ulong>(Dicom.DicomTag.RegionLocationMaxX1, (ulong)(0));
dcmRegion.AddOrUpdate<ulong>(Dicom.DicomTag.RegionLocationMaxY1, (ulong)(0));
nagulandev
@nagulandev
fixed it. the issue is with the data type, replaced ulong with UInt64.
mkramers
@mkramers
Hello - I'm working in a legacy codebase and am using DicomClient to execute DicomCStoreRequests. I am trying to figure out how to integrate SSL into my client/requests. I just updated to 5.0.2, and haven't been able to find anything related to SSL in the docs. The best reference I've come across is https://stackoverflow.com/a/55413970 however this seems to target an older version. Can someone point me in the right direction? Thanks
yadavvirus
@yadavvirus
Hello, How to write log in text file using dicom.log
Dicom.Log
LogManager.SetImplementation(ConsoleLogManager.Instance); this is ok with console application. What to do for winform app so log can be written in log file
Reinhard Gruber
@gofal
@yadavvirus of yourse you can implement your own logger. All you have to do is to imlement a class that intherits from ILogger and anotherone ineriting from ILogManager which then creates the instances of your ILogger-implementation. Or you can use some ready implementation of Log4Net (a nuget package), but therefore you have to read about how to use and configure log4net.
WolvesPro
@WolvesPro
Hello, good afternoon, could someone help me to give me an idea of ​​what to study to be able to visualize the volume of my dicoms in 3D format please.
1009058470
@1009058470
hello ,it there any one know that ,why i translate a jepg to a dicom ,and it will be very big.
such a 50kb jpg will be 2500kb dicom ? is anyone know why that happen?
howff
@howff
Hi. Does anyone have any code examples for reading old-style overlays embedded in the high bits of the image data?
howff
@howff
Is there a source of documentation other than fo-dicom.github.io ? I can't decipher how to use fo-dicom from that.
howff
@howff
I get the message "Attempted to extract embedded overlay from compressed pixel data. Decompress pixel data before attempting this operation." - how do I perform the decompression?
andy-le-rmh
@andy-le-rmh
Reinhard Gruber
@gofal
@andy-le-rmh see my comments there
andy-le-rmh
@andy-le-rmh
Hi, another silly question but how to do you prevent all logging to the console? Or set the logging level to be warning, fatal etc. Thanks
Michael Werner
@WernMich
Hi, maybe someone had this issue too: I am trying to assign pixel data in two steps. First a dataset and pixel data is created with DicomPixelData.Create(dicomVideoFile.Dataset, true); - this file is stored on file system and then read from another process. This process is used to store the pixel data itself. There I am opening the pixel data with DicomPixelData.Create(dicomVideoFile.Dataset, false);because I only want to add the frames itself. When I use a FileByteBuffer object from jpeg files to add frames (JpegBaseline TS, EncapsulatedPixelData) everything works as expected. When I use a MemoryByteBuffer for bitmaps in memory instead (ImplicitVRLittleEndian, OtherWordPixelData) I get following exception: 'Expected pixel data element to have a CompositeByteBuffer.' If I change the call to DicomPixelData.Create(dicomVideoFile.Dataset, true) it works as expected. Why is there a difference?
Stefan Fuglsang
@stefanfuglsang:matrix.org
[m]

Hi, I have a user experiencing problems, that I don't see on my pc, see debug messages below. What can cause this?

Dicom.DicomDataException: DICOM element must contain a single value
ved Dicom.DicomDataset.GetSingleValue[T](DicomTag tag) i C:\dev\GitHub\fo-dicom\fo-dicom\DICOM\DicomDataset.cs:linje 496
ved Dicom.DicomFileMetaInformation..ctor(DicomDataset dataset) i C:\dev\GitHub\fo-dicom\fo-dicom\DICOM\DicomFileMetaInformation.cs:linje 37
ved Dicom.DicomFile..ctor(DicomDataset dataset) i C:\dev\GitHub\fo-dicom\fo-dicom\DICOM\DicomFile.cs:linje 82
ved Pacsinator.DicomUtilities.bitmapToDCM(String fileName) i C:\Users\sfug0008\Documents\Visual Studio 2015\Projects\Pacsinator\Pacsinator\DicomUtilities.cs:linje 497
ved Pacsinator.MainForm.prepareAndSendDicomFiles() i C:\Users\sfug0008\Documents\Visual Studio 2015\Projects\Pacsinator\Pacsinator\Form1.cs:linje 511
ved Pacsinator.MainForm.sendToPACS_Click(Object sender, EventArgs e) i C:\Users\sfug0008\Documents\Visual Studio 2015\Projects\Pacsinator\Pacsinator\Form1.cs:linje 532
ved System.Windows.Forms.Control.OnClick(EventArgs e)
ved System.Windows.Forms.Button.OnClick(EventArgs e)
ved System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
ved System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
ved System.Windows.Forms.Control.WndProc(Message& m)
ved System.Windows.Forms.ButtonBase.WndProc(Message& m)
ved System.Windows.Forms.Button.WndProc(Message& m)
ved System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
ved System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
ved System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
mrbean-bremen
@mrbean-bremen
@stefanfuglsang:matrix.org - this looks like the DICOM file lacks the SOP Class UID, e.g. the DICOM file lacks essential meta information
WolvesPro
@WolvesPro
Hello, when measuring my images I have a problem, I get the following error only in some, could someone please guide me. Thank you
ERROR:"Cannot transform point in image without geometry data"
mrbean-bremen
@mrbean-bremen
@WolvesPro - are you doing the measurements using fo-dicom? How do you do it?
Reinhard Gruber
@gofal
@WolvesPro I guess you are using the FrameGeometry classes? Then you get this error, if the image does not contain gemoetry data. E.g. there is no pixel spacing tag or so. Usually some secondary capture images (ultrasound or so) do not have pixel spacings. And without pixelspacing you cannot convert the pixels to Millimeter.
2 replies
Ali.H
@aria321

Image will be dark completely after resizing, I did resize image as:

using (var renderedImage = image.RenderImage(i))
{
    var resizedImage = renderedImage.AsSharedBitmap().Resize(newSize);
    resizeImages.Add(resizedImage);
}

Then uncompress DCM file because AddGrayScale just works with uncompressed DataSet and Remove PixelData like:

var clonDs = dicomFile.Dataset.Clone(DicomTransferSyntax.ExplicitVRLittleEndian);
 if (clonDs.HasPixelData())
                clonDs.Remove(DicomTag.PixelData);
var newDS = clonDs.AddImageGrayscale(new GrayscaleMutationDto() { Images = resizeImages.Cast<Image>(), BitsPerPixel = (ushort)bitsAllocated, RowPixelSpacing = newPixelSpacing.Row, ColumnPixelSpacing = newPixelSpacing.Column });
newDS.Save(@"C:\ResizedImage.dcm");

but ResizedImage.dcm will be black.
any clue would be appreciated.

9 replies
siddharthasaha9
@siddharthasaha9
How can I create a DICOM Router using fo-dicom DLL? Any code sample will be desirable
1 reply
1009058470
@1009058470
Is there any way to check the compress dicom file and an unCompress dicom file has the same pixelData?
4 replies
1009058470
@1009058470
I find maybe a bug in fo-dicom in compress file
it maybe lose the pixelDate in multy thread
it is a multy thread do compress file for same file
var  transferSyntaxOfDcm = DicomTransferSyntax.JPEG2000Lossless;
transferSyntaxOfDcm = DicomTransferSyntax.JPEGLSLossless;
var dcm = FellowOakDicom.DicomFile.Open(inPath);
var original = dcm.Dataset;
var changed = original.Clone(transferSyntaxOfDcm);
var newdcm = new FellowOakDicom.DicomFile(changed);
newdcm.Save(outPath);
Alexnader Rakhov
@Rahovski

Hello everyone!
I have a question to use DicomImage in UWP application.
I know, that in fo-dicom version 4.0.8 i can add nuget package extension to UWP app and base dicom lib. But how to do it in higher version?

Version:5.0.3.
How to convert IImage to WriteableBitmap, cause if a use method T As<T>(), i had exeception, that i have byte[] array.
I see, that i need to use IImageManager in article her, but maybe somebody have example for this sutiation?
My code example here:

            FileOpenPicker openPicker = new FileOpenPicker();
            openPicker.ViewMode = PickerViewMode.Thumbnail;
            openPicker.SuggestedStartLocation = PickerLocationId.ComputerFolder;
            openPicker.FileTypeFilter.Add(".dcm");
            StorageFile file = await openPicker.PickSingleFileAsync(); 
            if (file != null)
            {
                Windows.Storage.Streams.IRandomAccessStream openFile = await file.OpenAsync(FileAccessMode.Read);
                Stream sr = new StreamReader(openFile.AsStream()).BaseStream;
                FellowOakDicom.DicomFile dicomFile = FellowOakDicom.DicomFile.Open(sr);
                FellowOakDicom.Imaging.DicomImage dicomImage = new FellowOakDicom.Imaging.DicomImage(dicomFile.Dataset, 0); 
                FellowOakDicom.Imaging.IImage imgInterface = dicomImage.RenderImage(currentFrame);
                var img1 = dicomImage.RenderImage(0).As<BitmapImage>();
            }

Thanks everyone for you support!

4 replies
David Conde
@EsGod
image.png
Why Property [Invert] from [GrayScaleRenderOptions] is private , and there is no way to this became true ? ref: https://github.com/fo-dicom/fo-dicom/blob/5dcac0f30bf9d1442331f934bdb0228ed274dd70/FO-DICOM.Core/Imaging/GrayscaleRenderOptions.cs
1 reply
MadamLaunch
@MadamLaunch
What would cause fo-dicom to throw an access denied error when opening a file? All of a sudden, I can't do anything within my C#/UWP project.
I'm using v4.0.8 because this problem used to be isolated to v5.
MadamLaunch
@MadamLaunch
new DicomImage(file.Path).RenderImage().As<WriteableBitmap>() triggers an Exception with an HResult of 0x80070005, and I can't even begin to fathom why.
MadamLaunch
@MadamLaunch
Figured it out: I had removed permission to access the pictures folder (where my files were) and had to stream in the data to a DicomFile object to get the image data. :D
MadamLaunch
@MadamLaunch
What could be happening that would cause a v4 fo-dicom program from responding to a v5 one? I've got a v5 client app sending an Echo request to a v4 store processor app, and the store processor is just not responding to it.
MadamLaunch
@MadamLaunch
I just created a simple v5 store processor, based on the GitHub example, and it can't properly respond to the v5 client either.
The two apps are certainly connected to each other, since I get a "connection was actively refused"-error if I de-synchronize their ports; not a "failed to respond"-error.
Ali.H
@aria321
When I change TransferSyntax by Clone for MG modality , I got DCT coefficient out of range error,
Default transfer is 1.2.840.10008.1.2.4.70 (JPEG Lossless, Non-Hierarchical, First-Order Prediction (Process 14 [Selection Value 1]): Default Transfer Syntax for Lossless JPEG Image Compression) and I am changing it to DicomTransferSyntax.JPEGProcess2_4, is there a way to avoid this error?
Kevin Stephen Biswas
@BluerGost

I have implemented C-Store using OnCStoreRequestAsync of IDicomCStoreProvider. But the speed of transfer seem to be very slow. Which makes it unusable at the current state. Is there improvements that I can take. Such as receiving multiple request and saving those file into the server in async way. I have read through this article:
https://www.dicomstandard.org/docs/librariesprovider2/dicomdocuments/wp-cotent/uploads/2018/10/day2_s19-matthijssen-improvedicomnetwoktransfertime.pdf?sfvrsn=3da9e205_2
it talks about Enhanced Family of objects, and A-synchronous Transfer. How to enable A-synchronous Transfer in the fo-dicom

My Current Code:
Receive a single request -> Save the file in FTP server -> Save the information in the Database -> Return the success result.

vovundel
@vovundel
how can i write the same in v5 ? from v4
d.Dataset.Add(New DicomPersonName(DicomTag.PatientName, DicomEncoding.GetEncoding("ISO_IR 100"), "wwwüäß"))
JHsGame
@JHsGame
@rubit0 I'm sorry, but I want to ask you a question because you seem to be using the Unity version of Fo-Dicom. Have you solved the issue related to JPEG or IL2CPP that you mentioned before? I am currently unable to proceed with the work due to the problem with that part. I'd appreciate it if you could tell me.
sarveshJjoshi
@sarveshJjoshi
hii, I'm new to this realm and would really appreciate your help. Can someone provide me a source to get some cool luts to show more details in dicom image? Also, can anyone guide me on how to modify luts to show finer details in the image using fo-dicom?
ShannonZ
@ShannonZ
Does fo-dicom support dotnet6 ?
jingkunhub
@jingkunhub
I just started investigating FO-DICOM and joined this channel. On the validation, is it possible to configure which attributes to be validated?