Program: gdcm
Module: $RCSfile: gdcmCommon.h,v $
Language: C++
- Date: $Date: 2006/05/31 16:02:32 $
- Version: $Revision: 1.111 $
+ Date: $Date: 2006/07/06 12:38:05 $
+ Version: $Revision: 1.112 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
{
// Centralize information about the gdcm dictionary in only one file:
+//
+// ==>
+// ==> Don't forget gdcm/gdcmPython/gdcm.i
+// ==>
+//
+
#ifndef PUB_DICT_PATH
# define PUB_DICT_PATH "../Dicts/"
#endif
ACR_LIBIDO,
/// \todo FIXME : an encapsulated JPEG file may be
/// either ExplicitVR or ImplicitVR, right?
- JPEG
+ JPEG,
+ JPEG2000
};
/// \brief type of the elements composing a DICOMDIR (for internal use only)
Program: gdcm
Module: $RCSfile: gdcmDocEntry.cxx,v $
Language: C++
- Date: $Date: 2006/07/04 07:58:50 $
- Version: $Revision: 1.84 $
+ Date: $Date: 2006/07/06 12:38:06 $
+ Version: $Revision: 1.85 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
binary_write( *fp, elem); //element number
// Dicom V3 group 0x0002 is *always* Explicit VR !
- if ( filetype == ExplicitVR || filetype == JPEG || group == 0x0002 )
+ if ( filetype == ExplicitVR || filetype == JPEG || filetype == JPEG2000 || group == 0x0002 )
{
// ----------- Writes the common part : the VR + the length
|| (vr == "UN") || (vr == "UT") )
{
binary_write(*fp, zero);
- if (filetype == JPEG && GetGroup() == 0x7fe0 && GetElement() == 0x0010)
+ if ( (filetype == JPEG || filetype == JPEG2000) && group == 0x7fe0 && elem == 0x0010)
{
gdcmAssertMacro( GetVR() == "OW" );
binary_write(*fp, ffff);
Program: gdcm
Module: $RCSfile: gdcmDocument.cxx,v $
Language: C++
- Date: $Date: 2006/06/21 14:06:56 $
- Version: $Revision: 1.351 $
+ Date: $Date: 2006/07/06 12:38:06 $
+ Version: $Revision: 1.352 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
// Skip if user wants to write an ACR-NEMA file
if ( filetype == ImplicitVR || filetype == ExplicitVR ||
- filetype == JPEG )
+ filetype == JPEG || filetype == JPEG2000 )
{
// writing Dicom File Preamble
char filePreamble[128];
Module: $RCSfile: gdcmFileHelper.cxx,v $
Language: C++
- Date: $Date: 2006/07/04 09:51:11 $
- Version: $Revision: 1.107 $
+ Date: $Date: 2006/07/06 12:38:06 $
+ Version: $Revision: 1.108 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
case JPEG:
SetWriteFileTypeToJPEG();
break;
+
+ case JPEG2000:
+ SetWriteFileTypeToJPEG2000();
+ break;
}
-
+
// --------------------------------------------------------------
// Special Patch to allow gdcm to re-write ACR-LibIDO formated images
//
}
bool check = CheckWriteIntegrity(); // verifies length
- if (WriteType == JPEG ) check = true;
+ if (WriteType == JPEG || WriteType == JPEG2000) check = true;
if (check)
{
check = FileInternal->Write(fileName,WriteType);
if ( FileInternal->GetBitsAllocated()==24 ) // For RGB ACR files
vr = "OB";
// For non RAW data. Mainly JPEG
- if( WriteType == JPEG )
+ if( WriteType == JPEG || WriteType == JPEG2000)
{
vr = "OW";
}
Archive->Push(0x0002,0x0102);
}
+ /**
+ * \brief Sets in the File the TransferSyntax to 'JPEG2000'
+ */
+void FileHelper::SetWriteFileTypeToJPEG2000()
+{
+ std::string ts = Util::DicomString(
+ Global::GetTS()->GetSpecialTransferSyntax(TS::JPEG2000Lossless) );
+
+ DataEntry *tss = CopyDataEntry(0x0002,0x0010,"UI");
+ tss->SetString(ts);
+
+ Archive->Push(tss);
+ tss->Delete();
+}
+
/**
* \brief Sets in the File the TransferSyntax to 'JPEG'
*/
Program: gdcm
Module: $RCSfile: gdcmFileHelper.h,v $
Language: C++
- Date: $Date: 2006/05/30 08:14:50 $
- Version: $Revision: 1.45 $
+ Date: $Date: 2006/07/06 12:38:06 $
+ Version: $Revision: 1.46 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
void SetWriteTypeToAcrLibido() { SetWriteType(ACR_LIBIDO); }
/// \brief Tells the writer we want to write as JPEG
void SetWriteTypeToJPEG() { SetWriteType(JPEG); }
+ /// \brief Tells the writer we want to write as JPEG2000
+ void SetWriteTypeToJPEG2000() { SetWriteType(JPEG2000); }
/// \brief Tells the writer which format we want to write
/// (ImplicitVR, ExplicitVR, ACR, ACR_LIBIDO)
void SetWriteType(FileType format) { WriteType = format; }
void SetWriteFileTypeToACR();
void SetWriteFileTypeToJPEG();
+ void SetWriteFileTypeToJPEG2000();
void SetWriteFileTypeToExplicitVR();
void SetWriteFileTypeToImplicitVR();
void RestoreWriteFileType();