Welcome to LEAD Support Forum Login | Register | Faq  

    LEAD Support Forum
  Resource to find answers and post technical questions about LEAD products.
Search    
   

Insert Private Tag
Started by vidula_joshi at 09-06-2008 3:41. Topic has 15 replies.

Print Search « Previous Thread Next Thread »
  09-06-2008, 3:41
vidula_joshi is not online. Last active: 11/20/2008 9:02:44 AM vidula_joshi

Top 200 Posts
Joined on 11-20-2007
Posts 16
Insert Private Tag
Reply Quote

I want to insert Private Tag to dicom file. For that I wrote following code

Dim nRet As Long
DicomDS.LoadDS "c:\file1.dic", 0
DicomDS.EnableMethodErrors = False
nRet = DicomDS.FindTag(131079)
If nRet <> DICOM_SUCCESS Then
   DicomDS.InsertTag 131079, -1, "Test TAG", VR_CS, 1, 1, 1
   DicomDS.InsertElement False, 131079, VR_CS, False, 0
   DicomDS.StringValueCount = 1
   DicomDS.StringValues(0) = "Test"
   DicomDS.SetStringValue (1)
   DicomDS.StringValueCount = 1
End If
DicomDS.SaveDS "c:\file2.dic", 0

But if I open file2 and write following  

DicomDS.FindTag(131079)

I get LEAD Error: General failure error.

I am using Lead 14 and vb6.0/

 


   Report 
  09-07-2008, 9:50
Adnan Ismail is not online. Last active: 11/20/2008 4:22:06 PM Adnan Ismail



Top 10 Posts
Joined on 07-31-2006
Posts 1,271
Re: Insert Private Tag
Reply Quote
Please read the help topic "Overview: Private Data Elements" the group number used in the element tag of private data elements shall be an odd number. If you change the value and you still face a problem, please put your code in a very small working project (not your full application) and send it to me in a ZIP or RAR file. 

Adnan Ismail
LEADTOOLS Technical Support

   Report 
  09-09-2008, 5:23
vidula_joshi is not online. Last active: 11/20/2008 9:02:44 AM vidula_joshi

Top 200 Posts
Joined on 11-20-2007
Posts 16
Re: Insert Private Tag
Reply Quote

Ok

I just want to insert private tag with tag name "TEST TAG " and it's value as "TEST VAL"

Can you suggest sample code for the same.

Thanks in advance


   Report 
  09-09-2008, 9:06
Adnan Ismail is not online. Last active: 11/20/2008 4:22:06 PM Adnan Ismail



Top 10 Posts
Joined on 07-31-2006
Posts 1,271
Re: Insert Private Tag
Reply Quote
I am not able to see the problem. Please try to create a very small project (not your full application) and send it to me. Also, please tell me what build number (version info) of LEADTOOLS DLLs you have.
If you want to send the project, please put it in a ZIP or RAR file.


Adnan Ismail
LEADTOOLS Technical Support

   Report 
  09-10-2008, 2:16
vidula_joshi is not online. Last active: 11/20/2008 9:02:44 AM vidula_joshi

Top 200 Posts
Joined on 11-20-2007
Posts 16
Re: Insert Private Tag

Attachment: Sample Add Tag.zip
Reply Quote

Hi

I am sending you the sample.

I am using 14.5.0.1 version of LtDic14s.dll and  14.5.0.2 version of LTDicKrn14n.dll which is added as refreance in sample project.

As you will see the problems in destination file as VR is not getting set properly

and get LEAD Error: General failure error on FindTag.
   Report 
  09-10-2008, 6:11
Adnan Ismail is not online. Last active: 11/20/2008 4:22:06 PM Adnan Ismail



Top 10 Posts
Joined on 07-31-2006
Posts 1,271
Re: Insert Private Tag
Reply Quote
You are using a very old build of LEADTOOLS DLLs. I tested your issue using the latest LEADTOOLS patches and I did not face any problem.
Please send your LEADTOOLS toolkit serial number to support@leadtools.com and mention this post so I can send you the latest patches download instructions.


Adnan Ismail
LEADTOOLS Technical Support

   Report 
  09-11-2008, 2:06
vidula_joshi is not online. Last active: 11/20/2008 9:02:44 AM vidula_joshi

Top 200 Posts
Joined on 11-20-2007
Posts 16
Re: Insert Private Tag
Reply Quote

Hello Adnan

Do you really think the problem is of the patch or is there something wrong in my code?

I am attaching my destination file(file2.dic) to show you what output I am getting.

