using System;
public class NewSequence
{
public static byte[] StrToByteArray(string str)
{
System.Text.ASCIIEncoding encoding=new System.Text.ASCIIEncoding();
return encoding.GetBytes(str);
}
public static int Main(string[] argv)
{
string file1 = argv[0];
string file2 = argv[1];
r.SetFileName( file1 );
if ( ! r.Read() )
{
return 1;
}
string occ = "Occupation";
de.SetByteValue( StrToByteArray(occ),
new gdcm.VL((uint)occ.Length));
de.SetVR(
new gdcm.VR(gdcm.VR.VRType.SH));
it.SetVLToUndefined();
nds.Insert(de);
gdcm.SmartPtrSQ sq = gdcm.SequenceOfItems.New();
sq.SetLengthToUndefined();
sq.AddItem(it);
des.SetVR(
new gdcm.VR(gdcm.VR.VRType.SQ));
des.SetValue(sq.__ref__());
des.SetVLToUndefined();
ds.Insert(des);
w.SetFile( f );
w.SetFileName( file2 );
if ( !w.Write() )
return 1;
return 0;
}
}