Hello,
Using the storescp, is there anyway to determine the filesize whithout saving the file locally ?
This in order to block huge files ?
Thanks for your help.
StoreScp determine filesize
Moderator: Moderator Team
-
- DCMTK Developer
- Posts: 2504
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: StoreScp determine filesize
No, this is not possible since the "file size" it not known to the SCP before the DICOM dataset has been received completely. Of course, you could modify the source code in order to reject (or just do not save) a dataset that exceeds a certain size. However, both approaches would be bad style in my humble opinion. It would be more standard conformant to decide whether to accept or reject a particular SOP instance based on the associated SOP class and transfer syntax (i.e. the presentation context proposed by the SCU).
-
- Posts: 43
- Joined: Tue, 2005-02-01, 22:53
Re: StoreScp determine filesize
Hello,
Should we always write the files and calculate the file size ?
How to estimate the size of dataset before writing to local drive ?
Thanks for your help.
I agree 100 % with you. This is not the better way to do it ! But in real case, some physician does US sequences which weighs more than 2.5 GB. These type of files crawls the storage area.However, both approaches would be bad style in my humble opinion
Yes, once the complete data received and before invoking the dicomfileformat->SaveFile is there any way to determine the filesize.DICOM dataset has been received completely
Should we always write the files and calculate the file size ?
How to estimate the size of dataset before writing to local drive ?
Thanks for your help.
Re: StoreScp determine filesize
AFAIK, you can use DcmDataset::getLength() to know the size of a dataset.How to estimate the size of dataset before writing to local drive ?
Who is online
Users browsing this forum: Bing [Bot] and 1 guest