ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 ImageEn and DicomDir
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

jwest

Brazil
67 Posts

Posted - May 20 2016 :  14:29:45  Show Profile  Reply
Hi,

I have a dicomdir file and I need read and show your structure(patient,study,serie, image ..).

I am lost how could I do it with imageen. Is it possible?

IДd like also if is possible with imageen create and read a dicomdir.

Regards, Luiz

jwest

Brazil
67 Posts

Posted - May 20 2016 :  16:31:55  Show Profile  Reply
Hi, I did something as below. I think the function getfilename can be better. Does someone can help me?



function GetFileName(ImPath: string; aTags: TIEDicomTags): string;
var  a1: PIEDicomTag;
     i: Integer;
     s:string;
begin
    a1 := aTags.GetTag(4, $1500);
    Result := ImPath;
    if not assigned(a1) then exit;
    s:=aTags.GetTagString(4, $1500);
    if assigned(a1.Children) then begin
      for i := 0 to a1.Children.count - 1 do
      begin
        if i <> 0 then
          Result := Result + '\';
        Result := Result + TIEDicomTags(a1.Children[i]).GetTagString(0) ; //or GetTagString(i) ????
      end;
    end else Result := Result +s;
end;

procedure OpenDicomDir(ADir: string);
var
  n1, n2, n3, n4: TTreeNode;
  rotag, tags: TIEDicomTags;
  tag: PIEDicomTag;
  i: Integer;
  str1, str2: string;
begin
  ImagePath := ExtractFilePath(ADir);
  TreeView1.Items.Clear;
  TreeView1.Enabled := false;
  DIR_IO.ParamsFromFileFormat(ADir, ioDICOM);

  try
    TreeView1.Items.Clear;
    rotag := DIR_IO.Params.DICOM_Tags;
    tag := rotag.GetTag(4, $1220);
    n1 := nil;
    n2 := nil;
    n3 := nil;
    if assigned(tag) and assigned(tag.Children) then
    begin
      for I := 0 to tag.Children.Count - 1 do // Iterate
      begin
        tags := (tag.Children[I] as TIEDicomTags);// Attributes[i];
        if assigned(tags) then
        begin
          str1 := Trim(tags.GetTagString(4, $1430));
          if str1 = 'PATIENT' then begin
            str2 := (tags.GetTagString($10, $10));
            n1 := TreeView1.Items.Add(nil, str2);
            n1.ImageIndex := 1;
            n1.Data := tags;
          end else if str1 = 'STUDY' then begin
            n2 := TreeView1.Items.AddChild(n1, tags.GetTagString($8, $20));
            n2.ImageIndex := 2;
            n2.Data := tags;
          end else if str1 = 'SERIES' then  begin
            if assigned(tags.GetTag($20, $11)) then
              n3 := TreeView1.Items.AddChild(n2, tags.GetTagString($8, $60) + tags.GetTagString($20, $11))
            else
              n3 := TreeView1.Items.AddChild(n2, tags.GetTagString($8, $60));
            n3.ImageIndex := 3;
            n3.Data := tags;
          end else if str1 = 'IMAGE' then begin
            n4 := TreeView1.Items.AddChild(n3, GetFileName(ImagePath,tags) );
            n4.ImageIndex := 4;
            n4.Data := tags;
          end;
        end;
      end;
    end;
  finally
    TreeView1.Enabled := true;
    TreeView1.Selected := TreeView1.Items[0];
  end;
end;
Go to Top of Page

jwest

Brazil
67 Posts

Posted - May 20 2016 :  20:39:39  Show Profile  Reply
I have posted some code to read dicomdir. I create a dicomdir with dcmdir from dcmcache and used my code posted and itДs working. I tested only with only a dicom image.

Trying to continue I did the next to create a dicomdir from an array of dicom files(I used TimageEnvect).

But the file generated is invalid.

Please, Some help will be appreciated.


