Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Friday, April 4, 2008 4:40:52 AM(UTC)

Joshua  
Joshua

Groups: Registered
Posts: 28


Hi there, I tried to do this using the DicomDataSet class, however I found that the Load method still tried to load the image data (well, that's what I assume was happening as each 50mb DICOM file I enumerated took around 10sec to load, while smaller DICOM files had a much faster load time).

Is it possible to just look for a particular tag in the file without loading the image data (so i can determine whether I need to load the image data or not!)? I only need to know if the tag is present, not it's value.

I'm using Leadtools v15 with C# .Net.
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Sunday, April 6, 2008 6:41:37 AM(UTC)

Yasir Alani  
Guest

Groups: Guests
Posts: 3,034

Was thanked: 2 time(s) in 2 post(s)


This is only possible with a small number of tags, which are
detailed in the help topic "DICOM File Comments" in the main API help
file. For these tags, you can use the LEADTOOLS Read Comment function instead of the LEADTOOLS DICOM functions.

 
#3 Posted : Sunday, April 6, 2008 9:46:14 PM(UTC)

Joshua  
Joshua

Groups: Registered
Posts: 28


Unfortunately, it's a private tag I'm trying to read so I'm sure the Read Comment function won't work for me. Is there no other way?
 
#4 Posted : Monday, April 7, 2008 5:46:25 AM(UTC)

Yasir Alani  
Guest

Groups: Guests
Posts: 3,034

Was thanked: 2 time(s) in 2 post(s)


I'm afraid that the only way to read private tags is to load the entire data set.

 
#5 Posted : Monday, April 7, 2008 6:41:55 AM(UTC)

Joshua  
Joshua

Groups: Registered
Posts: 28


Dear Yasir,

with version 14.5 and 14.0 we had a DicomDS Com-Object. Using that COM component, we could simply use the LoadDS() method. That was lightning fast. After that, you could freely browse through the dataset. Unless you didn't call the GetBitmapValue() method, there was absolutely no performance issue. I would definitely need a workaround. The current implementation is unusable for us. Imagine, we have 100 micron Dicom images with up to 120 MB each. Impossible to implement performant code with the current approach.

Any idea?
 
#6 Posted : Tuesday, April 8, 2008 5:37:37 AM(UTC)

Yasir Alani  
Guest

Groups: Guests
Posts: 3,034

Was thanked: 2 time(s) in 2 post(s)


Although any .NET application could be slower than its unmanaged counterpart, the difference should not that great.


 


Are you running your tests inside the Visual Studio .NET
debugger? If yes, this could dramatically slow things down because of the way
Visual Studio loads our DLLs. Please try to make a Release build of your application and test it outside the debugger to see if this is the cause of the delay.

 
#7 Posted : Tuesday, April 8, 2008 9:40:12 PM(UTC)

Joshua  
Joshua

Groups: Registered
Posts: 28


Unfortunately, the behaviour is exactly the same regardless of whether the code is run in Debug or Release mode.
 
#8 Posted : Wednesday, April 9, 2008 5:33:27 AM(UTC)

Yasir Alani  
Guest

Groups: Guests
Posts: 3,034

Was thanked: 2 time(s) in 2 post(s)


I want to test this myself and see if I can ask our engineers to do any changes in the toolkit. Can you send me 3 things:


1. A sample DICOM data set that can be used to show the problem.


2. A small V14.5 COM project (not your full application) that shows the fast behavior.


3. A small V15 .NET project (also not your full application) that shows the slow behavior.


 


If you want to send these files, please pack them in a ZIP
or RAR file and you can either post it here, or send it in an email to support@leadtools.com. Please mention this forum post if you choose the email option.

 
#9 Posted : Thursday, April 10, 2008 12:49:02 AM(UTC)

Joshua  
Joshua

Groups: Registered
Posts: 28


Hi Yasir,

I've uploaded two projects and some sample images to the LeadTools FTP site in the directory "/upload/FujiFilm/SlowDicomDataSet". The v14 COM project is written in Delphi, the v15 .Net project is written in C#.

The v14 project is a GUI app and gives you a file browser to the images, the v15 project is a console app and uses a hard-coded path to a directory containing DICOM files. There is a code comment at the top of the main class in this project letting you know what to set the path to.

Thanks for looking into this,

Josh.
 
#10 Posted : Monday, April 14, 2008 3:56:33 AM(UTC)

Yasir Alani  
Guest

Groups: Guests
Posts: 3,034

Was thanked: 2 time(s) in 2 post(s)

You are using the LoadAndClose flag when loading
the Dicom DataSet in your C# LEADTOOLS 15 project. When I set the flag to DicomDataSetLoadFlags.None, I got a very fast result in C# as well.
 
#11 Posted : Monday, April 14, 2008 4:12:31 AM(UTC)

Joshua  
Joshua

Groups: Registered
Posts: 28


Thank you so much for that! I believed I was gaining by passing LoadAndClose since I wasn't holding an open file handle, however I guess if you pass that parameter the DicomDataSet class must load the whole file into memory to acheive it's goals. Once I modified my code to pass None it worked wonderfully.
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.075 seconds.