[Insight-users] Re: HELP!! DICOM

Luis Ibanez luis . ibanez at kitware . com
Sun, 29 Jun 2003 15:57:47 -0400


Hi Marisa,


It seems that the TXT output was actually done for debugging purposes.
The code responsible for writing those TXT files is now disabled by
#ifdef conditionals.

    The good news is that it is quite simple to have it  back.

---------

Please go to the directory

        Insight/Utilities/DICOMParser

and do the following

1) In the file DICOMAppHelper.cxx
     go to line 18  and uncomment

    //#define DEBUG_DICOM_APP_HELPER

     This will enable the code in lines 279-282

#ifdef DEBUG_DICOM_APP_HELPER
  std::string myfilename(std::string((char*) this->FileName) + 
".header.txt");
  this->HeaderFile.open(myfilename.c_str());
#endif


2) In file DICOMParser.cxx
    go to line 27 and uncomment

   // #define DEBUG_DICOM

   This will enable the code in lines 58-70

#ifdef DEBUG_DICOM
  if (this->ParserOutputFile.is_open())
    {
    this->ParserOutputFile.flush();
    this->ParserOutputFile.close();
    }

  std::string fn(filename);
  std::string append(".parser.txt");
  std::string parseroutput(fn + append);
  // std::string parseroutput(std::string(std::string(filename) + 
std::string(".parser.txt")));
  this->ParserOutputFile.open(parseroutput.c_str()); //, std::ios::app);
#endif


3) Rebuild the DicomApp.



------------------------------------

Regards,


    Luis



---------------------------
marisa aurelio wrote:

> Hi Luiz,
>
> Not long ago when I used the DICOMApp file, giving a dcm file, it 
> produces a
> RAW, a PNG and a TXT file.
>
> But now when I use it, it only produces a RAW and a PNG file.
>
> Where is the TXT file???
>
> What can I do to make appear that TXT again, which contain the
> meta-information about my DICOM file, like it used to ???
>
> Thanks for your time,
>
> Marisa
>