procedure PutImageToDICOMDIR(ADataset: TImageEnVect; iev: TImageEnVect; sfname: AnsiString;
  fIndex: Integer);
  function NeedImage: Integer;
  var
    i: Integer;
    tags: TIEDicomTags;
    tag: PIEDicomTag;
  begin
    Result := -1;
    tag := ADataset.io.Params.DICOM_Tags.GetTag(4, $1220);//das.GetTagString(4, $1220);
    if assigned(tag) then begin
      for i := 0 to tag.Children.Count - 1 do
      begin
        tags := (tag.Children[I] as TIEDicomTags);// Attributes[i];
        if assigned(tags) then
        if (tags.GetTagString($4, $1430) = 'IMAGE')
          and (tags.GetTagString($20, $13) = iev.io.Params.DICOM_Tags.GetTagString($20, $13)) then
        begin
          Result := i;
          exit;
        end;
      end;
    end;
  end;
  function CreateNewImage(ABitmap: TBitmap): TIEDicomTags;
  var newimage: TImageEnView;
  begin
    newimage:=TImageEnView.Create(nil);
    with newimage.io.Params.DICOM_Tags do begin
      SetTagNumeric($28, $11, ABitmap.Width);
      SetTagNumeric($28, $10, ABitmap.Height);
      SetTagNumeric($28, $2, 1);
      SetTagString($28, $4, 'MONOCHROME2');
      SetTagNumeric($28, $100, 8);
      SetTagNumeric($28, $101, 8);
      SetTagNumeric($28, $102, 7);
    end;
    //not sure how to do SetTagByteBuffer
  end;
var
  Children : TObjectList;
  tag, da2: TIEDicomTags;
begin
  Children := TObjectList.Create();
  tag := TIEDicomTags.Create;
  tag.SetTagNumeric($4, $1400, 0);
  tag.SetTagNumeric($4, $1410, 65535);
  tag.SetTagNumeric($4, $1420, 0);
  tag.SetTagString($4, $1430, 'IMAGE');
  tag.SetTagString($4, $1500, sfname);

  tag.SetTagString($20, $13, iev.IO.Params.DICOM_Tags.GetTagString($20, $13));

  if assigned(iev.IO.Params.DICOM_Tags.GetTag(8, $8)) then
    tag.SetTagString($8, $8, iev.IO.Params.DICOM_Tags.GetTagString($8, $8));
  if assigned(iev.IO.Params.DICOM_Tags.GetTag(8, $23)) then
    tag.SetTagString($8, $23,iev.IO.Params.DICOM_Tags.GetTagString(8, $23));
  if assigned(iev.IO.Params.DICOM_Tags.GetTag(8, $33)) then
    tag.SetTagString($8, $33,iev.IO.Params.DICOM_Tags.GetTagString(8, $33));;

  Children.Add(tag);
  Adataset.IO.Params.DICOM_Tags.AddTag(4, $1220,dvSQ,nil,-1, Children);
  //todo create image icon to add in tag.SetTagByteBuffer($88, $200,image);
end;

procedure PutSeriesToDICOMDIR(ADataset: TImageEnVect; iev: TImageEnVect; sfName: AnsiString;
  fIndex: Integer);

  function HasSerie: Integer;
  var
    i: Integer;
    tags: TIEDicomTags;
    tag: PIEDicomTag;
  begin
    Result := -1;
    tag := ADataset.io.Params.DICOM_Tags.GetTag(4, $1220);
    if assigned(tag) then begin
      for i := 0 to tag.Children.Count - 1 do
      begin
        tags := (tag.Children[I] as TIEDicomTags);
        if assigned(tags) then
         if (tags.GetTagString($4, $1430) = 'SERIES')
          and (tags.GetTagString($20, $11) = iev.io.Params.DICOM_Tags.GetTagString($20, $11))
          and (tags.GetTagString($20, $E) = iev.io.Params.DICOM_Tags.GetTagString($20, $E))
          and (tags.GetTagString($20, $10) = iev.io.Params.DICOM_Tags.GetTagString($20, $10))
          and (tags.GetTagString($20, $D) = iev.io.Params.DICOM_Tags.GetTagString($20, $D)) then
        begin
          Result := i;
          exit;
        end;
      end;
    end;
  end;
var
  Children : TObjectList;
  tag: TIEDicomTags;
  i: Integer;
  ss:string;
