+2004-11-24 Benoit Regrain <Benoit.Regrain@creatis.insa-lyon.fr>
+ * src/gdcmDocEntryArchive.[h|cxx] : bug fix and add a method to temporary
+ remove a DocEntry in the header (push an empty DocEntry)
+ * src/gdcmFile.[h|cxx] : remove some useless variables, methods and code
+ lines. Bug fix in the initialization of the PixelConvert and the
+ DocEntryArchive
+ * src/gdcmElementSet.[h|cxx] : add methods Initialize and GetNext to
+ use in TestCopyDicom (now this test can run under windows... but fails)
+ * Test/TestCopyDicom.cxx : amelioration of the test :
+ - test the pixels written
+ - add test points to quickly find where is the error
+ - can set a file name input and output in arguments
+ * Test/TestAllReadCompareDicom.cxx, TestReadWriteReadCompare.cxx :
+ amelioration of the test output
+
2004-11-23 Benoit Regrain <Benoit.Regrain@creatis.insa-lyon.fr>
* src/gdcmDocEntryArchive.cxx : complete the print function, that prints
all replaced DocEntry's
Program: gdcm
Module: $RCSfile: PrintFile.cxx,v $
Language: C++
- Date: $Date: 2004/11/23 17:12:25 $
- Version: $Revision: 1.11 $
+ Date: $Date: 2004/11/24 10:23:46 $
+ 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
<< std::endl;
int numberOfScalarComponents=e1->GetNumberOfScalarComponents();
- std::cout << " NumberOfScalarComponents " << numberOfScalarComponents <<std::endl;
+ std::cout << " NumberOfScalarComponents " << numberOfScalarComponents <<std::endl
+ << " LUT=" << (e1->HasLUT() ? "TRUE" : "FALSE")
+ << std::endl;
if ( e1->GetEntryByNumber(0x0002,0x0010) == gdcm::GDCM_NOTLOADED ) {
Program: gdcm
Module: $RCSfile: TestAllReadCompareDicom.cxx,v $
Language: C++
- Date: $Date: 2004/11/17 10:20:06 $
- Version: $Revision: 1.16 $
+ Date: $Date: 2004/11/24 10:23:46 $
+ Version: $Revision: 1.17 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
if (testedDataSize != referenceDataSize)
{
- std::cout << " Failed: pixel areas lengths differ: "
+ std::cout << " Failed" << std::endl
+ << " pixel areas lengths differ: "
<< testedDataSize << " # " << referenceDataSize
<< std::endl;
delete tested;
testedDataSize) != 0 )
{
(void)res;
- std::cout << " Failed: pixel differ (as expanded in memory)."
+ std::cout << " Failed" << std::endl
+ << " pixel differ (as expanded in memory)."
<< std::endl;
delete tested;
delete reference;
Program: gdcm
Module: $RCSfile: TestCopyDicom.cxx,v $
Language: C++
- Date: $Date: 2004/11/18 17:06:54 $
- Version: $Revision: 1.18 $
+ Date: $Date: 2004/11/24 10:23:46 $
+ Version: $Revision: 1.19 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
return unlink(source) != 0 ? false : true;
}
-// Here we load a gdcmFile and then try to create from scratch a copy of it,
-// copying field by field the dicom image
-
-int TestCopyDicom(int , char* [])
+int CopyDicom(std::string const & filename,
+ std::string const & output )
{
- int i =0;
- int retVal = 0; //by default this is an error
- while( gdcmDataImages[i] != 0 )
- {
- std::string filename = GDCM_DATA_ROOT;
- filename += "/"; //doh!
- filename += gdcmDataImages[i];
- std::cerr << "Filename: " << filename << std::endl;
-
- std::string output = "../Testing/Temporary/output.dcm";
-
+ std::cout << " Testing: " << filename << std::endl;
if( FileExists( output.c_str() ) )
{
// std::cerr << "Don't try to cheat, I am removing the file anyway" << std::endl;
if( !RemoveFile( output.c_str() ) )
{
- std::cerr << "Ouch, the file exist, but I cannot remove it" << std::endl;
+ std::cout << "Ouch, the file exist, but I cannot remove it" << std::endl;
return 1;
}
}
+ //////////////// Step 1:
+ std::cout << " 1...";
gdcm::File *original = new gdcm::File( filename );
gdcm::File *copy = new gdcm::File( output );
- const gdcm::TagDocEntryHT & Ht = original->GetHeader()->GetTagHT();
-
size_t dataSize = original->GetImageDataSize();
uint8_t* imageData = original->GetImageData();
(void)dataSize; // To use the variable and not have warnings at compil.
// (the user does NOT have to know the way we implemented the Header !)
// Waiting for a 'clean' solution, I keep the method ...JPRx
- gdcm::DocEntry* d;
- for (gdcm::TagDocEntryHT::const_iterator tag = Ht.begin(); tag != Ht.end(); ++tag)
+ //////////////// Step 2:
+ std::cout << "2...";
+ original->GetHeader()->Initialize();
+ gdcm::DocEntry* d=original->GetHeader()->GetNextEntry();
+
+ while(d)
{
- d = tag->second;
if ( gdcm::BinEntry* b = dynamic_cast<gdcm::BinEntry*>(d) )
{
copy->GetHeader()->ReplaceOrCreateByNumber(
// << d->GetGroup() << " " << d->GetElement()
// << std::endl;
}
+
+ d=original->GetHeader()->GetNextEntry();
}
+
// Useless to set the image datas, because it's already made when
// copying the corresponding BinEntry that contains the pixel datas
- //copy->SetImageData(imageData, dataSize);
- original->GetHeader()->SetImageDataSize(dataSize);
+ copy->SetImageData(imageData, dataSize);
+// copy->GetImageData();
+// original->GetHeader()->SetImageDataSize(dataSize);
+ //////////////// Step 3:
+ std::cout << "3...";
copy->WriteDcmExplVR( output );
- delete original;
delete copy;
+ //////////////// Step 4:
+ std::cout << "4...";
copy = new gdcm::File( output );
//Is the file written still gdcm parsable ?
if ( !copy->GetHeader()->IsReadable() )
{
- retVal +=1;
- std::cout << output << " Failed" << std::endl;
+ std::cout << "=> " << output << " Failed" << std::endl;
+ delete original;
+ return(1);
+ }
+
+ //////////////// Step 5:
+ std::cout << "5...";
+ int dataSizeWritten = copy->GetImageDataSize();
+ uint8_t* imageDataWritten = copy->GetImageData();
+
+ if (dataSize != dataSizeWritten)
+ {
+ std::cout << " Failed" << std::endl
+ << " Pixel areas lengths differ: "
+ << dataSize << " # " << dataSizeWritten << std::endl;
+
+ delete original;
+ delete copy;
+
+ return 1;
+ }
+
+ if (int res = memcmp(imageData, imageDataWritten, dataSize) !=0)
+ {
+ (void)res;
+ std::cout << " Failed" << std::endl
+ << " Pixel differ (as expanded in memory)." << std::endl;
+
+ delete original;
+ delete copy;
+
+ return 1;
}
+ std::cout << "OK." << std::endl ;
+
+ delete original;
+ delete copy;
+
+ return 0;
+}
+
+// Here we load a gdcmFile and then try to create from scratch a copy of it,
+// copying field by field the dicom image
+
+int TestCopyDicom(int argc, char* argv[])
+{
+ if ( argc == 3 )
+ {
+ // The test is specified a specific filename, use it instead of looping
+ // over all images
+ const std::string input = argv[1];
+ const std::string reference = argv[2];
+ return CopyDicom( input, reference );
+ }
+ else if ( argc > 3 || argc == 2 )
+ {
+ std::cout << " Usage: " << argv[0]
+ << " (no arguments needed)." << std::endl;
+ std::cout << "or Usage: " << argv[0]
+ << " filename.dcm reference.dcm" << std::endl;
+ return 1;
+ }
+ // else other cases:
+
+ std::cout << " Description (Test::TestCopyDicom): "
+ << std::endl;
+ std::cout << " For all images in gdcmData (and not blacklisted in "
+ "Test/CMakeLists.txt)"
+ << std::endl;
+ std::cout << " apply the following to each filename.xxx: "
+ << std::endl;
+ std::cout << " step 1: parse the image (as gdcmHeader) and call"
+ << " IsReadable(). After that, call GetImageData() and "
+ << "GetImageDataSize() "
+ << std::endl;
+ std::cout << " step 2: create a copy of the readed file and the new"
+ << " pixel datas are set to the copy"
+ << std::endl;
+ std::cout << " step 3: write the copy of the image"
+ << std::endl;
+ std::cout << " step 4: read the copy and call IsReadable()"
+ << std::endl;
+ std::cout << " step 5: compare (in memory with memcmp) that the two "
+ << "images " << std::endl
+ << " match (as expanded by gdcm)." << std::endl;
+ std::cout << std::endl;
+
+ int i =0;
+ int retVal = 0; //by default this is an error
+ while( gdcmDataImages[i] != 0 )
+ {
+ std::string filename = GDCM_DATA_ROOT;
+ filename += "/"; //doh!
+ filename += gdcmDataImages[i];
+
+// std::string output = "../Testing/Temporary/output.dcm";
+ std::string output = "output.dcm";
+
+ if( CopyDicom( filename, output ) != 0 )
+ {
+ retVal++;
+ }
+
i++;
}
return retVal;
Program: gdcm
Module: $RCSfile: TestReadWriteReadCompare.cxx,v $
Language: C++
- Date: $Date: 2004/11/16 04:28:20 $
- Version: $Revision: 1.13 $
+ Date: $Date: 2004/11/24 10:23:46 $
+ Version: $Revision: 1.14 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
delete header;
return 1;
}
- std::cout << " step 1 ...";
+ std::cout << " step 1...";
//////////////// Step 2:
file->SetImageData(imageData, dataSize);
+ file->SetWriteModeToRGB();
file->WriteDcmExplVR( output );
std::cout << "2...";
gdcm::File* reread = new gdcm::File( output );
if( !reread->GetHeader()->IsReadable() )
{
- std::cerr << "Test::TestReadWriteReadCompare: Could not reread image "
+ std::cerr << "Failed" << std::endl
+ << "Test::TestReadWriteReadCompare: Could not reread image "
<< "written:" << filename << std::endl;
delete header;
delete file;
if (dataSize != dataSizeWritten)
{
- std::cout << std::endl
+ std::cout << "Failed" << std::endl
<< " Pixel areas lengths differ: "
<< dataSize << " # " << dataSizeWritten << std::endl;
delete header;
if (int res = memcmp(imageData, imageDataWritten, dataSize) !=0)
{
(void)res;
- std::cout << std::endl
+ std::cout << "Failed" << std::endl
<< " Pixel differ (as expanded in memory)." << std::endl;
delete header;
delete file;
Program: gdcm
Module: $RCSfile: gdcmDocEntryArchive.cxx,v $
Language: C++
- Date: $Date: 2004/11/23 11:14:13 $
- Version: $Revision: 1.2 $
+ Date: $Date: 2004/11/24 10:23:47 $
+ Version: $Revision: 1.3 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
// Save the old DocEntry if any
TagDocEntryHT::iterator it = HeaderHT.find(key);
if( it!=HeaderHT.end() )
+ {
Archive[key] = it->second;
+ }
else
+ {
Archive[key] = NULL;
+ }
// Set the new DocEntry
HeaderHT[key] = newEntry;
return(false);
}
+/**
+ * \brief Replace in the Header a DocEntry by the new DocEntry. The last
+ * DocEntry is kept in archieve
+ * @param newEntry New entry to substitute to an other entry of the Header
+ * @return FALSE when an other DocEntry is already archieved with the same
+ * generalized key, TRUE otherwise
+ */
+bool DocEntryArchive::Push(uint16_t group,uint16_t element)
+{
+ std::string key = DictEntry::TranslateToKey(group,element);
+
+ if( Archive.find(key)==Archive.end() )
+ {
+ // Save the old DocEntry if any
+ TagDocEntryHT::iterator it = HeaderHT.find(key);
+ if( it!=HeaderHT.end() )
+ {
+ Archive[key] = it->second;
+ HeaderHT.erase(it);
+ }
+
+ return(true);
+ }
+ return(false);
+}
+
/**
* \brief Restore in the Header the DocEntry that have the generalized key.
* The old entry is destroyed.
if( restoreIt!=Archive.end() )
{
TagDocEntryHT::iterator restorePos = HeaderHT.find(key);
- if( restoreIt!=HeaderHT.end() )
+ if( restorePos!=HeaderHT.end() )
+ {
delete restorePos->second;
+ }
if( Archive[key] )
+ {
HeaderHT[key] = Archive[key];
+ }
else
+ {
HeaderHT.erase(restorePos);
+ }
Archive.erase(restoreIt);
Program: gdcm
Module: $RCSfile: gdcmDocEntryArchive.h,v $
Language: C++
- Date: $Date: 2004/11/19 18:49:39 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2004/11/24 10:23:47 $
+ Version: $Revision: 1.2 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
void Print(std::ostream &os = std::cout);
bool Push(DocEntry *newEntry);
+ bool Push(uint16_t group,uint16_t element);
bool Restore(uint16_t group,uint16_t element);
void ClearArchive(void);
Program: gdcm
Module: $RCSfile: gdcmElementSet.cxx,v $
Language: C++
- Date: $Date: 2004/11/16 16:20:23 $
- Version: $Revision: 1.30 $
+ Date: $Date: 2004/11/24 10:23:47 $
+ Version: $Revision: 1.31 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
/**
* \brief Clear the hash table from given entry AND delete the entry.
* @param entryToRemove Entry to remove AND delete.
+ * \warning Some problems when using under Windows... prefer the use of
+ * Initialize / GetNext methods
*/
bool ElementSet::RemoveEntry( DocEntry* entryToRemove)
{
dbg.Verbose(0, "ElementSet::RemoveEntry: key not present: ");
return false ;
}
+
+/**
+ * \brief Initialise the visit of the Hash table (TagHT)
+ */
+void ElementSet::Initialize()
+{
+ ItTagHT = TagHT.begin();
+}
+
+/**
+ * \brief Get the next entry whil visiting the Hash table (TagHT)
+ * \return The next DocEntry if found, otherwhise NULL
+ */
+DocEntry *ElementSet::GetNextEntry()
+{
+ if (ItTagHT != TagHT.end())
+ {
+ DocEntry *tmp = ItTagHT->second;
+ ++ItTagHT;
+
+ return(tmp);
+ }
+ else
+ {
+ return(NULL);
+ }
+}
+
+//-----------------------------------------------------------------------------
} // end namespace gdcm
Program: gdcm
Module: $RCSfile: gdcmElementSet.h,v $
Language: C++
- Date: $Date: 2004/11/19 18:49:39 $
- Version: $Revision: 1.22 $
+ Date: $Date: 2004/11/24 10:23:47 $
+ 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
// A test is using it thus put it in public (matt)
TagDocEntryHT const & GetTagHT() const { return TagHT; };
+ void Initialize();
+ DocEntry *GetNextEntry();
+
protected:
private:
// Variables
/// Hash Table (map), to provide fast access
TagDocEntryHT TagHT;
+ /// Hash Table (map) iterator, used to visit the TagHT variable
+ TagDocEntryHT::iterator ItTagHT;
friend class Document;
friend class DicomDir; //For accessing private TagHT
Program: gdcm
Module: $RCSfile: gdcmFile.cxx,v $
Language: C++
- Date: $Date: 2004/11/23 11:14:13 $
- Version: $Revision: 1.159 $
+ Date: $Date: 2004/11/24 10:23:47 $
+ Version: $Revision: 1.160 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
*/
void File::Initialise()
{
- WriteMode = WMODE_DECOMPRESSED;
+ WriteMode = WMODE_RGB;
WriteType = WTYPE_IMPL_VR;
- PixelConverter = NULL; //just in case
- Archive = NULL;
+
+ PixelConverter = new PixelConvert;
+ Archive = new DocEntryArchive( HeaderInternal );
if ( HeaderInternal->IsReadable() )
{
ImageDataSize = ImageDataSizeRaw;
}
- PixelConverter = new PixelConvert;
PixelConverter->GrabInformationsFromHeader( HeaderInternal );
-
- Archive = new DocEntryArchive( HeaderInternal );
}
SaveInitialValues();
delete HeaderInternal;
}
HeaderInternal = 0;
-
- DeleteInitialValues();
}
/**
void File::SaveInitialValues()
{
PixelRead = -1; // no ImageData read yet.
- LastAllocatedPixelDataLength = 0;
Pixel_Data = 0;
-
- InitialSpp = "";
- InitialPhotInt = "";
- InitialPlanConfig = "";
- InitialBitsAllocated = "";
- InitialHighBit = "";
-
- InitialRedLUTDescr = 0;
- InitialGreenLUTDescr = 0;
- InitialBlueLUTDescr = 0;
- InitialRedLUTData = 0;
- InitialGreenLUTData = 0;
- InitialBlueLUTData = 0;
-
- if ( HeaderInternal->IsReadable() )
- {
- // the following values *may* be modified
- // by File::GetImageDataIntoVectorRaw
- // we save their initial value.
- InitialSpp = HeaderInternal->GetEntryByNumber(0x0028,0x0002);
- InitialPhotInt = HeaderInternal->GetEntryByNumber(0x0028,0x0004);
- InitialPlanConfig = HeaderInternal->GetEntryByNumber(0x0028,0x0006);
-
- InitialBitsAllocated = HeaderInternal->GetEntryByNumber(0x0028,0x0100);
- InitialHighBit = HeaderInternal->GetEntryByNumber(0x0028,0x0102);
-
- // the following entries *may* be removed from the H table
- // (NOT deleted ...) by File::GetImageDataIntoVectorRaw
- // we keep a pointer on them.
- InitialRedLUTDescr = HeaderInternal->GetDocEntryByNumber(0x0028,0x1101);
- InitialGreenLUTDescr = HeaderInternal->GetDocEntryByNumber(0x0028,0x1102);
- InitialBlueLUTDescr = HeaderInternal->GetDocEntryByNumber(0x0028,0x1103);
-
- InitialRedLUTData = HeaderInternal->GetDocEntryByNumber(0x0028,0x1201);
- InitialGreenLUTData = HeaderInternal->GetDocEntryByNumber(0x0028,0x1202);
- InitialBlueLUTData = HeaderInternal->GetDocEntryByNumber(0x0028,0x1203);
- }
-}
-
-/**
- * \brief restores some initial values
- * \warning not end user intended
- */
-void File::RestoreInitialValues()
-{
- if ( HeaderInternal->IsReadable() )
- {
- // the following values *may* have been modified
- // by File::GetImageDataIntoVectorRaw
- // we restore their initial value.
- if ( InitialSpp != "")
- HeaderInternal->SetEntryByNumber(InitialSpp,0x0028,0x0002);
- if ( InitialPhotInt != "")
- HeaderInternal->SetEntryByNumber(InitialPhotInt,0x0028,0x0004);
- if ( InitialPlanConfig != "")
-
- HeaderInternal->SetEntryByNumber(InitialPlanConfig,0x0028,0x0006);
- if ( InitialBitsAllocated != "")
- HeaderInternal->SetEntryByNumber(InitialBitsAllocated,0x0028,0x0100);
- if ( InitialHighBit != "")
- HeaderInternal->SetEntryByNumber(InitialHighBit,0x0028,0x0102);
-
- // the following entries *may* be have been removed from the H table
- // (NOT deleted ...) by File::GetImageDataIntoVectorRaw
- // we restore them.
-
- if (InitialRedLUTDescr)
- HeaderInternal->AddEntry(InitialRedLUTDescr);
- if (InitialGreenLUTDescr)
- HeaderInternal->AddEntry(InitialGreenLUTDescr);
- if (InitialBlueLUTDescr)
- HeaderInternal->AddEntry(InitialBlueLUTDescr);
-
- if (InitialRedLUTData)
- HeaderInternal->AddEntry(InitialBlueLUTDescr);
- if (InitialGreenLUTData)
- HeaderInternal->AddEntry(InitialGreenLUTData);
- if (InitialBlueLUTData)
- HeaderInternal->AddEntry(InitialBlueLUTData);
- }
-}
-
-/**
- * \brief delete initial values (il they were saved)
- * of InitialLutDescriptors and InitialLutData
- */
-void File::DeleteInitialValues()
-{
-// InitialLutDescriptors and InitialLutData
-// will have to be deleted if the don't belong any longer
-// to the Header H table when the header is deleted...
-
-// FIXME
-// We don't know if the InitialLutData are still in the header or not !
-/* if ( InitialRedLUTDescr )
- delete InitialRedLUTDescr;
-
- if ( InitialGreenLUTDescr )
- delete InitialGreenLUTDescr;
-
- if ( InitialBlueLUTDescr )
- delete InitialBlueLUTDescr;
-
- if ( InitialRedLUTData )
- delete InitialRedLUTData;
-
- if ( InitialGreenLUTData )
- delete InitialGreenLUTData;
-
- if ( InitialBlueLUTData )
- delete InitialBlueLUTData;*/
}
//-----------------------------------------------------------------------------
*/
bool File::WriteBase (std::string const & fileName, FileType type)
{
- if ( PixelRead == -1 && type != ExplicitVR)
+/* if ( PixelRead == -1 && type != ExplicitVR)
{
return false;
- }
+ }*/
std::ofstream* fp1 = new std::ofstream(fileName.c_str(),
std::ios::out | std::ios::binary);
}
// ----------------- End of Special Patch ----------------
- uint16_t grPixel = HeaderInternal->GetGrPixel();
+/* uint16_t grPixel = HeaderInternal->GetGrPixel();
uint16_t numPixel = HeaderInternal->GetNumPixel();;
DocEntry* PixelElement =
{
// we tranformed GrayLevel pixels + LUT into RGB Pixel
PixelElement->SetLength( ImageDataSize );
- }
+ }*/
HeaderInternal->Write(fp1, type);
Program: gdcm
Module: $RCSfile: gdcmFile.h,v $
Language: C++
- Date: $Date: 2004/11/23 11:14:13 $
- Version: $Revision: 1.73 $
+ Date: $Date: 2004/11/24 10:23:47 $
+ Version: $Revision: 1.74 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
void Initialise();
void SaveInitialValues(); // will belong to the future PixelData class
- void RestoreInitialValues(); // will belong to the future PixelData class
- void DeleteInitialValues(); // will belong to the future PixelData class
uint8_t* GetDecompressed();
int ComputeDecompressedPixelDataSizeFromHeader();
/// ==-1 if ImageData never read
int PixelRead;
- /// \brief length of the last allocated area devoided to receive Pixels
- /// ( to allow us not to (free + new) if un necessary )
- size_t LastAllocatedPixelDataLength;
-
- // Initial values of some fields that can be modified during reading process
- // if user asked to transform gray level + LUT image into RGB image
-
- /// \brief Samples Per Pixel (0x0028,0x0002), as found on disk
- std::string InitialSpp;
- /// \brief Photometric Interpretation (0x0028,0x0004), as found on disk
- std::string InitialPhotInt;
- /// \brief Planar Configuration (0x0028,0x0006), as found on disk
- std::string InitialPlanConfig;
-
- // Initial values of some fields that can be modified during reading process
- // if the image was a 'strange' ACR-NEMA
- // (Bits Allocated=12, High Bit not equal to Bits stored +1)
- /// \brief Bits Allocated (0x0028,0x0100), as found on disk
- std::string InitialBitsAllocated;
- /// \brief High Bit (0x0028,0x0102), as found on disk
- std::string InitialHighBit;
-
- // some DocEntry that can be moved out of the H table during reading process
- // if user asked to transform gray level + LUT image into RGB image
- // We keep a pointer on them for a future use.
-
- /// \brief Red Palette Color Lookup Table Descriptor 0028 1101 as read
- DocEntry* InitialRedLUTDescr;
- /// \brief Green Palette Color Lookup Table Descriptor 0028 1102 as read
- DocEntry* InitialGreenLUTDescr;
- /// \brief Blue Palette Color Lookup Table Descriptor 0028 1103 as read
- DocEntry* InitialBlueLUTDescr;
-
- /// \brief Red Palette Color Lookup Table Data 0028 1201 as read
- DocEntry* InitialRedLUTData;
- /// \brief Green Palette Color Lookup Table Data 0028 1202 as read
- DocEntry* InitialGreenLUTData;
- /// \brief Blue Palette Color Lookup Table Data 0028 1203 as read
- DocEntry* InitialBlueLUTData;
-
//
// --------------- end of future PixelData class
//
Program: gdcm
Module: $RCSfile: gdcmPixelConvert.cxx,v $
Language: C++
- Date: $Date: 2004/11/17 19:49:13 $
- Version: $Revision: 1.31 $
+ Date: $Date: 2004/11/24 10:23:47 $
+ 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
return;
}
}
-
+
////// Green round:
LutGreenData = (uint8_t*)header->GetEntryBinAreaByNumber(0x0028, 0x1202 );
if ( ! LutGreenData)
return;
}
}
-
+
////// Blue round:
LutBlueData = (uint8_t*)header->GetEntryBinAreaByNumber( 0x0028, 0x1203 );
if ( ! LutBlueData )
}
}
}
-
+
if(fp) header->CloseFile();
}