#include "gdcmTagKeywords.h"
int main(int argc, char *argv[])
{
if( argc < 2 ) return 1;
const char * filename = argv[1];
std::cout << b3 << std::endl;
std::cout << img << std::endl;
namespace kwd = gdcm::Keywords;
kwd::FrameOfReferenceUID frameref;
char date[22];
const size_t datelen = 8;
(void)res;
kwd::ContentDate contentdate;
ds.
Insert( contentdate.GetAsDataElement() );
const size_t timelen = 6 + 1 + 6;
kwd::ContentTime contenttime;
contenttime.SetValue(
gdcm::TMComp(date+datelen, timelen) );
ds.
Insert( contenttime.GetAsDataElement() );
std::cout << ms0 << std::endl;
kwd::SeriesNumber seriesnumber = { 1 };
kwd::InstanceNumber instancenum = { 1 };
kwd::StudyID studyid = { "St1" };
kwd::PatientID patientid = { "P1" };
kwd::SOPClassUID sopclassuid;
kwd::PositionReferenceIndicator pri;
kwd::BodyPartExamined bodypartex = { "ANKLE" };
kwd::PatientOrientation pator;
kwd::BurnedInAnnotation bia = { "NO" };
kwd::ConversionType convtype = { "SYN" };
kwd::PresentationLUTShape plutshape = { "IDENTITY" };
ds.
Insert( instancenum.GetAsDataElement() );
ds.
Insert( sopclassuid.GetAsDataElement() );
ds.
Insert( seriesnumber.GetAsDataElement() );
ds.
Insert( patientid.GetAsDataElement() );
ds.
Insert( studyid.GetAsDataElement() );
ds.
Insert( frameref.GetAsDataElement() );
ds.
Insert( pri.GetAsDataElement() );
ds.
Insert( bodypartex.GetAsDataElement() );
ds.
Insert( pator.GetAsDataElement() );
ds.
Insert( bia.GetAsDataElement() );
ds.
Insert( convtype.GetAsDataElement() );
ds.
Insert( plutshape.GetAsDataElement() );
std::cout << ds << std::endl;
{
return 1;
}
return 0;
}
const PixelFormat & GetPixelFormat() const
Get/Set PixelFormat.
Definition gdcmBitmap.h:107
Class to represent a Data Set (which contains Data Elements)
Definition gdcmDataSet.h:56
void Insert(const DataElement &de)
Definition gdcmDataSet.h:128
a DICOM File
Definition gdcmFile.h:34
const DataSet & GetDataSet() const
Get Data Set.
Definition gdcmFile.h:57
const Image & GetImage() const
Return the read image.
ImageRegionReader.
Definition gdcmImageRegionReader.h:35
ImageWriter.
Definition gdcmImageWriter.h:33
MediaStorage ComputeTargetMediaStorage()
bool Write() override
Write.
Image.
Definition gdcmImage.h:47
void SetSlope(double slope)
slope
Definition gdcmImage.h:92
void SetIntercept(double intercept)
intercept
Definition gdcmImage.h:88
virtual void SetImage(Pixmap const &img)
void SetFileName(const char *filename_native)
String.
Definition gdcmString.h:32
static bool GetCurrentDateTime(char date[22])
Class for generating unique UID.
Definition gdcmUIDGenerator.h:28
File & GetFile()
Definition gdcmWriter.h:67
void SetFileName(const char *filename_native)
Set the filename of DICOM file to write: