title: Save a bmp file as dicom using dcmtk
body: <p>I have a dicom image which I converted to tiff using DCMTK and have done some image processing. I have the result image as .bmp,But I wanna know if its possible to save it as .dcm with all the properties of the original source file. My sample code is:-</p>
  
  <pre><code>    // for converting dcm to tiff//
      ///src_path is the path for the diccom image///
         src_dcm = new DicomImage(src_path);
      if (src_dcm != NULL)
      {
          if (src_dcm-&gt;getStatus() == EIS_Normal)
          {
              if (src_dcm-&gt;isMonochrome())
              {
                  src_dcm-&gt;setMinMaxWindow();
                  Uint8 *pixelData = (Uint8 *)(src_dcm-&gt;getOutputData(16 /* bits */));
                  if (pixelData != NULL)
                  {
                      src_dcm-&gt;writeBMP("source.tiff",24);  /* do something useful with the pixel data */
                  }
              }
          }
          else
              cerr &lt;&lt; "Error: cannot load DICOM image (" &lt;&lt; DicomImage::getString(src_dcm-&gt;getStatus()) &lt;&lt; ")" &lt;&lt; endl;
      }
  </code></pre>
  
  <p>After processing, I have the result image in IplImage* mask. I am now saving it as .bmp but I would like to save it as .dcm with all the properties( instance umber,xy columns,,etc) of the source dicom image.</p>