begin
  i := HasSerie;
  if i < 0 then begin
    Children := TObjectList.Create();
    tag := TIEDicomTags.Create;
    tag.SetTagNumeric($4, $1400, 0);
    tag.SetTagNumeric($4, $1410, 65535);
    tag.SetTagNumeric($4, $1420, 0);
    tag.SetTagString($4, $1430, 'SERIES');
    if assigned(iev.IO.Params.DICOM_Tags.GetTag(8, $21)) then
      tag.SetTagString($8, $21,iev.IO.Params.DICOM_Tags.GetTagString(8, $21));
    if assigned(iev.IO.Params.DICOM_Tags.GetTag(8, $31)) then
      tag.SetTagString($8, $31,iev.IO.Params.DICOM_Tags.GetTagString(8, $31));
    tag.SetTagString($8, $60, iev.IO.Params.DICOM_Tags.GetTagString(8, $60));
    tag.SetTagString($20, $E, iev.IO.Params.DICOM_Tags.GetTagString($20, $E));
    tag.SetTagString($20, $11, iev.IO.Params.DICOM_Tags.GetTagString($20, $11));
    tag.SetTagString($20, $D, iev.IO.Params.DICOM_Tags.GetTagString($20, $D));
    if assigned(iev.IO.Params.DICOM_Tags.GetTag($20, $10)) then begin
      ss:=trim(iev.IO.Params.DICOM_Tags.GetTagString($20, $10));
      if ss<>'' then tag.SetTagString($20, $10, ss);
    end;
    if assigned(iev.IO.Params.DICOM_Tags.GetTag($8, $103E)) then begin
      ss:=iev.IO.Params.DICOM_Tags.GetTagString($8, $103E);
      if ss<>'' then  tag.SetTagString($8, $103E, ss);
    end;
    Children.Add(tag);
    Adataset.IO.Params.DICOM_Tags.AddTag(8, $50,dvSQ,nil,-1, Children);
  end;
  PutImageToDICOMDIR(ADataset, iev, sfName, i);
end;

procedure PutStudyToDICOMDIR(ADataset: TImageEnVect; iev: TImageEnVect; sfname,
  FStudyReport: AnsiString;
  FIndex: Integer);

  function HasStudy: Integer;
  var
    i: Integer;
    tags: TIEDicomTags;
    tag: PIEDicomTag;
  begin
    Result := -1;
    tag := ADataset.io.Params.DICOM_Tags.GetTag(4, $1220);
    if assigned(tag) then begin
      for i := 0 to tag.Children.Count - 1 do
      begin
         tags := (tag.Children[I] as TIEDicomTags);
         if assigned(tags) then
          if (tags.GetTagString($4, $1430) = 'STUDY')
          and (tags.GetTagString($20, $10) = iev.io.Params.DICOM_Tags.GetTagString($20, $10))
          and (tags.GetTagString($20, $D) = iev.io.Params.DICOM_Tags.GetTagString($20, $D)) then
        begin
          Result := i;
          exit;
        end;
      end;
    end;
  end;
var
  Children : TObjectList;
  tag: TIEDicomTags;
  i: Integer;
  ss:string;
begin
  i := HasStudy;
  if i < 0 then begin
    Children := TObjectList.Create();
    tag := TIEDicomTags.Create;
    tag.SetTagNumeric($4, $1400, 0);
    tag.SetTagNumeric($4, $1410, 65535);
    tag.SetTagNumeric($4, $1420, 0);
    tag.SetTagString($4, $1430, 'STUDY');
    if assigned(iev.IO.Params.DICOM_Tags.GetTag(8, $20)) then
      tag.SetTagString($8, $20,iev.IO.Params.DICOM_Tags.GetTagString(8, $20))
    else
      if assigned(iev.IO.Params.DICOM_Tags.GetTag(8, $21)) then
      tag.SetTagString($8, $20,iev.IO.Params.DICOM_Tags.GetTagString(8, $21));
    if assigned(iev.IO.Params.DICOM_Tags.GetTag(8, $30)) then
      tag.SetTagString($8, $30,iev.IO.Params.DICOM_Tags.GetTagString(8, $30))
    else
      if assigned(iev.IO.Params.DICOM_Tags.GetTag(8, $31)) then
        tag.SetTagString($8, $30,iev.IO.Params.DICOM_Tags.GetTagString(8, $31));
    Children.Add(tag);
    Adataset.IO.Params.DICOM_Tags.AddTag(4, $1220,dvAE,nil,-1, Children);

    Children := TObjectList.Create();
    tag := TIEDicomTags.Create;
    tag.SetTagString($8, $1030, iev.IO.Params.DICOM_Tags.GetTagString($8, $1030));
    tag.SetTagString($20, $D, iev.IO.Params.DICOM_Tags.GetTagString($20, $D));
    if assigned(iev.IO.Params.DICOM_Tags.GetTag($20, $10)) then begin
      ss:=trim(iev.IO.Params.DICOM_Tags.GetTagString($20, $10));
      if ss<>'' then tag.SetTagString($20, $10, ss);
    end;
    Children.Add(tag);
    Adataset.IO.Params.DICOM_Tags.AddTag(8, $50,dvSQ,nil,-1, Children);
    if FStudyReport <> '' then
      Adataset.IO.Params.DICOM_Tags.SetTagString($2813, $0123, FStudyReport);
    PutSeriesToDICOMDIR(ADataset, iev, sfname, i);;
  end
