| Author |  Topic  | 
              
                | hamidshali
   
 
                Iran51 Posts
 | 
                    
                      |  Posted - May 28 2016 :  10:48:07     
 |  
                      | hi i want read dicom
 i read dicom  with below code
 
 ImageEnView1.IO.LoadFromFileDICOM(dlgOpen1.FileName) ;
 readtag := ImageEnView1.IO.Params.DICOM_Tags;
 redt1.Text:= readtag.GetTagString( readtag.IndexOf($7FE0,$0010) );
 
 i can not  read  tag $7FE0,$0010
 how can  read  data pixel of  $7FE0,$0010
 thanx
 
 samle  dicom file
 |  | 
              
                | xequte
      
 
                39218 Posts |  | 
              
                | hamidshali
   
 
                Iran51 Posts
 | 
                    
                      |  Posted - Jun 05 2016 :  01:38:52     
 |  
                      | hi i send to mail  samplefile
 |  
                      |  |  | 
              
                | xequte
      
 
                39218 Posts | 
                    
                      |  Posted - Jun 06 2016 :  17:25:55     
 |  
                      | Hi 
 Please email me for an updated source, which is better at recovering the meta data from this kind of file.
 
 Note, the tag ($7FE0, $0010) is a nested tag, so you would be better to use the DICOM_FindTag helper.
 
 The returned PIEDicomTag structure has a valid Data and DataLen, which you should be able to copy into a stream and read.
 
 
 
 Nigel
 Xequte Software
 www.xequte.com
 nigel@xequte.com
 
 |  
                      |  |  | 
              
                | hamidshali
   
 
                Iran51 Posts
 | 
                    
                      |  Posted - Jun 11 2016 :  17:08:03     
 |  
                      | hi plz show me  how use class   DICOM_FindTag  for read  $7FE0,$0010  tag
 thanks
 |  
                      |  |  | 
              
                | xequte
      
 
                39218 Posts | 
                    
                      |  Posted - Jun 12 2016 :  16:54:15     
 |  
                      | Hi 
 
// Find the "Pixel Data" tag
aTag := ImageEnMView1.MIO.Params[0].DICOM_FindTag( $7FE0, $0010 );
if assigned( aTag ) then
  With aTag^ do...
 
 Nigel
 Xequte Software
 www.xequte.com
 nigel@xequte.com
 
 |  
                      |  |  | 
              
                | hamidshali
   
 
                Iran51 Posts
 | 
                    
                      |  Posted - Jun 13 2016 :  11:16:43     
 |  
                      | hi i use imageen 5.2 but my imageen have not class DICOM_FindTag
 please how use this class
 
 please  help me
 |  
                      |  |  | 
              
                | xequte
      
 
                39218 Posts | 
                    
                      |  Posted - Jun 14 2016 :  04:23:09     
 |  
                      | Here is the code: 
 
function TIOParamsHelper.DICOM_FindTag(Group: Word; Element: Word): PIEDicomTag;
  {}
  procedure _ParseTags(tags: TIEDicomTags);
  var
    i, j: integer;
    tag: PIEDicomTag;
  begin
    for i := 0 to tags.Count - 1 do
    begin
      // GET DATA
      tag := tags.GetTag(i);
      if ( tag^.Group = Group ) and ( tag^.Element = Element ) then
      begin
        Result := tag;
        Exit;
      end;
      // PARSE ANY CHILDREN
      if assigned( tag.Children ) then
      begin
        // tag.Children is a TObjectList object where each item is a TIEDicomTags object
        for j := 0 to tag.Children.Count - 1 do
        begin
          _ParseTags( tag.Children[j] as TIEDicomTags );
          // Found tag?
          if Result <> nil then
            Exit;
        end;
      end;
    end;
  end;
  {}
begin
  result := nil;
  _ParseTags( DICOM_Tags );
end;
 Nigel
 Xequte Software
 www.xequte.com
 nigel@xequte.com
 
 |  
                      |  |  | 
              
                | hamidshali
   
 
                Iran51 Posts
 |  | 
              
                | xequte
      
 
                39218 Posts | 
                    
                      |  Posted - Jun 16 2016 :  21:56:39     
 |  
                      | Hi Hamid 
 I cannot reproduce that. This works fine for me (with your file RD.1.2.410.200018....dcm)...
 
 
procedure TMainForm.Button1Click(Sender: TObject);
var
  atag: PIEDicomTag;
begin
  atag := MainForm.ImageEnMView1.MIO.Params[0].DICOM_FindTag($7FE0,$0010);
  if atag = nil then
    raise Exception.create( 'Invalid Tag' );
  // Do something with atag^.Data
