[Dcmlib] Re: writtable or not
Jean-Pierre Roux
Jean-Pierre.Roux at creatis.insa-lyon.fr
Mon Jan 2 16:09:47 CET 2006
acid wrote:
>Dear sir,
>I use
>if(!m_dicom->IsReadable())
>{
> printf("It's not a dicom.\n");
> m_dicom->Delete();
>
> return false;
>}
>to tell whether the input is readable,
>and it works.
>
>
After reading a file, you *need* to bring the pixels into RAM, using
GetImageData().
If you don't do so, the written image will result to be broken.
>But when I use
>if(!m_dicomWrite->Write(m_out.c_str()) )
>{
> printf("not writable\n");
> return false;
>}
>
>it does not work,
>I mean it will write something out no matter the extension of the output is dicom extension or not,
>
>
The DICOM norm specifies that the file names must *not* be meaningfull.
A DICOM images may have a .DCM extention (or a .NEMA, or a .IMA, or a
.ACR, ...) or no extention at all.
It's up to you to choose.
Jean-Pierre.
>I wonder if you can specify a function for me to tell whether the format is right.
>Sorry for keeping bothering you.
>
>
>Thank you very much.
>
>Sincerely,Alison
>
>
>
More information about the Dcmlib
mailing list