end;
procedure PutPatientToDICOMDIR(ADataset,as1: TImageEnVect; sFileName,FStudyReport:AnsiString);
  function HasDataPat: Integer;
  var
    i: Integer;
    tags: TIEDicomTags;
    tag: PIEDicomTag;
  begin
    Result := -1;
    tag := ADataset.io.Params.DICOM_Tags.GetTag(4, $1220);
    if assigned(tag) then begin
     for i := 0 to tag.Children.Count - 1 do  begin
      tags := (tag.Children[I] as TIEDicomTags);
      if assigned(tags) then
      if (tags.GetTagString($4, $1430) = 'PATIENT') and (tags.GetTagString($10, $10) = as1.io.Params.DICOM_Tags.GetTagString($10,
        $10)) then
      begin
        Result := i;
        exit;
      end;
     end;
    end;
  end;
var
  i: Integer;
  Children : TObjectList;
  subtags : TIEDicomTags;
begin
  i := HasDataPat;
  if i < 0 then  begin
    Children := TObjectList.Create();
    subtags := TIEDicomTags.Create();
    with subtags do begin
     SetTagNumeric($4, $1400, 0);
     SetTagNumeric($4, $1410, 65535);
     SetTagNumeric($4, $1420, 0);
     SetTagString($4, $1430, 'PATIENT');
     SetTagString($10, $10, as1.IO.Params.DICOM_Tags.GetTagString($10, $10));
     SetTagString($10, $20, as1.IO.Params.DICOM_Tags.GetTagString($10, $20));
     SetTagString($10, $30, as1.IO.Params.DICOM_Tags.GetTagString($10, $30));
     SetTagString($10, $40, as1.IO.Params.DICOM_Tags.GetTagString($10, $40));
     if assigned(as1.IO.Params.DICOM_Tags.GetTag($10, $4000)) then
       SetTagString($10, $4000, as1.IO.Params.DICOM_Tags.GetTagString($10, $4000));
    end;
    Children.Add(subtags);
    Adataset.IO.Params.DICOM_Tags.AddTag(4, $1220,dvSQ,nil,-1, Children);
  end;
  PutStudyToDICOMDIR(ADataset, as1, sFileName, FStudyReport, i);
end;


procedure createDicomDir(ar:array of TImageEnVect);
var
  j: Integer;
  ddIm: TImageEnVect;
  dicomdir: TImageEnVect;
  fpathname,fname, BaseDir: string;
begin
  fpathname := ExtractFilePath(Application.ExeName);
  BaseDir := fpathname + 'TEMP\';
  ForceDirectories(BaseDir);
  dicomdir := TImageEnVect.create(self);
  try
    //loop into dicom images to add in dicomdir folder
    for j := low(ar) to High(ar) do begin
         ddIm:=TImageEnVect(ar[j]);
         fname := BaseDir + 'FILE' + IntToStr(j) + '.DCM';
         ddIm.IO.Params.DICOM_Range:=iedrAdjust;
         ddIm.io.SaveToFileDICOM(fname);
         putPatientToDICOMDIR(dicomdir,ddIm,'FILE' + IntToStr(j) + '.DCM','');
        end;
    end;
  finally
    dicomdir.io.SaveToFileDICOM(BaseDir + 'DICOMDIR');
    dicomdir.Free;
  end;
end;
Go to Top of Page

jwest

Brazil
67 Posts

Posted - May 21 2016 :  21:17:52  Show Profile  Reply
With my code posted to generate dicomdir, I am getting:

(0002,0000) File Meta Information Group Length (UL) : "42"
(0002,0001) File Meta Information Version (OB) : ""
(0002,0010) Transfer Syntax UID (UI) : "1.2.840.10008.1.2.1"
(0004,1220) Directory Record Sequence (SQ) : ""
   (0004,1400) Offset of the Next Directory Record (UL) : "0"
   (0004,1410) Record In-use Flag (US) : "65535"
   (0004,1420) Offset of Referenced Lower-Level Directory Entity (UL) : "0"
   (0004,1430) Directory Record Type (CS) : "PATIENT "
   (0010,0010) Patient's Name (PN) : "Doe^John"
   (0010,0020) Patient ID (LO) : "Genesis-1000"
   (0010,0030) Patient's Birth Date (DA) : "19501214"
   (0010,0040) Patient's Sex (CS) : "O "