end;
 Nigel
 Xequte Software
 www.xequte.com
 nigel@xequte.com
 
 |  
                      |  |  | 
              
                | hamidshali
   
 
                Iran51 Posts
 | 
                    
                      |  Posted - Jun 17 2016 :  10:41:27     
 |  
                      | please send me out put of read my file if you read my file correct mutt be similat to
 ..
 ..
 [3004:000E](DoseGridScaling)DS=<1>.00
 [300C:0002](ReferencedRTPlanSequence)SQ=<1>Sequence Data
 [7FE0:0010](PixelData)OW_OB=<68>Pixel Data 68 frame
 1:17956Byte  : include --> isodose curve
 2:17956Byte
 3:17956Byte
 4:17956Byte
 5:17956Byte
 6:17956Byte
 ..
 ...
 .
 [7FE0:0010]:= include frames similat to above
 
 
 |  
                      |  |  | 
              
                | hamidshali
   
 
                Iran51 Posts
 | 
                    
                      |  Posted - Jun 17 2016 :  11:33:26     
 |  
                      | i use 
 
 atag: PIEDicomTag;
  doseRT:TIEDicomTags;
procedure TForm3.ReadRTStruct(RTtags: TIEDicomTags);
 var
  RTtag: PIEDicomTag;
  i:Integer;
 begin
  for i := 0 to RTtags.Count - 1 do
  begin
   if (RTtag^.Group=$7FE0)and(RTtag^.Element=$0010) then
   begin
  //  atag:=RTtag;
    doseRT:= RTtags;
   end;
  end;
 end;
//...............
//.........
 procedure TForm3.ReadRTdose(tags: TIEDicomTags);
 var
 RTtag: PIEDicomTag;
  i:Integer;
 begin
  for i := 0 to tags.Count - 1 do
  begin
   redt1.Lines.Add(tags.GetTagString(i))
  end;
 end;
