The contributors are
<UL>
<LI> Hugues Benoit-Cattin
-</LI>
<LI> Fabrice Bellet
-</LI>
<LI> Jean-Michel Rouet
-</LI>
<LI> Peter Cech
-</LI>
+<LI> Edouardo Davila
</UL>
<!####################################>
Program: gdcm
Module: $RCSfile: FindTags.cxx,v $
Language: C++
- Date: $Date: 2005/01/08 15:03:57 $
- Version: $Revision: 1.8 $
+ Date: $Date: 2005/01/20 16:16:58 $
+ Version: $Revision: 1.9 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
-#include "gdcmFile.h"
+#include "gdcmFileHelper.h"
#include "gdcmHeader.h"
#include "gdcmUtil.h"
{
std::string toto, titi;
- gdcm::File * f1;
+ gdcm::FileHelper *f1;
if(argc > 1 )
- f1 = new gdcm::File(argv[1]);
+ f1 = new gdcm::FileHelper(argv[1]);
else {
toto = GDCM_DATA_ROOT;
toto += "/test.acr";
- f1 = new gdcm::File(toto);
+ f1 = new gdcm::FileHelper(toto);
}
std::string ManufacturerName="SIEMENS ";
Program: gdcm
Module: $RCSfile: PrintFile.cxx,v $
Language: C++
- Date: $Date: 2005/01/19 15:26:42 $
- Version: $Revision: 1.22 $
+ Date: $Date: 2005/01/20 16:16:58 $
+ Version: $Revision: 1.23 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
=========================================================================*/
#include "gdcmHeader.h"
#include "gdcmDebug.h"
-#include "gdcmFile.h"
+#include "gdcmFileHelper.h"
#include <iostream>
int main(int argc, char* argv[])
{
gdcm::Header *e1;
- gdcm::File *f1;
+ gdcm::FileHelper *f1;
std::string fileName;
if (argc != 2)
{
gdcm::Debug::SetDebugOn();
e1= new gdcm::Header( fileName.c_str() );
- f1 = new gdcm::File(e1);
+ f1 = new gdcm::FileHelper(e1);
if (argc > 2)
{
Program: gdcm
Module: $RCSfile: TestChangeHeader.cxx,v $
Language: C++
- Date: $Date: 2005/01/08 15:03:57 $
- Version: $Revision: 1.6 $
+ Date: $Date: 2005/01/20 16:16:58 $
+ Version: $Revision: 1.7 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
=========================================================================*/
#include "gdcmHeader.h"
-#include "gdcmFile.h"
+#include "gdcmFileHelper.h"
// This examples read two images (could be the same). Try to modify
// Acquisition Matrix and then write the image again
}
gdcm::Header *h1 = new gdcm::Header( argv[1] );
- gdcm::File *f1 = new gdcm::File( h1 );
- gdcm::File *f2 = new gdcm::File( argv[2] );
+ gdcm::FileHelper *f1 = new gdcm::FileHelper( h1 );
+ gdcm::FileHelper *f2 = new gdcm::FileHelper( argv[2] );
// 0018 1310 US ACQ Acquisition Matrix
gdcm::DictEntry *dictEntry =
Program: gdcm
Module: $RCSfile: TestCopyDicom.cxx,v $
Language: C++
- Date: $Date: 2005/01/18 07:55:16 $
- Version: $Revision: 1.17 $
+ Date: $Date: 2005/01/20 16:16:58 $
+ Version: $Revision: 1.18 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
return 1;
}
}
- gdcm::File *original = new gdcm::File( filename );
+ gdcm::FileHelper *original = new gdcm::FileHelper( filename );
std::cout << "--- Original ----------------------" << std::endl;
//original->GetHeader()->Print();
- gdcm::File *copy = new gdcm::File( output );
+ gdcm::FileHelper *copy = new gdcm::FileHelper( output );
size_t dataSize = original->GetImageDataSize();
uint8_t* imageData = original->GetImageData();
Program: gdcm
Module: $RCSfile: TestDcm2Acr.cxx,v $
Language: C++
- Date: $Date: 2004/12/03 20:16:55 $
- Version: $Revision: 1.5 $
+ Date: $Date: 2005/01/20 16:16:58 $
+ Version: $Revision: 1.6 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
std::string toto;
std::string zozo;
- gdcm::File * f1;
+ gdcm::FileHelper * f1;
- std::cout << " Before gdcmFile()" << std::endl;
+ std::cout << " Before gdcmFileHelper()" << std::endl;
std::cout << "\n\n---------------------------------------" << std::endl;
if (argc > 1)
{
toto = argv[1];
- f1 = new gdcm::File(toto);
+ f1 = new gdcm::FileHelper(toto);
}
else
{
std::string filename = GDCM_DATA_ROOT;
filename += "/test.acr";
- f1 = new gdcm::File(filename);
+ f1 = new gdcm::FileHelper(filename);
}
- std::cout << " Sortie gdcmFile()" << std::endl;
+ std::cout << " Sortie gdcmFileHelper()" << std::endl;
//e1.PrintPubDict(std::cout);
f1->GetHeader()->Print();
Program: gdcm
Module: $RCSfile: TestFromScratch.cxx,v $
Language: C++
- Date: $Date: 2005/01/18 07:55:16 $
- Version: $Revision: 1.9 $
+ Date: $Date: 2005/01/20 16:16:58 $
+ Version: $Revision: 1.10 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
//gdcm::Debug::GetReference().SetDebug(1);
std::string filename = argv[1];
- gdcm::File *f1 = new gdcm::File( filename );
+ gdcm::FileHelper *f1 = new gdcm::FileHelper( filename );
gdcm::Header *h1 = f1->GetHeader();
int dataSize = f1->GetImageDataSize();
}
h2->Print( std::cout );
- gdcm::File *f2 = new gdcm::File( h2 );
+ gdcm::FileHelper *f2 = new gdcm::FileHelper( h2 );
f2->SetImageData(imageData, dataSize);
f2->SetWriteTypeToDcmExplVR();
Program: gdcm
Module: $RCSfile: TestPapyrus.cxx,v $
Language: C++
- Date: $Date: 2005/01/20 13:28:23 $
- Version: $Revision: 1.3 $
+ Date: $Date: 2005/01/20 16:16:58 $
+ Version: $Revision: 1.4 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
=========================================================================*/
#include "gdcmHeader.h"
-#include "gdcmFile.h"
+#include "gdcmFileHelper.h"
#include "gdcmDocument.h"
#include "gdcmValEntry.h"
#include "gdcmBinEntry.h"
return 1;
}
}
- gdcm::File *original = new gdcm::File( filename );
+ gdcm::FileHelper *original = new gdcm::FileHelper( filename );
gdcm::Header *h = original->GetHeader();
// Look for private Papyrus Sequence
n->ReplaceOrCreate(PixelRepresentation,0x0028,0x0102);
// create the file
- gdcm::File *file = new gdcm::File(n);
+ gdcm::FileHelper *file = new gdcm::FileHelper(n);
file->SetImageData(PixelArea,lgrImage*nbImages);
file->SetWriteTypeToDcmExplVR();
Program: gdcm
Module: $RCSfile: TestReadWriteReadCompare.cxx,v $
Language: C++
- Date: $Date: 2004/11/16 04:26:18 $
- Version: $Revision: 1.7 $
+ Date: $Date: 2005/01/20 16:16:58 $
+ Version: $Revision: 1.8 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
=========================================================================*/
#include "gdcmHeader.h"
-#include "gdcmFile.h"
+#include "gdcmFileHelper.h"
//Generated file:
#include "gdcmDataImages.h"
//////////////// Step 2:
- gdcm::File* file = new gdcm::File( header );
+ gdcm::FileHelper *file = new gdcm::FileHelper( header );
int dataSize = file->GetImageDataSize();
uint8_t* imageData = file->GetImageData(); //EXTREMELY IMPORTANT
// Sure, it is : It's up to the user to decide if he wants to
//////////////// Step 3:
- gdcm::File* reread = new gdcm::File( "TestReadWriteReadCompare.dcm" );
+ gdcm::FileHelper *reread = new gdcm::FileHelper( "TestReadWriteReadCompare.dcm" );
if( !reread->GetHeader()->IsReadable() )
{
std::cerr << "Test::TestReadWriteReadCompare: Could not reread image "
std::cout << "3...";
// For the next step:
int dataSizeWritten = reread->GetImageDataSize();
- uint8_t* imageDataWritten = reread->GetImageData();
+ uint8_t *imageDataWritten = reread->GetImageData();
//////////////// Step 4:
Program: gdcm
Module: $RCSfile: TestWrite.cxx,v $
Language: C++
- Date: $Date: 2005/01/11 11:37:13 $
- Version: $Revision: 1.14 $
+ Date: $Date: 2005/01/20 16:16:58 $
+ Version: $Revision: 1.15 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
=========================================================================*/
#include "gdcmHeader.h"
-#include "gdcmFile.h"
+#include "gdcmFileHelper.h"
#include <iostream>
-int main(int argc, char* argv[])
+int main(int argc, char *argv[])
{
std::string zozo;
- gdcm::Header* e1;
- gdcm::File * f1;
+ gdcm::Header *e1;
+ gdcm::FileHelper *f1;
- //gdcmDocument * d; //not used
void* imageData;
int dataSize;
}
// e1->Print();
- f1 = new gdcm::File(e1);
+ f1 = new gdcm::FileHelper(e1);
// ---
dataSize = f1->GetImageDataSize();
Program: gdcm
Module: $RCSfile: TestWriteSimple.cxx,v $
Language: C++
- Date: $Date: 2004/12/03 20:16:55 $
- Version: $Revision: 1.6 $
+ Date: $Date: 2005/01/20 16:16:58 $
+ Version: $Revision: 1.7 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
std::string header = argv[1];
const char *output = argv[2];
- gdcm::Header *f1 = new gdcm::Header( header );
- gdcm::File *f2 = new gdcm::File( f1 );
+ gdcm::Header *f1 = new gdcm::Header( header );
+ gdcm::FileHelper *f2 = new gdcm::FileHelper( f1 );
// If the following call is important, then the API sucks. Why is it
// required to allocate PixelData when we are not using it !?
int dataSize = f2->GetImageDataSize();
// unsigned char cast is necessary to be able to delete the buffer
// since deleting a void* is not allowed in c++
- uint8_t* imageData = (uint8_t*)f2->GetImageData();
+ uint8_t *imageData = (uint8_t *)f2->GetImageData();
- f2->SetImageData( imageData, dataSize);
+ f2->SetImageData( imageData, dataSize );
f2->WriteDcmExplVR( output );
Program: gdcm
Module: $RCSfile: Volume2Dicom.cxx,v $
Language: C++
- Date: $Date: 2004/12/06 11:37:37 $
- Version: $Revision: 1.3 $
+ Date: $Date: 2005/01/20 16:16:58 $
+ Version: $Revision: 1.4 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#include "gdcmHeader.h"
#include "gdcmDocEntry.h"
#include "gdcmBinEntry.h"
-#include "gdcmFile.h"
+#include "gdcmFileHelper.h"
#include "gdcmUtil.h"
#define USAGE "USAGE: Input3DImage OutputDirectory"
////////////////////////////////////////////////////////////
// Create a new dicom file object from the header //
////////////////////////////////////////////////////////////
- gdcm::File *f1 = new gdcm::File(h1);
+ gdcm::FileHelper *f1 = new gdcm::FileHelper(h1);
uint8_t *myData = f1->GetImageData(); // Get an Image pointer
f1->SetImageData( myData, sliceSize); // This callback ensures that the internal
// Pixel_Data of f1 is set correctly
Program: gdcm
Module: $RCSfile: Write.cxx,v $
Language: C++
- Date: $Date: 2005/01/11 11:37:13 $
- Version: $Revision: 1.14 $
+ Date: $Date: 2005/01/20 16:16:58 $
+ Version: $Revision: 1.15 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
std::string zozo;
gdcm::Header* e1;
- gdcm::File * f1;
+ gdcm::FileHelper * f1;
//gdcmDocument * d; //not used
uint8_t* imageData;
}
// e1->Print();
- f1 = new gdcm::File(e1);
+ f1 = new gdcm::FileHelper(e1);
// ---
dataSize = f1->GetImageDataSize();
Program: gdcm
Module: $RCSfile: WriteDicom.cxx,v $
Language: C++
- Date: $Date: 2005/01/08 15:03:57 $
- Version: $Revision: 1.10 $
+ Date: $Date: 2005/01/20 16:16:58 $
+ Version: $Revision: 1.11 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
=========================================================================*/
#include "gdcmHeader.h"
-#include "gdcmFile.h"
+#include "gdcmFileHelper.h"
// Writting of a DICOM file based on a correct dicom header
// and data pixel of another image
}
const char *first = argv[1];
- gdcm::File *f1 = new gdcm::File( first );
+ gdcm::FileHelper *f1 = new gdcm::FileHelper( first );
const char *second = argv[2];
- gdcm::File *f2 = new gdcm::File( second );
+ gdcm::FileHelper *f2 = new gdcm::FileHelper( second );
// We assume that DICOM fields of second file actually exists :
Program: gdcm
Module: $RCSfile: WriteDicomSimple.cxx,v $
Language: C++
- Date: $Date: 2005/01/08 23:18:30 $
- Version: $Revision: 1.6 $
+ Date: $Date: 2005/01/20 16:16:58 $
+ Version: $Revision: 1.7 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
*
*/
#include "gdcmHeader.h"
-#include "gdcmFile.h"
+#include "gdcmFileHelper.h"
#include <iostream>
#include <sstream>
}
// Step 3 : Create the file of the image
- gdcm::File *file = new gdcm::File(header);
+ gdcm::FileHelper *file = new gdcm::FileHelper(header);
file->SetImageData(imageData,size);
// Step 4 : Set the writting mode and write the image
Program: gdcm
Module: $RCSfile: WriteRead.cxx,v $
Language: C++
- Date: $Date: 2004/12/03 20:16:56 $
- Version: $Revision: 1.9 $
+ Date: $Date: 2005/01/20 16:16:58 $
+ Version: $Revision: 1.10 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
std::string zozo;
gdcm::Header* e1, *e2;
- gdcm::File * f1, *f2;
+ gdcm::FileHelper * f1, *f2;
uint8_t* imageData, *imageData2;
int dataSize, dataSize2;
return 0;
}
- f1 = new gdcm::File(e1);
+ f1 = new gdcm::FileHelper(e1);
imageData= f1->GetImageData();
dataSize = f1->GetImageDataSize();
<<std::endl;
return 0;
}
- f2 = new gdcm::File(e2);
+ f2 = new gdcm::FileHelper(e2);
imageData2= f2->GetImageData();
dataSize2 = f2->GetImageDataSize();
Program: gdcm
Module: $RCSfile: TestAllReadCompareDicom.cxx,v $
Language: C++
- Date: $Date: 2005/01/11 15:58:36 $
- Version: $Revision: 1.23 $
+ Date: $Date: 2005/01/20 16:16:59 $
+ Version: $Revision: 1.24 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
=========================================================================*/
#include "gdcmHeader.h"
-#include "gdcmFile.h"
+#include "gdcmFileHelper.h"
#include <iostream>
#include <fstream>
////// Step 1:
std::cout << " 1...";
- gdcm::File* tested = new gdcm::File( filename );
+ gdcm::FileHelper* tested = new gdcm::FileHelper( filename );
if( !tested->GetHeader()->IsReadable() )
{
std::cout << " Failed" << std::endl
////// When reference file is not gdcm readable test is failed:
std::cout << "3a...";
- gdcm::File* reference = new gdcm::File( referenceFileName );
+ gdcm::FileHelper* reference = new gdcm::FileHelper( referenceFileName );
if( !reference->GetHeader()->IsReadable() )
{
std::cout << " Failed" << std::endl
Program: gdcm
Module: $RCSfile: TestCopyDicom.cxx,v $
Language: C++
- Date: $Date: 2005/01/19 08:58:33 $
- Version: $Revision: 1.31 $
+ Date: $Date: 2005/01/20 16:16:59 $
+ Version: $Revision: 1.32 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
=========================================================================*/
#include "gdcmHeader.h"
-#include "gdcmFile.h"
+#include "gdcmFileHelper.h"
#include "gdcmValEntry.h"
#include "gdcmBinEntry.h"
d=originalH->GetNextEntry();
}
- gdcm::File *original = new gdcm::File( originalH );
- gdcm::File *copy = new gdcm::File( copyH );
+ gdcm::FileHelper *original = new gdcm::FileHelper( originalH );
+ gdcm::FileHelper *copy = new gdcm::FileHelper( copyH );
size_t dataSize = original->GetImageDataSize();
uint8_t* imageData = original->GetImageData();
//////////////// Step 4:
std::cout << "4...";
- copy = new gdcm::File( output );
+ copy = new gdcm::FileHelper( output );
//Is the file written still gdcm parsable ?
if ( !copy->GetHeader()->IsReadable() )
Program: gdcm
Module: $RCSfile: TestCopyRescaleDicom.cxx,v $
Language: C++
- Date: $Date: 2005/01/18 07:56:21 $
- Version: $Revision: 1.6 $
+ Date: $Date: 2005/01/20 16:16:59 $
+ Version: $Revision: 1.7 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
=========================================================================*/
#include "gdcmHeader.h"
-#include "gdcmFile.h"
+#include "gdcmFileHelper.h"
#include "gdcmValEntry.h"
#include "gdcmBinEntry.h"
d=originalH->GetNextEntry();
}
- gdcm::File *original = new gdcm::File( originalH );
- gdcm::File *copy = new gdcm::File( copyH );
+ gdcm::FileHelper *original = new gdcm::FileHelper( originalH );
+ gdcm::FileHelper *copy = new gdcm::FileHelper( copyH );
size_t dataSize = original->GetImageDataSize();
//////////////// Step 4:
std::cout << "4...";
- copy = new gdcm::File( output );
+ copy = new gdcm::FileHelper( output );
//Is the file written still gdcm parsable ?
if ( !copy->GetHeader()->IsReadable() )
Program: gdcm
Module: $RCSfile: TestReadWriteReadCompare.cxx,v $
Language: C++
- Date: $Date: 2004/11/30 14:17:52 $
- Version: $Revision: 1.17 $
+ Date: $Date: 2005/01/20 16:16:59 $
+ Version: $Revision: 1.18 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
//////////////// Step 2:
- gdcm::File* file = new gdcm::File( header );
+ gdcm::FileHelper* file = new gdcm::FileHelper( header );
int dataSize = file->GetImageDataSize();
uint8_t* imageData = file->GetImageData(); //EXTREMELY IMPORTANT
// Sure, it is : It's up to the user to decide if he wants to
//////////////// Step 3:
- gdcm::File* reread = new gdcm::File( output );
+ gdcm::FileHelper* reread = new gdcm::FileHelper( output );
if( !reread->GetHeader()->IsReadable() )
{
std::cerr << "Failed" << std::endl
Program: gdcm
Module: $RCSfile: TestWriteSimple.cxx,v $
Language: C++
- Date: $Date: 2005/01/08 23:18:31 $
- Version: $Revision: 1.11 $
+ Date: $Date: 2005/01/20 16:16:59 $
+ Version: $Revision: 1.12 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
*
*/
#include "gdcmHeader.h"
-#include "gdcmFile.h"
+#include "gdcmFileHelper.h"
#include <iostream>
#include <sstream>
// Step 3 : Create the file of the image
std::cout << "3...";
- gdcm::File *file = new gdcm::File(header);
+ gdcm::FileHelper *file = new gdcm::FileHelper(header);
file->SetImageData(imageData,size);
// Step 4 : Set the writting mode and write the image
// Step 5 : Read the written image
std::cout << "5...";
- gdcm::File* reread = new gdcm::File( fileName );
+ gdcm::FileHelper* reread = new gdcm::FileHelper( fileName );
if( !reread->GetHeader()->IsReadable() )
{
std::cerr << "Failed" << std::endl
Program: gdcm
Module: $RCSfile: VTKTestRead.cxx,v $
Language: C++
- Date: $Date: 2005/01/19 14:45:40 $
- Version: $Revision: 1.4 $
+ Date: $Date: 2005/01/20 16:16:59 $
+ Version: $Revision: 1.5 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
-#include "gdcmFile.h"
+#include "gdcmFileHelper.h"
#include "vtkGdcmReader.h"
#include "vtkImageViewer.h"
#include "vtkImageData.h"
// Instead of directly reading the dicom let's write it down to another file
// do a scope to be sure everything gets cleanup
{
- gdcm::File file( filename );
+ gdcm::FileHelper file( filename );
file.GetImageData();
file.SetWriteModeToRaw();
file.WriteDcmExplVR( "TestWrite.dcm" );
#include "gdcmDocEntrySet.h"
#include "gdcmDocument.h"
#include "gdcmElementSet.h"
-#include "gdcmFile.h"
+#include "gdcmFileHelper.h"
#include "gdcmGlobal.h"
#include "gdcmHeader.h"
#include "gdcmSerieHeader.h"
gdcmDocument.cxx
gdcmElementSet.cxx
gdcmException.cxx
- gdcmFile.cxx
+ gdcmFileHelper.cxx
gdcmGlobal.cxx
gdcmHeader.cxx
gdcmJPEGFragment.cxx
Program: gdcm
Module: $RCSfile: gdcmDocEntrySet.h,v $
Language: C++
- Date: $Date: 2005/01/20 11:39:49 $
- Version: $Revision: 1.39 $
+ Date: $Date: 2005/01/20 16:17:00 $
+ Version: $Revision: 1.40 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
*/
class GDCM_EXPORT DocEntrySet : public Base
{
-friend class File;
+friend class FileHelper;
public:
DocEntrySet() {};
virtual ~DocEntrySet() {};
Program: gdcm
Module: $RCSfile: gdcmDocument.h,v $
Language: C++
- Date: $Date: 2005/01/20 11:37:37 $
- Version: $Revision: 1.94 $
+ Date: $Date: 2005/01/20 16:17:00 $
+ Version: $Revision: 1.95 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
/// 'Swap code' accessor (see \ref SwapCode )
int GetSwapCode() { return SwapCode; }
// System access (meaning endian related !?)
- uint16_t SwapShort(uint16_t); // needed by File
- uint32_t SwapLong(uint32_t); // needed by File
- uint16_t UnswapShort(uint16_t); // needed by File
- uint32_t UnswapLong(uint32_t); // needed by File
+ uint16_t SwapShort(uint16_t); // needed by Document
+ uint32_t SwapLong(uint32_t); // needed by Document
+ uint16_t UnswapShort(uint16_t); // needed by Document
+ uint32_t UnswapLong(uint32_t); // needed by Document
// Ordering of Documents
bool operator<(Document &document);
uint32_t MaxSizePrintEntry;
private:
- friend class File;
+ friend class FileHelper;
};
} // end namespace gdcm
Program: gdcm
Module: $RCSfile: gdcmFile.cxx,v $
Language: C++
- Date: $Date: 2005/01/16 04:50:42 $
- Version: $Revision: 1.193 $
+ Date: $Date: 2005/01/20 16:17:00 $
+ Version: $Revision: 1.194 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
=========================================================================*/
-#include "gdcmFile.h"
+#include "gdcmFileHelper.h"
#include "gdcmGlobal.h"
#include "gdcmTS.h"
#include "gdcmDocument.h"
* one sets an a posteriori shadow dictionary (efficiency can be
* seen as a side effect).
*/
-File::File( )
+FileHelper::FileHelper( )
{
HeaderInternal = new Header( );
SelfHeader = true;
* seen as a side effect).
* @param header already built Header
*/
-File::File(Header *header)
+FileHelper::FileHelper(Header *header)
{
HeaderInternal = header;
SelfHeader = false;
* seen as a side effect).
* @param filename file to be opened for parsing
*/
-File::File(std::string const & filename )
+FileHelper::FileHelper(std::string const & filename )
{
HeaderInternal = new Header( filename );
SelfHeader = true;
/**
* \brief canonical destructor
- * \note If the Header was created by the File constructor,
- * it is destroyed by the File
+ * \note If the header (gdcm::File) was created by the FileHelper constructor,
+ * it is destroyed by the FileHelper
*/
-File::~File()
+FileHelper::~FileHelper()
{
if( PixelReadConverter )
{
//-----------------------------------------------------------------------------
// Print
-void File::Print(std::ostream &os, std::string const &)
+void FileHelper::Print(std::ostream &os, std::string const &)
{
HeaderInternal->SetPrintLevel(PrintLevel);
HeaderInternal->Print(os);
* the size of the pixels)
* @return The image size
*/
-size_t File::GetImageDataSize()
+size_t FileHelper::GetImageDataSize()
{
if ( PixelWriteConverter->GetUserData() )
{
* (use GetImageDataSize if you wish)
* @return The raw image size
*/
-size_t File::GetImageDataRawSize()
+size_t FileHelper::GetImageDataRawSize()
{
if ( PixelWriteConverter->GetUserData() )
{
* @return Pointer to newly allocated pixel data.
* NULL if alloc fails
*/
-uint8_t *File::GetImageData()
+uint8_t *FileHelper::GetImageData()
{
if ( PixelWriteConverter->GetUserData() )
{
* @return Pointer to newly allocated pixel data.
* \ NULL if alloc fails
*/
-uint8_t *File::GetImageDataRaw ()
+uint8_t *FileHelper::GetImageDataRaw ()
{
return GetRaw();
}
* @return On success, the number of bytes actually copied. Zero on
* failure e.g. MaxSize is lower than necessary.
*/
-size_t File::GetImageDataIntoVector (void *destination, size_t maxSize)
+size_t FileHelper::GetImageDataIntoVector (void *destination, size_t maxSize)
{
if ( ! GetRaw() )
{
*
* @return boolean
*/
-void File::SetImageData(uint8_t *inData, size_t expectedSize)
+void FileHelper::SetImageData(uint8_t *inData, size_t expectedSize)
{
SetUserData(inData,expectedSize);
}
* \brief Set the image datas defined by the user
* \warning When writting the file, this datas are get as default datas to write
*/
-void File::SetUserData(uint8_t *data, size_t expectedSize)
+void FileHelper::SetUserData(uint8_t *data, size_t expectedSize)
{
PixelWriteConverter->SetUserData(data,expectedSize);
}
* \brief Get the image datas defined by the user
* \warning When writting the file, this datas are get as default data to write
*/
-uint8_t *File::GetUserData()
+uint8_t *FileHelper::GetUserData()
{
return PixelWriteConverter->GetUserData();
}
* \brief Get the image data size defined by the user
* \warning When writting the file, this datas are get as default data to write
*/
-size_t File::GetUserDataSize()
+size_t FileHelper::GetUserDataSize()
{
return PixelWriteConverter->GetUserDataSize();
}
* \brief Get the image datas from the file.
* If a LUT is found, the data are expanded to be RGB
*/
-uint8_t *File::GetRGBData()
+uint8_t *FileHelper::GetRGBData()
{
return PixelReadConverter->GetRGB();
}
* \brief Get the image data size from the file.
* If a LUT is found, the data are expanded to be RGB
*/
-size_t File::GetRGBDataSize()
+size_t FileHelper::GetRGBDataSize()
{
return PixelReadConverter->GetRGBSize();
}
* \brief Get the image datas from the file.
* If a LUT is found, the datas are not expanded !
*/
-uint8_t *File::GetRawData()
+uint8_t *FileHelper::GetRawData()
{
return PixelReadConverter->GetRaw();
}
* \brief Get the image data size from the file.
* If a LUT is found, the data are not expanded !
*/
-size_t File::GetRawDataSize()
+size_t FileHelper::GetRawDataSize()
{
return PixelReadConverter->GetRawSize();
}
* @return false if write fails
*/
-bool File::WriteRawData(std::string const &fileName)
+bool FileHelper::WriteRawData(std::string const &fileName)
{
std::ofstream fp1(fileName.c_str(), std::ios::out | std::ios::binary );
if (!fp1)
* @return false if write fails
*/
-bool File::WriteDcmImplVR (std::string const &fileName)
+bool FileHelper::WriteDcmImplVR (std::string const &fileName)
{
SetWriteTypeToDcmImplVR();
return Write(fileName);
* @return false if write fails
*/
-bool File::WriteDcmExplVR (std::string const &fileName)
+bool FileHelper::WriteDcmExplVR (std::string const &fileName)
{
SetWriteTypeToDcmExplVR();
return Write(fileName);
* @return false if write fails
*/
-bool File::WriteAcr (std::string const &fileName)
+bool FileHelper::WriteAcr (std::string const &fileName)
{
SetWriteTypeToAcr();
return Write(fileName);
* (any already existing file is overwritten)
* @return false if write fails
*/
-bool File::Write(std::string const &fileName)
+bool FileHelper::Write(std::string const &fileName)
{
switch(WriteType)
{
* @param group group number of the Dicom Element to modify
* @param elem element number of the Dicom Element to modify
*/
-bool File::SetEntry(std::string const &content,
+bool FileHelper::SetEntry(std::string const &content,
uint16_t group, uint16_t elem)
{
return HeaderInternal->SetEntry(content,group,elem);
* @param group group number of the Dicom Element to modify
* @param elem element number of the Dicom Element to modify
*/
-bool File::SetEntry(uint8_t *content, int lgth,
+bool FileHelper::SetEntry(uint8_t *content, int lgth,
uint16_t group, uint16_t elem)
{
return HeaderInternal->SetEntry(content,lgth,group,elem);
* \return pointer to the modified/created Header Entry (NULL when creation
* failed).
*/
-bool File::ReplaceOrCreate(std::string const &content,
+bool FileHelper::ReplaceOrCreate(std::string const &content,
uint16_t group, uint16_t elem)
{
return HeaderInternal->ReplaceOrCreate(content,group,elem) != NULL;
* \return pointer to the modified/created Header Entry (NULL when creation
* failed).
*/
-bool File::ReplaceOrCreate(uint8_t *binArea, int lgth,
+bool FileHelper::ReplaceOrCreate(uint8_t *binArea, int lgth,
uint16_t group, uint16_t elem)
{
return HeaderInternal->ReplaceOrCreate(binArea,lgth,group,elem) != NULL;
/**
* \brief Access to the underlying \ref PixelReadConverter RGBA LUT
*/
-uint8_t* File::GetLutRGBA()
+uint8_t* FileHelper::GetLutRGBA()
{
return PixelReadConverter->GetLutRGBA();
}
* when the user set an image data
* @return true if the check successfulls
*/
-bool File::CheckWriteIntegrity()
+bool FileHelper::CheckWriteIntegrity()
{
if(PixelWriteConverter->GetUserData())
{
return true;
}
-void File::SetWriteToRaw()
+/**
+ * \brief
+ */
+void FileHelper::SetWriteToRaw()
{
if( HeaderInternal->GetNumberOfScalarComponents() == 3
&& !HeaderInternal->HasLUT())
}
}
-void File::SetWriteToRGB()
+
+/**
+ * \brief
+ */
+void FileHelper::SetWriteToRGB()
{
if(HeaderInternal->GetNumberOfScalarComponents()==3)
{
}
}
-void File::RestoreWrite()
+/**
+ * \brief
+ */
+void FileHelper::RestoreWrite()
{
Archive->Restore(0x0028,0x0002);
Archive->Restore(0x0028,0x0004);
Archive->Restore(0x0028,0x1203);
}
-void File::SetWriteFileTypeToACR()
+/**
+ * \brief
+ */
+void FileHelper::SetWriteFileTypeToACR()
{
Archive->Push(0x0002,0x0010);
}
-void File::SetWriteFileTypeToExplicitVR()
+/**
+ * \brief
+ */
+void FileHelper::SetWriteFileTypeToExplicitVR()
{
std::string ts = Util::DicomString(
Global::GetTS()->GetSpecialTransferSyntax(TS::ExplicitVRLittleEndian) );
Archive->Push(tss);
}
-void File::SetWriteFileTypeToImplicitVR()
+/**
+ * \brief
+ */
+void FileHelper::SetWriteFileTypeToImplicitVR()
{
std::string ts = Util::DicomString(
Global::GetTS()->GetSpecialTransferSyntax(TS::ImplicitVRLittleEndian) );
Archive->Push(tss);
}
-void File::RestoreWriteFileType()
+
+/**
+ * \brief
+ */
+void FileHelper::RestoreWriteFileType()
{
Archive->Restore(0x0002,0x0010);
}
-void File::SetWriteToLibido()
+void FileHelper::SetWriteToLibido()
{
ValEntry *oldRow = dynamic_cast<ValEntry *>
(HeaderInternal->GetDocEntry(0x0028, 0x0010));
Archive->Push(libidoCode);
}
-void File::SetWriteToNoLibido()
+/**
+ * \brief
+ */
+void FileHelper::SetWriteToNoLibido()
{
ValEntry *recCode = dynamic_cast<ValEntry *>
(HeaderInternal->GetDocEntry(0x0008,0x0010));
}
}
-void File::RestoreWriteOfLibido()
+/**
+ * \brief
+ */
+void FileHelper::RestoreWriteOfLibido()
{
Archive->Restore(0x0028,0x0010);
Archive->Restore(0x0028,0x0011);
Archive->Restore(0x0008,0x0010);
}
-ValEntry *File::CopyValEntry(uint16_t group,uint16_t elem)
+ValEntry *FileHelper::CopyValEntry(uint16_t group,uint16_t elem)
{
DocEntry *oldE = HeaderInternal->GetDocEntry(group, elem);
ValEntry *newE;
return newE;
}
-BinEntry *File::CopyBinEntry(uint16_t group,uint16_t elem)
+/**
+ * \brief Modifies the value of a given Bin Entry (Dicom Element)
+ * when it exists. Create it with the given value when unexistant.
+ * @param content (string) Value to be set
+ * @param group Group number of the Entry
+ * @param elem Element number of the Entry
+ * \return pointer to the modified/created Bin Entry (NULL when creation
+ * failed).
+ */
+BinEntry *FileHelper::CopyBinEntry(uint16_t group,uint16_t elem)
{
DocEntry *oldE = HeaderInternal->GetDocEntry(group, elem);
BinEntry *newE;
/**
* \brief Factorization for various forms of constructors.
*/
-void File::Initialise()
+void FileHelper::Initialise()
{
WriteMode = WMODE_RAW;
WriteType = ExplicitVR;
}
}
-uint8_t *File::GetRaw()
+/**
+ * \brief
+ */
+uint8_t *FileHelper::GetRaw()
{
uint8_t *raw = PixelReadConverter->GetRaw();
if ( ! raw )
Program: gdcm
Module: $RCSfile: gdcmFile.h,v $
Language: C++
- Date: $Date: 2005/01/20 11:39:49 $
- Version: $Revision: 1.95 $
+ Date: $Date: 2005/01/20 16:17:00 $
+ Version: $Revision: 1.96 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
* for accessing the image/volume content. One can also use it to
* write Dicom/ACR-NEMA/RAW files.
*/
-class GDCM_EXPORT File : public Base
+class GDCM_EXPORT FileHelper : public Base
{
public:
enum FileMode
};
public:
- File( );
- File( Header *header );
- File( std::string const &filename );
+ FileHelper( );
+ FileHelper( Header *header );
+ FileHelper( std::string const &filename );
- virtual ~File();
+ virtual ~FileHelper();
void Print(std::ostream &os = std::cout, std::string const & indent = "");
Program: gdcm
Module: $RCSfile: gdcmJPEGFragment.h,v $
Language: C++
- Date: $Date: 2005/01/18 04:01:09 $
- Version: $Revision: 1.10 $
+ Date: $Date: 2005/01/20 16:17:00 $
+ Version: $Revision: 1.11 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
long Length;
friend class Document;
-friend class File;
+friend class FileHelper;
friend class PixelReadConvert;
friend class JPEGFragmentsInfo;
};
Program: gdcm
Module: $RCSfile: gdcmJPEGFragmentsInfo.h,v $
Language: C++
- Date: $Date: 2005/01/17 03:05:55 $
- Version: $Revision: 1.10 $
+ Date: $Date: 2005/01/20 16:17:00 $
+ Version: $Revision: 1.11 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
JPEGFragmentsList Fragments;
friend class Document;
-friend class File;
+friend class FileHelper;
friend class PixelReadConvert;
};
} // end namespace gdcm
Program: gdcm
Module: $RCSfile: gdcmRLEFramesInfo.h,v $
Language: C++
- Date: $Date: 2005/01/16 04:50:42 $
- Version: $Revision: 1.9 $
+ Date: $Date: 2005/01/20 16:17:00 $
+ Version: $Revision: 1.10 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
{
typedef std::list< RLEFrame* > RLEFrameList;
friend class Document;
-friend class File;
+friend class FileHelper;
friend class PixelReadConvert;
RLEFrameList Frames;
public:
Program: gdcm
Module: $RCSfile: vtkGdcmReader.cxx,v $
Language: C++
- Date: $Date: 2004/12/09 10:59:59 $
- Version: $Revision: 1.64 $
+ Date: $Date: 2005/01/20 16:17:01 $
+ Version: $Revision: 1.65 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
// time...
// //////////////////////////////////////////////////////////////
-#include "gdcmFile.h"
+#include "gdcmFileHelper.h"
#include "gdcmHeader.h"
#include "vtkGdcmReader.h"
#include <vtkPointData.h>
#include <vtkLookupTable.h>
-vtkCxxRevisionMacro(vtkGdcmReader, "$Revision: 1.64 $");
+vtkCxxRevisionMacro(vtkGdcmReader, "$Revision: 1.65 $");
vtkStandardNewMacro(vtkGdcmReader);
//-----------------------------------------------------------------------------
unsigned long & updateProgressCount)
{
vtkDebugMacro(<< "Copying to memory image [" << fileName.c_str() << "]");
- gdcm::File file( fileName.c_str() );
+ gdcm::FileHelper file( fileName.c_str() );
size_t size;
// If the data structure of vtk for image/volume representation
Program: gdcm
Module: $RCSfile: vtkGdcmWriter.cxx,v $
Language: C++
- Date: $Date: 2005/01/18 18:24:07 $
- Version: $Revision: 1.10 $
+ Date: $Date: 2005/01/20 16:17:01 $
+ Version: $Revision: 1.11 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#include <vtkPointData.h>
#include <vtkLookupTable.h>
-vtkCxxRevisionMacro(vtkGdcmWriter, "$Revision: 1.10 $");
+vtkCxxRevisionMacro(vtkGdcmWriter, "$Revision: 1.11 $");
vtkStandardNewMacro(vtkGdcmWriter);
//-----------------------------------------------------------------------------
/**
* Set the datas informations in the file
*/
-void SetImageInformation(gdcm::File *file,vtkImageData *image)
+void SetImageInformation(gdcm::FileHelper *file,vtkImageData *image)
{
std::ostringstream str;
void vtkGdcmWriter::WriteDcmFile(char *fileName,vtkImageData *image)
{
// From here, the write of the file begins
- gdcm::File *dcmFile = new gdcm::File();
+ gdcm::FileHelper *dcmFile = new gdcm::FileHelper();
// Set the image informations
SetImageInformation(dcmFile,image);