DVTk (Main) Forum Index
   All Posts (noldor)

 Bottom   Previous Topic   Next Topic

« 1 (2) 3 »


Re: creation of temporary .pix files
Quite a regular
Joined:
2010/3/23 15:01
Group:
Registered Users
Posts: 24
Level : 3; EXP : 62
HP : 0 / 65
MP : 8 / 607
Offline
If you read the dicom files with "DvtkHighLevelInterface.Dicom.Files.DicomFile" class, there might be one more parameter as "DicomThread" in the "Read()" method. If you set the "dcmThread.Options.StorageMode" value to "NoStorage" and set the "DicomFile.StoreOBOFOWValuesWhenReading" value to "false", that will disable creating the temporary files.

BUT!

In my experience with Dvtk library, i've realized that if you disable those temporary files, you will not able to reach any image data (pixel data) with your Dicomfile reader. Which means, if your main purpose is reading some tag values from dicom file, it is ok to disable it. But if you try to save a copy of that file by "DicomFile.Write()" method, you should not disable that, else the copied file will not include any pixel information.

What i am doing is only disabling temporary files for non-storage (no-pixel needed) operations and deleting temporary files after closing my application.

Posted on: 2010/8/27 12:22
Transfer the post to other applications Transfer
Topic | Forum


v3.1.0.2 DvtkManagedCodeAdaptor.dll Reference Problem on Windows XP or 2003.
Quite a regular
Joined:
2010/3/23 15:01
Group:
Registered Users
Posts: 24
Level : 3; EXP : 62
HP : 0 / 65
MP : 8 / 607
Offline
Since a very long time, my application which is using Dvtk library v3.1.0.2, is returning an error on other computers. Something like: FileNotFound exception on DvtkManagedCodeAdaptor.dll or one of its dependencies.

This error generally occurs on Windows XP or Windows Server 2003 systems. But sometimes it is the same even on Windows 7 systems too.

I found this topic on the forum:
http://www.dvtk.org/modules/newbb/viewtopic.php?post_id=1215
But the "use a reference path without blanks" stuff didn't solve my problem.

Finally i tried to replace my library files with previous version v3.0.6.0. And it worked just fine.

I could continue with this previous version, but my main problem with previous version is; there are no such properties "CallingAETitle" and "CalledAETitle" in the DvtkHighLevelInterface.Dicom.Messages.AssociateRq class. I really need these properties.

The weird thing is library returns no error on my PC. Only when i try to run application on other computers the error occurs. And not all of them, %70 returns this error, %30 works fine. But i could not resolve the main reason.

So, what are the real dependencies of latest DvtkManagedCodeAdaptor.dll? What is the difference between them?

I digged a bit with "Dependency Walker".
There are two dependent DLL giving warning:
"IESHIMS.DLL" and "WER.DLL"

But i think these are not very important files, since they are also giving warnings for the previous version of "DvtkManagedCodeAdaptor.dll".

Posted on: 2010/7/13 15:35
Transfer the post to other applications Transfer
Topic | Forum


Re: Saving dicom file from recieved StorageRequest
Quite a regular
Joined:
2010/3/23 15:01
Group:
Registered Users
Posts: 24
Level : 3; EXP : 62
HP : 0 / 65
MP : 8 / 607
Offline
NOTE : "obj" is "dicomMessage" itself. I forgot to edit that part.


Another question here is;
How to disable auto saving dicom files into "DicomThread.DataDirectory"??

When i set;

DicomThread.Options.StorageMode = NoStorage;

it is disabled. But if i disable "StorageMode", then
dicomFile.DataSet.CloneFrom(dicomMessage.DataSet);
will not copy any image data into file.

Posted on: 2010/6/3 10:28
Transfer the post to other applications Transfer
Topic | Forum


Saving dicom file from recieved StorageRequest
Quite a regular
Joined:
2010/3/23 15:01
Group:
Registered Users
Posts: 24
Level : 3; EXP : 62
HP : 0 / 65
MP : 8 / 607
Offline

overriden function in

Dvtk.DvtkDicomEmulators.StorageMessageHandlers.CStoreHandler

 

public override bool HandleCStoreRequest(DicomMessage dicomMessage)
{
       // base.HandleCStoreRequest(dicomMessage);

       DicomFile dicomFile = new DicomFile();
       dicomFile.DataSet.CloneFrom(obj.DataSet);

      dicomFile.FileMetaInformation.MediaStorageSOPClassUID = "" +
                                       obj.CommandSet.GetValues("0x00000002")[0];

      dicomFile.FileMetaInformation.MediaStorageSOPInstanceUID = "" +
                                       obj.CommandSet.GetValues("0x0000100")[0];

       dicomFile.TransferSyntax = /* How am i suppose to get current Transfer Syntax here ?? It is important to create a dicom file... */

      
                       
       string savePath =  /* a path string like studyInsUID/seriesInstanceUId/SopInstUID.dcm */

        if (!Directory.Exists(Path.GetDirectoryName(savePath)))
        {
                Directory.CreateDirectory(Path.GetDirectoryName(savePath));
        }
        dicomFile.Write(savePath);

        return true;
}