//.................
 please   tell me  corect  code
 |  
                      |  |  | 
              
                | xequte
      
 
                39218 Posts | 
                    
                      |  Posted - Jun 18 2016 :  01:06:07     
 |  
                      | Hi Hamid 
 Your code will not work because ($7FE0, $0010) is a nested tag (a child of another tag). So you need to use a method like DICOM_FindTag() above so that you also check nested/child tags.
 
 Nigel
 Xequte Software
 www.xequte.com
 nigel@xequte.com
 
 |  
                      |  |  | 
              
                | hamidshali
   
 
                Iran51 Posts
 | 
                    
                      |  Posted - Jun 18 2016 :  07:24:17     
 |  
                      | hi you can send me unit of imageen that have DICOM_FindTag method
 
 my version of imageen have not this  command
 
 i use your function but  error for me for
 
 please send me unit of imageen that i can use DICOM_FindTag(
 ImageEnMView1.MIO.Params[0].DICOM_FindTag($7FE0,$0010);
 
 thanks
 
 
 |  
                      |  |  | 
              
                | xequte
      
 
                39218 Posts | 
                    
                      |  Posted - Jun 18 2016 :  20:47:43     
 |  
                      | Hi 
 I've changed the code above from a helper method to a normal method.
 
 Just call as:
 
 RTTag := DICOM_FindTag( ImageEnMView1.MIO.Params[0].DICOM_Tags, $7FE0, $0010 );
 
 
 
function DICOM_FindTag(tags: TIEDicomTags; Group: Word; Element: Word): PIEDicomTag;
  {}
  procedure _ParseTags(tags: TIEDicomTags);
  var
    i, j: integer;
    tag: PIEDicomTag;
  begin
    for i := 0 to tags.Count - 1 do
    begin
      // GET DATA
      tag := tags.GetTag(i);
      if ( tag^.Group = Group ) and ( tag^.Element = Element ) then
      begin
        Result := tag;
        Exit;
      end;
      // PARSE ANY CHILDREN
      if assigned( tag.Children ) then
      begin
        // tag.Children is a TObjectList object where each item is a TIEDicomTags object
        for j := 0 to tag.Children.Count - 1 do
        begin
          _ParseTags( tag.Children[j] as TIEDicomTags );
          // Found tag?
          if Result <> nil then
            Exit;
        end;
      end;
    end;
  end;
  {}
begin
  result := nil;
  _ParseTags( DICOM_Tags );
end;
 Nigel
 Xequte Software
 www.xequte.com
 nigel@xequte.com
 
 |  
                      |  |  | 
              
                | xequte
      
 
                39218 Posts |  | 
              
                | hamidshali
   
 
                Iran51 Posts
 | 
                    
                      |  Posted - Jun 19 2016 :  11:03:54     
 |  
                      | please please  please ........... 
 i use your code but
 //.................
 1:=
 procedure TForm3.Button3Click(Sender: TObject);
 var
 Index: integer;
 Tags: PIEDicomTag;
 begin
 if dlgOpen1.Execute then
 begin
 ImageEnView1.IO.LoadFromFileDICOM(dlgOpen1.FileName) ;
 Tags := imageenview1.IO.Params.DICOM_Tags.FindNestedTag($7FE0,$0010, Index);
 if Index > -1 then
 ShowMessage( 'ok')
 else
 ShowMessage( 'no');
 end;
 end;
 
 result:  no
 //........................
 i use demo  imageen
 Loading/Saving Demos/Dicom Viewer
 
 for read dataset
 it is  read data set of my file( file RD.1.2.410.200018....dcm)
 but it can not show  all data set for me
 
 i want read all of data set from my file
 i read below tags
 //....
 (3004,0056)	DVH Number of Bins	dvIS
 (3004,0058)	DVH Data	dvDS
 (3004,0060)	DVH Referenced ROI Sequence	dvSQ
 (3004,0062)	DVH ROI Contribution Type	dvCS
 (3004,0070)	DVH Minimum Dose	dvDS
 (3004,0072)	DVH Maximum Dose	dvDS
 (3004,0074)	DVH Mean Dose	dvDS
 (3006,0000)	Structure Set Group Length	dvUL
 (3006,0002)	Structure Set Label
 
 ..
 ..
 please  send me your project that you could read all of data set of my file
 
 please send me  (*dpr)
 |  
                      |  |  | 
              
                | xequte
      
 
                39218 Posts | 
                    
                      |  Posted - Jun 19 2016 :  20:12:03     
 |  
                      | Hi 
 I don't see all those tags for that file. It has:
 
 
(0002,0000) File Meta Information Group Length (UL) : "26"
(0002,0010) Transfer Syntax UID (UI) : "1.2.840.10008.1.2"
(0008,0005) Specific Character Set (CS) : "ISO_IR 100"
(0008,0012) Instance Creation Date (DA) : "20150310"
(0008,0013) Instance Creation Time (TM) : "154423.0"
(0008,0016) SOP Class UID (UI) : "1.2.840.10008.5.1.4.1.1.481.2"
(0008,0018) SOP Instance UID (UI) : "1.2.410.200018.1001.1.2.67324533.0.20150310154420719"
(0008,0020) Study Date (DA) : "20150308"
(0008,0030) Study Time (TM) : "115319.296000 "
(0008,0050) Accession Number (SH) : ""
(0008,0060) Modality (CS) : "RTDOSE"
(0008,0070) Manufacturer (LO) : "Seoul C&J "
(0008,0090) Referring Physician's Name (PN) : ""
(0008,1030) Study Description (LO) : "RT^RT_Pelvis (Adult)"
(0008,1090) Manufacturer's Model Name (LO) : "CorePLAN"
(0010,0010) Patient's Name (PN) : "GHORBANIAN^KAZEM"
(0010,0020) Patient ID (LO) : "790258"
(0010,0030) Patient's Birth Date (DA) : "19610308"
(0010,0040) Patient's Sex (CS) : "M "
(0018,0050) Slice Thickness (DS) : ""
(0020,000D) Study Instance UID (UI) : "1.3.12.2.1107.5.1.4.80126.30000015030508240482800000592"
(0020,000E) Series Instance UID (UI) : "1.2.410.200018.1001.1.2.67324533.0.20150310154420719"
(0020,0010) Study ID (SH) : "1 "
(0020,0011) Series Number (IS) : ""
(0020,0013) Instance Number (IS) : ""
(0020,0032) Image Position (Patient) (DS) : "250\410\-1593 "
(0020,0037) Image Orientation (Patient) (DS) : "-1\0\0\0\-1\0 "
(0028,0002) Samples per Pixel (US) : "1"
(0028,0004) Photometric Interpretation (CS) : "MONOCHROME2 "
(0028,0008) Number of Frames (IS) : "98"
(0028,0009) Frame Increment Pointer (AT) : "798724"
(0028,0010) Rows (US) : "70"
(0028,0011) Columns (US) : "101"
(0028,0030) Pixel Spacing (DS) : "5\5 "
(0028,0100) Bits Allocated (US) : "32"
(0028,0101) Bits Stored (US) : "32"
(0028,0102) High Bit (US) : "31"
(0028,0103) Pixel Representation (US) : "0"
(3004,0002) Dose Units (CS) : "GY"
(3004,0004) Dose Type (CS) : "PHYSICAL"
(3004,000A) Dose Summation Type (CS) : "PLAN"
(3004,000C) Grid Frame Offset Vector (DS) : "0\3.00003051757813\6...<SNIP>...5156 "
(3004,000E) Dose Grid Scaling (DS) : "1.e-007 "
(300C,0002) Referenced RT Plan Sequence (SQ) : ""
0:
   (0008,1150) Referenced SOP Class UID (UI) : "1.2.840.10008.5.1.4.1.1.481.5"
   (0008,1155) Referenced SOP Instance UID (UI) : "1.2.410.200018.1001.1.5.67324533.0.20150310154420719"
   (7FE0,0010) Pixel Data (OW) : ""
 
 Nigel
 Xequte Software
 www.xequte.com
 nigel@xequte.com
 
 |  
                      |  |  | 
              
                | hamidshali
   
 
                Iran51 Posts
 | 
                    
                      |  Posted - Jun 20 2016 :  05:02:35     
 |  
                      | hi 
 i need data  from (7FE0,$0010) to end of dataset my file
 please  help me
 how  get data
 
 
 |  
                      |  |  | 
              
                | xequte
      
 
                39218 Posts |  | 
              
                | hamidshali
   
 
                Iran51 Posts
 | 
                    
                      |  Posted - Jun 21 2016 :  13:39:59     
 |  
                      | hi please help me
 
 i work on my programs for long time but  i need data set 7FE0,$0010) to end of my file
 
 you know define function for read all data set dicom rt file
 |  
                      |  |  | 
              
                
                |  Topic  |  |