What is the latest patch of LEAD14.5?

Regards

Vidula

 


   Report 
  09-11-2008, 2:09
vidula_joshi is not online. Last active: 11/20/2008 9:02:44 AM vidula_joshi

Top 200 Posts
Joined on 11-20-2007
Posts 16
Re: Insert Private Tag

Attachment: file2.zip
Reply Quote
Attachment :
   Report 
  09-11-2008, 3:12
Adnan Ismail is not online. Last active: 11/20/2008 4:22:06 PM Adnan Ismail



Top 10 Posts
Joined on 07-31-2006
Posts 1,271
Re: Insert Private Tag
Reply Quote
Vidula,
Your code is correct. I tested it yesterday and did not get the error you mention and the tag was inserted in the file2.dic file. Please send me your LEADTOOLS toolkit serial number to support@leadtools.com so that you can test this with the latest patches.


Adnan Ismail
LEADTOOLS Technical Support

   Report 
  09-11-2008, 5:25
vidula_joshi is not online. Last active: 11/20/2008 9:02:44 AM vidula_joshi

Top 200 Posts
Joined on 11-20-2007
Posts 16
Re: Insert Private Tag
Reply Quote

Hi

Is there any other way to insert tag with my current patch as all my other functionalities tested and are working properly with my current patch.

Regards

Vidula

 

 


   Report 
  09-11-2008, 9:02
Adnan Ismail is not online. Last active: 11/20/2008 4:22:06 PM Adnan Ismail



Top 10 Posts
Joined on 07-31-2006
Posts 1,271
Re: Insert Private Tag
Reply Quote
You are using build 1 of our 14.5 DLLs and the current build is 77. Between these two builds, quite a few issues were addressed and solved.

I am afraid I can only test this issue in the latest patches. I cannot go 76 versions backward to test it. Even if you don't want to apply the latest patches now, at least you should download them to test this particular issue to see if the patches solve it or not.


Adnan Ismail
LEADTOOLS Technical Support

   Report 
  09-11-2008, 9:28
vidula_joshi is not online. Last active: 11/20/2008 9:02:44 AM vidula_joshi

Top 200 Posts
Joined on 11-20-2007
Posts 16
Re: Insert Private Tag
Reply Quote

I test it on 67 patch and still I am getting the same problem.

 


   Report 
  09-11-2008, 11:02
Adnan Ismail is not online. Last active: 11/20/2008 4:22:06 PM Adnan Ismail



Top 10 Posts
Joined on 07-31-2006
Posts 1,271
Re: Insert Private Tag
Reply Quote
Unfortunately this doesn't prove or disprove anything. This means either that the problem was fixed in a more recent build, or there is a problem specific to your machine. We will know which one it is if you test using the latest build.


Adnan Ismail
LEADTOOLS Technical Support

   Report 
  09-12-2008, 3:08
vidula_joshi is not online. Last active: 11/20/2008 9:02:44 AM vidula_joshi

Top 200 Posts
Joined on 11-20-2007
Posts 16
Re: Insert Private Tag
Reply Quote

Hello

I am getting the inserted private tag tag as soon as it is inserted but if I try to read the tag from another application ,I get the error(or findtag method returns general failure) .Some where in the fourm I read the following

"You can then insert or retrieve an element into/from the data set just like any regular element, but whenever you restart your program or reset the tag table, you must insert the tag again before you try to insert or modify such an element."

I want it to be inserted permanently. Is it possible?

Regards

Vidula

 

 

 

 


   Report 
  09-14-2008, 8:54
Adnan Ismail is not online. Last active: 11/20/2008 4:22:06 PM Adnan Ismail



Top 10 Posts
Joined on 07-31-2006
Posts 1,271
Re: Insert Private Tag
Reply Quote
Vidula,
Normal 0 false false false MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;}

The element associated with the private tag will be saved in the dataset with the number you specify. However, since this number is not part of the DICOM Standard Default Tag Table, other applications will not recognize it, unless the programmers who wrote them define the same private tag. Similarly, in your own application, you must always insert this tag at the beginning of your application to the Tags table.

In other words, the default tags table is hard-coded. You cannot load it or save it. You can only change it programmatically (for example at application startup).




Adnan Ismail
LEADTOOLS Technical Support

   Report 
Post
 Page 1 of 2 (16 items) 1 2 »
LEAD Support Fo... » Developer » DICOM/Medical I... » Insert Private Tag

Powered by Community Server, by Telligent Systems