Posted on: 2010/6/3 9:34
Transfer the post to other applications Transfer
Topic | Forum


Re: Retrieving attribute name
Quite a regular
Joined:
2010/3/23 15:01
Group:
Registered Users
Posts: 24
Level : 3; EXP : 62
HP : 0 / 65
MP : 8 / 607
Offline
I need the same solution here.
I try to find a way to retrieve tag meaning as string, but i just couldn't.

Posted on: 2010/5/26 16:02
Transfer the post to other applications Transfer
Topic | Forum


Re: Reading Dicom Files with Transfer Syntax UID
Quite a regular
Joined:
2010/3/23 15:01
Group:
Registered Users
Posts: 24
Level : 3; EXP : 62
HP : 0 / 65
MP : 8 / 607
Offline
Yes, i noticed that i should use "DicomFile" class right after i opened this topic.
Thank you.

But now i got another problem.

What i do in my project is pushing dvtk libraries to a lower level layer and creating my own simple dicom classes, just like main dvtk dicom classes, on a middle layer level. So that, if i decide to manage all dicom stuff without a 3th party dicom library or decide to change my 3th party dicom library one day, that won't be a problem and it will be easy to implement.

Now, i created some classes like this.


enum myVR
{
// all vr types
}

class myAttributeSet
{
// a class content just looks like a collection
// Add, Remove, SetValue, GetValue etc...
// including dicom tags as keys, values, VR types
// and tag descriptions

}

class myDataSet : myAttributeSet
{
// .. blablabla
}
class myCommandSet : myAttributeSet
{
// .. blablabla
}
class myFileMetaInfoSet : myAttributeSet
{
// .. blablabla
}

class myDicomMessage
{
public myDicomMessage(){}
public myCommandSet CommandSet {get;set;}
public myDataSet DataSet {get;set;}
}

class myDicomFile
{
public myDicomFile(){}
public myFileMetaInfoSet FileMetaInformation { get; set;}
public myDataSet DataSet { get; set; }
}

I also created some Converter functions to convert classes between my classes and dvtk classes. And the problem starts here. I can manage this convert works only for "DataSet". But since "AttirubuteSet" and "CommandSet" classes do not have constructors, i can not create a new one to be return at the end of my conversion.

Can you suggest me some possible solution on this logic.

Thanks.

Posted on: 2010/5/26 8:02
Transfer the post to other applications Transfer
Topic | Forum


Reading Dicom Files with Transfer Syntax UID
Quite a regular
Joined:
2010/3/23 15:01
Group:
Registered Users
Posts: 24
Level : 3; EXP : 62
HP : 0 / 65
MP : 8 / 607
Offline
I'm reading a dicom file like this:

DataSet ds = new DataSet();
ds.Read("C:\\001.dcm", mainThread);


But the (0002,0010) TransferSyntaxUID can not be read with this method. In fact, the tags, which have a group number smaller than "0008", can not be read with this method at all.

Why is that? How will i get all the attributes starting from "0002" group number??

Thanks.

Posted on: 2010/5/25 15:54
Transfer the post to other applications Transfer
Topic | Forum


Re: Dvtk WorklistScp and Scheduled Procedure Step Sequence
Quite a regular
Joined:
2010/3/23 15:01
Group:
Registered Users
Posts: 24
Level : 3; EXP : 62
HP : 0 / 65
MP : 8 / 607
Offline
Here is more weird stuff..

I noticed that, if i don't add these attributes below, the Scheduled Precedure Step Sequence is not included either:

InformationModel.AddDefaultAttributeToInformationModel(true, "0x00400002", DvtkData.Dimse.VR.DA, System.DateTime.Now.ToString("yyyyMMdd", System.Globalization.CultureInfo.InvariantCulture));
InformationModel.AddDefaultAttributeToInformationModel(true, "0x00400003", DvtkData.Dimse.VR.TM, System.DateTime.Now.ToString("HHmmss", System.Globalization.CultureInfo.InvariantCulture));


Why should i add these values ??

And also, if there are two or more Sch.Proc.Step Items in the DataSet, the response fails again.


Please tell me a clean method of how to use WorklistInformationModel with CFindHandler.

Posted on: 2010/4/26 8:53
Transfer the post to other applications Transfer
Topic | Forum


Re: accessing SQ attributes
Quite a regular
Joined:
2010/3/23 15:01
Group:
Registered Users
Posts: 24
Level : 3; EXP : 62
HP : 0 / 65
MP : 8 / 607
Offline
aahh yes. i didn't notice that array number is missing too.

Posted on: 2010/4/23 15:47
Transfer the post to other applications Transfer
Topic | Forum


Re: accessing SQ attributes
Quite a regular
Joined:
2010/3/23 15:01
Group:
Registered Users
Posts: 24
Level : 3; EXP : 62
HP : 0 / 65
MP : 8 / 607
Offline
did you tried
dcfile.DataSet.GetValues("0x00081111/0x00081150")
??

Posted on: 2010/4/22 7:34
Transfer the post to other applications Transfer
Topic | Forum



 Top
« 1 (2) 3 »



[Advanced Search]