dicom-contour icon indicating copy to clipboard operation
dicom-contour copied to clipboard

fill_contour does not exist

Open wantinghuang opened this issue 4 years ago • 3 comments

Hi, in tutorial.ipynb, it mentioned fill_contour in FILLING CONTOUR ARRAYS section. This function does not exist in dicom_contour.contour. Is there any alternative function to achieve the same goal? Thanks in advance.

wantinghuang avatar Jun 30 '20 09:06 wantinghuang

Hi,

I updated the source to no longer need fill_contour. Use get_mask instead that does all the work. It would be great if the original author updated the documentation and would release the python package. This is my sample code:

    roi = dyc.get_mask(image_path, contour_filename, 0)

This will get all masks for the first contour, contour_filename is a full path+filename

Marcel

marcelvanherk avatar Sep 26 '20 20:09 marcelvanherk

Hello @marcelvanherk, i tried your workaround but if I do, I get the error:

AttributeError: 'FileMetaDataset' object has no attribute 'TransferSyntaxUID'

I know this error, usually it can be avoided with setting the metadata yourself by using:

contour_file.TransferSyntaxUID = pydicom.uid.ImplicitVRLittleEndian

This does not seem to work here, would you happen to know a workaround?

BR

TG-Unit avatar Nov 01 '20 19:11 TG-Unit

Hi. What dataset are you using? And in what line does the error occur?

On Sun, 1 Nov 2020, 19:31 TG-Unit, [email protected] wrote:

Hello @marcelvanherk https://github.com/marcelvanherk, i tried your workaround but if I do, I get the error:

AttributeError: 'FileMetaDataset' object has no attribute 'TransferSyntaxUID'

I know this error, usually it can be avoided with setting the metadata yourself by using:

contour_file.TransferSyntaxUID = pydicom.uid.ImplicitVRLittleEndian

This does not seem to work here, would you happen to know a workaround?

BR

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/KeremTurgutlu/dicom-contour/issues/8#issuecomment-720139424, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVDWJJPIMAJOLBG2KIFH4TSNWZS7ANCNFSM4OMAPIKQ .

marcelvanherk avatar Nov 01 '20 23:11 marcelvanherk