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'
*/