(0004,1220) Directory Record Sequence (SQ) : ""
   (0004,1400) Offset of the Next Directory Record (UL) : "0"
   (0004,1410) Record In-use Flag (US) : "65535"
   (0004,1420) Offset of Referenced Lower-Level Directory Entity (UL) : "0"
   (0004,1430) Directory Record Type (CS) : "STUDY "
   (0008,0020) Study Date (DA) : "20091214"
   (0008,0030) Study Time (TM) : "160058.0"
   (0008,0050) Accession Number (SH) : "  "
   (0008,1030) Study Description (LO) : "Chest "
   (0020,000D) Study Instance UID (UI) : "1.2.410.200013.1.215.1.200912141600580008"
(0004,1220) Directory Record Sequence (SQ) : ""
   (0004,1400) Offset of the Next Directory Record (UL) : "0"
   (0004,1410) Record In-use Flag (US) : "65535"
   (0004,1420) Offset of Referenced Lower-Level Directory Entity (UL) : "0"
   (0004,1430) Directory Record Type (CS) : "SERIES"
   (0008,0021) Series Date (DA) : "20091214"
   (0008,0031) Series Time (TM) : "160058.0"
   (0008,0060) Modality (CS) : "SC"
   (0020,000D) Study Instance UID (UI) : "1.2.410.200013.1.215.1.200912141600580008"
   (0020,000E) Series Instance UID (UI) : "1.2.410.200013.1.215.1.200912141600580009"
   (0020,0011) Series Number (IS) : "1 "
(0004,1220) Directory Record Sequence (SQ) : ""
   (0004,1400) Offset of the Next Directory Record (UL) : "0"
   (0004,1410) Record In-use Flag (US) : "65535"
   (0004,1420) Offset of Referenced Lower-Level Directory Entity (UL) : "0"
   (0004,1430) Directory Record Type (CS) : "IMAGE "
   (0004,1500) Referenced File ID (CS) : "FILE0.DCM "
   (0008,0023) Content Date (DA) : "20091214"
   (0008,0033) Content Time (TM) : "160058.0"
   (0020,0013) Instance Number (IS) : "1 "
(0008,0016) SOP Class UID (UI) : "1.2.840.10008.5.1.4.1.1.7"
(0028,0002) Samples per Pixel (US) : "3"
(0028,0004) Photometric Interpretation (CS) : "RGB "
(0028,0006) Planar Configuration (US) : "0"
(0028,0008) Number of Frames (IS) : "1 "
(0028,0010) Rows (US) : "0"
(0028,0011) Columns (US) : "0"
(0028,0100) Bits Allocated (US) : "8"
(0028,0101) Bits Stored (US) : "8"
(0028,0103) Pixel Representation (US) : "0"
(0028,2110) Lossy Image Compression (CS) : "00"


but I need soimething as:


0004,1212) File-set Consistency Flag (US) : "0"
(0004,1220) Directory Record Sequence (SQ) : ""
   (0004,1400) Offset of the Next Directory Record (UL) : "0"
   (0004,1410) Record In-use Flag (US) : "65535"
   (0004,1420) Offset of Referenced Lower-Level Directory Entity (UL) : "526"
   (0004,1430) Directory Record Type (CS) : "PATIENT "
   (0010,0010) Patient's Name (PN) : "Doe^John"
   (0010,0020) Patient ID (LO) : "Genesis-1000"
   (0010,0030) Patient's Birth Date (DA) : "19501214"
   (0010,0040) Patient's Sex (CS) : "O "
   (0010,4000) Patient Comments (LT) : ""
   (0004,1400) Offset of the Next Directory Record (UL) : "0"
   (0004,1410) Record In-use Flag (US) : "65535"
   (0004,1420) Offset of Referenced Lower-Level Directory Entity (UL) : "700"
   (0004,1430) Directory Record Type (CS) : "STUDY "
   (0008,0020) Study Date (DA) : "20091214"
   (0008,0030) Study Time (TM) : "160058.000000 "
   (0008,0050) Accession Number (SH) : ""
   (0008,1030) Study Description (LO) : "Chest "
   (0020,000D) Study Instance UID (UI) : "1.2.410.200013.1.215.1.200912141600580008"
   (0020,0010) Study ID (SH) : ""
   (0004,1400) Offset of the Next Directory Record (UL) : "0"
   (0004,1410) Record In-use Flag (US) : "65535"
   (0004,1420) Offset of Referenced Lower-Level Directory Entity (UL) : "930"
   (0004,1430) Directory Record Type (CS) : "SERIES"
   (0008,0021) Series Date (DA) : "20091214"
   (0008,0031) Series Time (TM) : "160058.000000 "
   (0008,0060) Modality (CS) : "SC"
   (0008,103E) Series Description (LO) : ""
   (0020,000D) Study Instance UID (UI) : "1.2.410.200013.1.215.1.200912141600580008"
   (0020,000E) Series Instance UID (UI) : "1.2.410.200013.1.215.1.200912141600580009"
   (0020,0010) Study ID (SH) : ""
   (0020,0011) Series Number (IS) : "1 "
   (0004,1400) Offset of the Next Directory Record (UL) : "0"
   (0004,1410) Record In-use Flag (US) : "65535"
   (0004,1420) Offset of Referenced Lower-Level Directory Entity (UL) : "0"
   (0004,1430) Directory Record Type (CS) : "IMAGE "
   (0004,1500) Referenced File ID (CS) : "FILE0 "
   (0008,0008) Image Type (CS) : ""
   (0008,0023) Content Date (DA) : "20091214"
   (0008,0033) Content Time (TM) : "160058.000000 "
   (0020,0013) Instance Number (IS) : "1 "
   (0088,0200) Icon Image Sequence (SQ) : ""
      (0028,0002) Samples per Pixel (US) : "1"
      (0028,0004) Photometric Interpretation (CS) : "MONOCHROME2 "
      (0028,0010) Rows (US) : "128"
      (0028,0011) Columns (US) : "128"
      (0028,0100) Bits Allocated (US) : "8"
      (0028,0101) Bits Stored (US) : "8"
      (0028,0102) High Bit (US) : "7"
      (7FE0,0010) Pixel Data (OW) : "џСгМХЖЛЫЧвЯжиаЩнрнклхтычхџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ"
(FFFC,FFFC) Data Set Trailing Padding (OB) : ""

Go to Top of Page

xequte

38944 Posts

Posted - May 23 2016 :  18:49:12  Show Profile  Reply
Hi

When you say the created file is invalid, do you mean that it does not load into ImageEn/Viewers, or that the meta-data structure is not as you require?

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

jwest

Brazil
67 Posts

Posted - May 23 2016 :  19:44:58  Show Profile  Reply
Nigel, ItДs not a dicom image file.

ItДs a DICOMDIR what I require and Yes, itДs invalid. To DICOMDIR spec I was looking at http://dicom.nema.org/dicom/2013/output/chtml/part10/chapter_A.html

But, DICOMDIR is a dicom file type to distribute dicom images in a CD for example to be read for other peoples. The CD also includes a dicom image reader application as well.

Wih my code, I finished with a dicom file(DICOMDIR) with many (0004,1220) Directory Record Sequence (SQ) : "" to the same image. ItДs wrong.
This is the reason because I need your help.

I have a dicom image file and I am trying to create a DICOMDIR with it.
Here is what I did, in the code posted before :

First I add the tags in this order: Header, Patient tags, Study tags, Serie and Image tags.

The tags used to put into new DICOMDIR file are searched and copied from original dicom image file.

But, How you can see, I finish having many (0004,1220) tags.

With my code posted I have(wrong):
dicom header
....
(0004,1220)
Patient tags
(0004,1220)
Study tags
(0004,1220)
Serie tags
(0004,1220)
Image tags

Then, can you help me in:

1. Modify the code posted to create a DICOMDIR(or dicom file) file with this format:
dicom header
....
(0004,1220)
Patient tags
Study tags
Serie tags
Image tags

I have posted the tags created before.
The app dcmdir from dcmcache app create the DICOMDIR file correctly, as posted.

I need help to adjust my code to conform with file created for dcmdir. It doesnДt need to be exactly the same, only the structure needs to be similares and according to dicom standard.

2. Other question:
if you observe in my code, I have used TimageEnVect to create a DICOMDIR file from scratch, filling the tags manually, searching and copying the tags needed from original dicom image file. I am not sure if itДs correct.
If not, how do I could create a dicomdir(or dicom file) from scratch filling the tags manually? Could you post a sample?

I have read about dicom but I have no many skills with it.
Go to Top of Page

xequte

38944 Posts

Posted - May 24 2016 :  17:13:43  Show Profile  Reply
Hi

We don't yet support DicomDir. We'll investigate the practicality of implementing it.


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

jwest

Brazil
67 Posts

Posted - Jun 06 2016 :  19:06:30  Show Profile  Reply
Ok, Thank you
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: