DICOMDIR Transfer Syntax
Moderator: Moderator Team
DICOMDIR Transfer Syntax
Hi,
The Transfer Syntax UID in the DICOMDIR differs from the Transfer Syntax of the Image on Medium.
For EG:
(0004,1512) UI =JPEGLossless:Non-hierarchical-1stOrderPrediction # 22, 1 ReferencedTransferSyntaxUIDInFile
(0002,0010) UI =LittleEndianExplicit # 20, 1 TransferSyntaxUID
How can i create a DICOMDIR with same transfer syntax.
Please help
The Transfer Syntax UID in the DICOMDIR differs from the Transfer Syntax of the Image on Medium.
For EG:
(0004,1512) UI =JPEGLossless:Non-hierarchical-1stOrderPrediction # 22, 1 ReferencedTransferSyntaxUIDInFile
(0002,0010) UI =LittleEndianExplicit # 20, 1 TransferSyntaxUID
How can i create a DICOMDIR with same transfer syntax.
Please help
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
Hi jorg,
I am using following code to create a DICOM DIR, other than that i am not doing anything. Please find the below code.
//Create New DicomDirInterface
_Dcmdicomdirinterface=new DicomDirInterface();
//Set Some Image Support
_Dcmdicomdirinterface->addImageSupport(&_Dcmimageplugin);
_Dcmdicomdirinterface->enableAbortMode(OFFalse);
//If NewDicomDir is True
if(_DcmNewDicomDir)
{
//Create NewDicomDir with current Application Profile
_DcmStatus = _Dcmdicomdirinterface->createNewDicomDir( _DcmApplicationProfile,ConvertBSTRToChar(_DcmDicomDirFilePath)+"DICOMDIR",DEFAULT_FILESETID);
}
else
{
//Append To Existing DicomDir with updated Application Profile
_DcmStatus = _Dcmdicomdirinterface->appendToDicomDir( _DcmApplicationProfile ,ConvertBSTRToChar(_DcmDicomDirFilePath)+"DICOMDIR");
}
//Set DicomDirInterface Properties
_Dcmdicomdirinterface->setFilesetDescriptor("DICOMDIR");
_Dcmdicomdirinterface->disableBackupMode();
_Dcmdicomdirinterface->disableConsistencyCheck();
_Dcmdicomdirinterface->enableMapFilenamesMode(OFFalse);
_Dcmdicomdirinterface->enableIconImageMode();
_Dcmdicomdirinterface->disableEncodingCheck();
_Dcmdicomdirinterface->disableResolutionCheck();
_Dcmdicomdirinterface->disableTransferSyntaxCheck();
_Dcmdicomdirinterface->setIconSize(ICONIMAGESIZE);
_Dcmdicomdirinterface->setLogStream(&(OFConsole::instance()));
//Add the DicomFile
_DcmStatus = _Dcmdicomdirinterface->addDicomFile((const char*)DicomFilePath,ConvertBSTRToChar(_DcmDicomDirFilePath));
if (_DcmStatus.bad())
{
DeleteSelectedFile = ConvertBSTRToChar(_DcmDicomDirFilePath)+"\\"+DicomFilePath;
DeleteFile((LPCTSTR) DeleteSelectedFile);
_DcmErrorCode=DXSDCC_ADDDICOMFILE_ERROR;
_DcmErrorString=_DcmStatus.text();
return FALSE;
}
//Write DICOMDIR
_DcmStatus = _Dcmdicomdirinterface->writeDicomDir(EET_ExplicitLength, EGL_withoutGL);
if (_DcmStatus.bad())
{
DeleteSelectedFile = ConvertBSTRToChar(_DcmDicomDirFilePath)+"\\"+DicomFilePath;
DeleteFile((LPCTSTR) DeleteSelectedFile);
_DcmErrorCode=DXSDCC_WRITEDICOMDIR_ERROR;
_DcmErrorString=_DcmStatus.text();
return FALSE;
}
//Delete DicomDirInterface
if(_Dcmdicomdirinterface!=NULL)
{
_Dcmdicomdirinterface->cleanup();
///*delete _Dcmdicomdirinterface;*/
_Dcmdicomdirinterface=NULL;
}
Please help
I am using following code to create a DICOM DIR, other than that i am not doing anything. Please find the below code.
//Create New DicomDirInterface
_Dcmdicomdirinterface=new DicomDirInterface();
//Set Some Image Support
_Dcmdicomdirinterface->addImageSupport(&_Dcmimageplugin);
_Dcmdicomdirinterface->enableAbortMode(OFFalse);
//If NewDicomDir is True
if(_DcmNewDicomDir)
{
//Create NewDicomDir with current Application Profile
_DcmStatus = _Dcmdicomdirinterface->createNewDicomDir( _DcmApplicationProfile,ConvertBSTRToChar(_DcmDicomDirFilePath)+"DICOMDIR",DEFAULT_FILESETID);
}
else
{
//Append To Existing DicomDir with updated Application Profile
_DcmStatus = _Dcmdicomdirinterface->appendToDicomDir( _DcmApplicationProfile ,ConvertBSTRToChar(_DcmDicomDirFilePath)+"DICOMDIR");
}
//Set DicomDirInterface Properties
_Dcmdicomdirinterface->setFilesetDescriptor("DICOMDIR");
_Dcmdicomdirinterface->disableBackupMode();
_Dcmdicomdirinterface->disableConsistencyCheck();
_Dcmdicomdirinterface->enableMapFilenamesMode(OFFalse);
_Dcmdicomdirinterface->enableIconImageMode();
_Dcmdicomdirinterface->disableEncodingCheck();
_Dcmdicomdirinterface->disableResolutionCheck();
_Dcmdicomdirinterface->disableTransferSyntaxCheck();
_Dcmdicomdirinterface->setIconSize(ICONIMAGESIZE);
_Dcmdicomdirinterface->setLogStream(&(OFConsole::instance()));
//Add the DicomFile
_DcmStatus = _Dcmdicomdirinterface->addDicomFile((const char*)DicomFilePath,ConvertBSTRToChar(_DcmDicomDirFilePath));
if (_DcmStatus.bad())
{
DeleteSelectedFile = ConvertBSTRToChar(_DcmDicomDirFilePath)+"\\"+DicomFilePath;
DeleteFile((LPCTSTR) DeleteSelectedFile);
_DcmErrorCode=DXSDCC_ADDDICOMFILE_ERROR;
_DcmErrorString=_DcmStatus.text();
return FALSE;
}
//Write DICOMDIR
_DcmStatus = _Dcmdicomdirinterface->writeDicomDir(EET_ExplicitLength, EGL_withoutGL);
if (_DcmStatus.bad())
{
DeleteSelectedFile = ConvertBSTRToChar(_DcmDicomDirFilePath)+"\\"+DicomFilePath;
DeleteFile((LPCTSTR) DeleteSelectedFile);
_DcmErrorCode=DXSDCC_WRITEDICOMDIR_ERROR;
_DcmErrorString=_DcmStatus.text();
return FALSE;
}
//Delete DicomDirInterface
if(_Dcmdicomdirinterface!=NULL)
{
_Dcmdicomdirinterface->cleanup();
///*delete _Dcmdicomdirinterface;*/
_Dcmdicomdirinterface=NULL;
}
Please help
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
First of all, you should not use disableEncodingCheck(), disableResolutionCheck(), disableTransferSyntaxCheck() and the like because this might create invalid (non standard conformant) DICOMDIR files.
The DICOMDIR file always has to be written with this transfer syntax (according to the application profiles defined in the standard).When i checked Write DICOMDIR Function, it is internally taking DICOMDIR_DEFAULT_TRANSFERSYNTAX = EXS_LittleEndianExplicit; Can you please help us
Hi Jorg,
I removed the disable functionalities as follows:
//Set DicomDirInterface Properties
_Dcmdicomdirinterface->setFilesetDescriptor("DICOMDIR");
//_Dcmdicomdirinterface->disableBackupMode();
//_Dcmdicomdirinterface->disableConsistencyCheck();
_Dcmdicomdirinterface->enableMapFilenamesMode(OFFalse);
_Dcmdicomdirinterface->enableIconImageMode();
//_Dcmdicomdirinterface->disableEncodingCheck();
//_Dcmdicomdirinterface->disableResolutionCheck();
//_Dcmdicomdirinterface->disableTransferSyntaxCheck();
_Dcmdicomdirinterface->setIconSize(ICONIMAGESIZE);
_Dcmdicomdirinterface->setLogStream(&(OFConsole::instance()));
after doing above changes also there is difference in Transfer syntaxes.
Please help
I removed the disable functionalities as follows:
//Set DicomDirInterface Properties
_Dcmdicomdirinterface->setFilesetDescriptor("DICOMDIR");
//_Dcmdicomdirinterface->disableBackupMode();
//_Dcmdicomdirinterface->disableConsistencyCheck();
_Dcmdicomdirinterface->enableMapFilenamesMode(OFFalse);
_Dcmdicomdirinterface->enableIconImageMode();
//_Dcmdicomdirinterface->disableEncodingCheck();
//_Dcmdicomdirinterface->disableResolutionCheck();
//_Dcmdicomdirinterface->disableTransferSyntaxCheck();
_Dcmdicomdirinterface->setIconSize(ICONIMAGESIZE);
_Dcmdicomdirinterface->setLogStream(&(OFConsole::instance()));
after doing above changes also there is difference in Transfer syntaxes.
Please help
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
I created a DICOMDIR with dcmmkdir 3.6.0 in the same way as described on your previous posting. Here's the result:
... which looks ok to me.
Code: Select all
# Dicom-File-Format
# Dicom-Meta-Information-Header
# Used TransferSyntax: Little Endian Explicit
(0002,0000) UL 196 # 4, 1 FileMetaInformationGroupLength
(0002,0001) OB 00\01 # 2, 1 FileMetaInformationVersion
(0002,0002) UI =MediaStorageDirectoryStorage # 20, 1 MediaStorageSOPClassUID
(0002,0003) UI [1.2.276.0.7230010.3.1.4.1787205428.12771.1294762622.249374] # 58, 1 MediaStorageSOPInstanceUID
(0002,0010) UI =LittleEndianExplicit # 20, 1 TransferSyntaxUID
(0002,0012) UI [1.2.276.0.7230010.3.0.3.6.0] # 28, 1 ImplementationClassUID
(0002,0013) SH [OFFIS_DCMTK_360] # 16, 1 ImplementationVersionName
# Dicom-Data-Set
# Used TransferSyntax: Little Endian Explicit
(0004,1130) CS [DCMTK_MEDIA_DEMO] # 16, 1 FileSetID
(0004,1200) up 410 # 4, 1 OffsetOfTheFirstDirectoryRecordOfTheRootDirectoryEntity
(0004,1202) up 410 # 4, 1 OffsetOfTheLastDirectoryRecordOfTheRootDirectoryEntity
(0004,1212) US 0 # 2, 1 FileSetConsistencyFlag
(0004,1220) SQ (Sequence with explicit length #=5) # 34046, 1 DirectoryRecordSequence
(fffe,e000) na "Directory Record" PATIENT #=9 # 120, 1 Item
# offset=$410
(0004,1400) up 0 # 4, 1 OffsetOfTheNextDirectoryRecord
(0004,1410) US 65535 # 2, 1 RecordInUseFlag
(0004,1420) up 538 # 4, 1 OffsetOfReferencedLowerLevelDirectoryEntity
(0004,1430) CS [PATIENT] # 8, 1 DirectoryRecordType
(0008,0005) CS [ISO_IR 100] # 10, 1 SpecificCharacterSet
(0010,0010) PN [df df||] # 8, 1 PatientName
(0010,0020) LO [E] # 2, 1 PatientID
(0010,0030) DA [20101221] # 8, 1 PatientBirthDate
(0010,0040) CS [M] # 2, 1 PatientSex
(fffe,e00d) na "ItemDelimitationItem for re-encoding" # 0, 0 ItemDelimitationItem
(fffe,e000) na "Directory Record" STUDY #=11 # 176, 1 Item
# offset=$538
(0004,1400) up 0 # 4, 1 OffsetOfTheNextDirectoryRecord
(0004,1410) US 65535 # 2, 1 RecordInUseFlag
(0004,1420) up 722 # 4, 1 OffsetOfReferencedLowerLevelDirectoryEntity
(0004,1430) CS [STUDY] # 6, 1 DirectoryRecordType
(0008,0005) CS [ISO_IR 100] # 10, 1 SpecificCharacterSet
(0008,0020) DA [20101221] # 8, 1 StudyDate
(0008,0030) TM [1237] # 4, 1 StudyTime
(0008,0050) SH [1] # 2, 1 AccessionNumber
(0008,1030) LO (no value available) # 0, 0 StudyDescription
(0020,000d) UI [1.2.756.777.20100805.20101221123749.77] # 38, 1 StudyInstanceUID
(0020,0010) SH [STUDY_002] # 10, 1 StudyID
(fffe,e00d) na "ItemDelimitationItem for re-encoding" # 0, 0 ItemDelimitationItem
(fffe,e000) na "Directory Record" SERIES #=10 # 212, 1 Item
# offset=$722
(0004,1400) up 0 # 4, 1 OffsetOfTheNextDirectoryRecord
(0004,1410) US 65535 # 2, 1 RecordInUseFlag
(0004,1420) up 942 # 4, 1 OffsetOfReferencedLowerLevelDirectoryEntity
(0004,1430) CS [SERIES] # 6, 1 DirectoryRecordType
(0008,0005) CS [ISO_IR 100] # 10, 1 SpecificCharacterSet
(0008,0060) CS [XA] # 2, 1 Modality
(0008,0080) LO [DUMMY HOSPITAL1] # 16, 1 InstitutionName
(0008,0081) ST [Philips-Alpha Campus, Panvel, Maharashtra] # 42, 1 InstitutionAddress
(0020,000e) UI [1.2.756.777.20100805.20101221123749.88] # 38, 1 SeriesInstanceUID
(0020,0011) IS [21121237] # 8, 1 SeriesNumber
(fffe,e00d) na "ItemDelimitationItem for re-encoding" # 0, 0 ItemDelimitationItem
(fffe,e000) na "Directory Record" IMAGE #=15 # 16748, 1 Item
# offset=$942 refFileID="PAT_1\IMG_1"
(0004,1400) up 17698 # 4, 1 OffsetOfTheNextDirectoryRecord
(0004,1410) US 65535 # 2, 1 RecordInUseFlag
(0004,1420) up 0 # 4, 1 OffsetOfReferencedLowerLevelDirectoryEntity
(0004,1430) CS [IMAGE] # 6, 1 DirectoryRecordType
(0004,1500) CS [PAT_1\IMG_1] # 12, 2 ReferencedFileID
(0004,1510) UI =XRayAngiographicImageStorage # 28, 1 ReferencedSOPClassUIDInFile
(0004,1511) UI [1.2.756.777.20100805.20101221123828] # 36, 1 ReferencedSOPInstanceUIDInFile
(0004,1512) UI =JPEGLossless:Non-hierarchical-1stOrderPrediction # 22, 1 ReferencedTransferSyntaxUIDInFile
(0008,0008) CS [NORMAL] # 6, 1 ImageType
(0020,0013) IS [1] # 2, 1 InstanceNumber
(0028,0008) IS [5] # 2, 1 NumberOfFrames
(0028,0010) US 1000 # 2, 1 Rows
(0028,0011) US 1000 # 2, 1 Columns
(0028,0030) DS [1] # 2, 1 PixelSpacing
(0088,0200) SQ (Sequence with explicit length #=1) # 16494, 1 IconImageSequence
(fffe,e000) na (Item with explicit length #=9) # 16486, 1 Item
(0028,0002) US 1 # 2, 1 SamplesPerPixel
(0028,0004) CS [MONOCHROME2] # 12, 1 PhotometricInterpretation
(0028,0010) US 128 # 2, 1 Rows
(0028,0011) US 128 # 2, 1 Columns
(0028,0100) US 8 # 2, 1 BitsAllocated
(0028,0101) US 8 # 2, 1 BitsStored
(0028,0102) US 7 # 2, 1 HighBit
(0028,0103) US 0 # 2, 1 PixelRepresentation
(7fe0,0010) OB 00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00... # 16384, 1 PixelData
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(fffe,e00d) na "ItemDelimitationItem for re-encoding" # 0, 0 ItemDelimitationItem
(fffe,e000) na "Directory Record" IMAGE #=15 # 16750, 1 Item
# offset=$17698 refFileID="PAT_1\IMG_002"
(0004,1400) up 0 # 4, 1 OffsetOfTheNextDirectoryRecord
(0004,1410) US 65535 # 2, 1 RecordInUseFlag
(0004,1420) up 0 # 4, 1 OffsetOfReferencedLowerLevelDirectoryEntity
(0004,1430) CS [IMAGE] # 6, 1 DirectoryRecordType
(0004,1500) CS [PAT_1\IMG_002] # 14, 2 ReferencedFileID
(0004,1510) UI =XRayAngiographicImageStorage # 28, 1 ReferencedSOPClassUIDInFile
(0004,1511) UI [1.2.756.777.20100805.20110106192749] # 36, 1 ReferencedSOPInstanceUIDInFile
(0004,1512) UI =JPEGLossless:Non-hierarchical-1stOrderPrediction # 22, 1 ReferencedTransferSyntaxUIDInFile
(0008,0008) CS [NORMAL] # 6, 1 ImageType
(0020,0013) IS [1] # 2, 1 InstanceNumber
(0028,0008) IS [1] # 2, 1 NumberOfFrames
(0028,0010) US 1000 # 2, 1 Rows
(0028,0011) US 1000 # 2, 1 Columns
(0028,0030) DS [1] # 2, 1 PixelSpacing
(0088,0200) SQ (Sequence with explicit length #=1) # 16494, 1 IconImageSequence
(fffe,e000) na (Item with explicit length #=9) # 16486, 1 Item
(0028,0002) US 1 # 2, 1 SamplesPerPixel
(0028,0004) CS [MONOCHROME2] # 12, 1 PhotometricInterpretation
(0028,0010) US 128 # 2, 1 Rows
(0028,0011) US 128 # 2, 1 Columns
(0028,0100) US 8 # 2, 1 BitsAllocated
(0028,0101) US 8 # 2, 1 BitsStored
(0028,0102) US 7 # 2, 1 HighBit
(0028,0103) US 0 # 2, 1 PixelRepresentation
(7fe0,0010) OB 00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00... # 16384, 1 PixelData
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(fffe,e00d) na "ItemDelimitationItem for re-encoding" # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
Hi Jorg,
I want
# Dicom-Meta-Information-Header
# Used TransferSyntax: Little Endian Explicit
(0002,0010) UI =LittleEndianExplicit # 20, 1 TransferSyntaxUID
and
(0004,1512) UI =JPEGLossless:Non-hierarchical-1stOrderPrediction # 22, 1 ReferencedTransferSyntaxUIDInFile
this to be same, how can i do this.
Help me
I want
# Dicom-Meta-Information-Header
# Used TransferSyntax: Little Endian Explicit
(0002,0010) UI =LittleEndianExplicit # 20, 1 TransferSyntaxUID
and
(0004,1512) UI =JPEGLossless:Non-hierarchical-1stOrderPrediction # 22, 1 ReferencedTransferSyntaxUIDInFile
this to be same, how can i do this.
Help me
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
Who is online
Users browsing this forum: Bing [Bot], Google [Bot], Semrush [Bot] and 1 guest