New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
save as the dicom but doesn't show in dicompyler or other software #821
Comments
Could you explain in a bit more detail what problem you're having? Also "RT Structure Set Storage" is not a valid UID |
Hello, thank your reply. |
Here is the RT-dicom file. |
This is certainly not right - this is the SOPClassUID, not the SOPInstanceUID
As has been already mentioned, you need a UID here ('1.2.840.10008.5.1.4.1.1.481.3' in this case)
Same here, use
Same as above.
Are you sure you want to write BigEndian data? This is deprecated in DICOM for a long time now
So where's the actual RTStruct data coming from? |
I did the work for CT-image segmentation, and I have lots of CT image from my partner who is a imaging doctor. |
It would help if you could attach the problematic file - I think you intented to, but the file did not get attached. |
Here is my whole code. |
Could you get the file? I am not sure it is upload successfully. |
There is nothing uploaded yet. |
[non-anonymised data removed - scaramallion] Yeah, It is successful to upload. |
Ok, this time it worked. At a first glance, the DICOM file is at least readable, though it seems to have the incorrect SOPClassUID (CTImageStorage instead of RTStructureSetStorage). I will have another look later. |
Ok, and the MediaStorageSOPClassUID and MediaStorageSOPInstanceUID are reversed, as I already mentioned above. The rest of the tags looks look ok to me (given that the referenced UIDs are correct, of course). Also, I don't know what Windows 2D software you are using - if this is software to handle RT Structure Sets, it should work, otherwise, RTStructs have no pixel data, so there can be no images shown. |
Ah, and also don't use Big Endian - use Little Endian instead (as mentioned above), I'm not sure if all software still supports Big Endian data. |
As long as the the file can be read by pydicom, dicompyler shouldn't have a problem reading it, as it uses pydicom internally.
…Sent from my iPhone
On Mar 16, 2019, at 11:01, mrbean-bremen ***@***.***> wrote:
Ah, and also don't use Big Endian - use Little Endian instead (as mentioned above), I'm not sure if all software supports Big Endian data.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
There are the CT image and RS(5.6M in '2013-03-12 2013.28. npc' dir) from doctor and RTSTRUCT (57K) I created. And I want to show the mask wrote in ContourData like RS file. [non-anonymised dataset removed - scaramallion] |
So, did you make the changes? |
RTSTRUCT(57K) is the new dicom test file that predicted by our models. And what is your 'changes' refer to |
I mean this. |
yeah, I have done that.
|
The figure 1 is my created RT file opend with Notepad++. Figure 2 is the doctor's file [non-anonymised data removed - scaramallion] |
Ah ok, this is a more concrete error, thanks. Looks like something is still wrong in the meta header. I will have a closer later. |
I also use the doctor's RT file for the 'body', and I changed some message to 'create' the RT file. I can change the PatientID and other tag's value.When I change the Sequence such as ReferencedFrameOfReferenceSequence, something will be wrong. |
Ok, I had another look, and still not sure what's wrong in the file meta. Apart from a missing group length, and the problems I already mentioned (which you have appearently fixed), I don't see anything looking too wrong. Can you please check which version of pydicom you are using? I can't relate the callstack in your comment to a version. |
So there is a bug in the released version of dicompyler that doesn't read some malformed DICOM data. This was fixed in pydicom probably some time ago. However, using the latest source version of dicompyler in combination with pydicom, the data is able to be parsed and read successfully. FYI, the data that has been uploaded has not been anonymized, so I would consider deleting it from the thread. |
The version I used is 1.2.0. |
@wangjiangyuan please don't upload non-anonymised data |
@scaramallion Thank you for reminding me. I will delete it and upload the anonymised data. |
I don't know what you used to anonymise the datasets but the results are non-conformant.
Amongst many others |
I think your file has the wrong SOPClassUID for the newly created RTSTRUCT. It should be set to |
And its still not anonymised completely, check the 1111/2013-03-12 2013.28. npc folder |
Maybe I should use another soft to anonymise my datasets. |
I forgot to mention, he/she did anonymize the data properly. They need to remove this file from the zip: |
Almost all of the time when there have been issues like yours its because the dataset was non-conformant.
For instance, if you have an element with a VR of 'UI' then its value must meet the requirements of the UI entry in Table 6.2-1 (ASCII characters '0-9' and '.', 64 maximum characters, no components starting with 0 unless the component itself is 0). |
Argh - for some reason I was under the impression that these are fake patient data, should have noticed that! |
@wangjiangyuan - did you get anywhere with your problem? |
@wangjiangyuan, am closing this to try to clean up our issues list. If not resolved, please reopen. |
Description
I created a dicom file in pydicom,
I used the code to write.
I wrote the dicom file in pydicom as that message and it is showed in pydicom as follow:
The dicom file just 79 kb, I don't know how to get a correct format.
Please help me,thanks
code:
(3006, 002a) ROI Display Color IS: ['0', '147', '0']
(3006, 0040) Contour Sequence 12 item(s) ----
(3006, 0016) Contour Image Sequence 1 item(s) ----
(0008, 1150) Referenced SOP Class UID UI: CT Image Storage
(0008, 1155) Referenced SOP Instance UID UI: 1.3.6.1.4.1.2452.6.3054396209.xxxxxxxx.1983321519.xxxxxxxxx
---------
(3006, 0042) Contour Geometric Type CS: 'CLOSED_PLANAR'
(3006, 0046) Number of Contour Points IS: "58"
(3006, 0048) Contour Number IS: "1"
(3006, 0050) Contour Data DS: ['24.671679', '-57.148172', '31.000000', '25.532824', '-57.054517', '31.000000', '26.378794', '-56.868305', '31.000000', '27.199673', '-56.591719', '31.000000', '27.985835', '-56.228001', '31.000000', '28.728064', '-55.781417', '31.000000', '29.417658', '-55.257201', '31.000000', '30.046531', '-54.661501', '31.000000', '30.607312', '-54.001299', '31.000000', '31.093425', '-53.284336', '31.000000', '31.499171', '-52.519018', '31.000000', '31.819793', '-51.714317', '31.000000', '32.051532', '-50.879669', '31.000000', '32.191671', '-50.024857', '31.000000', '32.238568', '-49.159905', '31.000000', '32.191671', '-48.294953', '31.000000', '32.051532', '-47.440141', '31.000000', '31.819793', '-46.605493', '31.000000', '31.499171', '-45.800792', '31.000000', '31.093425', '-45.035474', '31.000000', '30.607312', '-44.318511', '31.000000', '30.046531', '-43.658309', '31.000000', '29.417658', '-43.062609', '31.000000', '28.728064', '-42.538393', '31.000000', '27.985835', '-42.091809', '31.000000', '27.199673', '-41.728091', '31.000000', '26.378794', '-41.451505', '31.000000', '25.532824', '-41.265293', '31.000000', '24.671679', '-41.171638', '31.000000', '23.805456', '-41.171638', '31.000000', '22.944312', '-41.265293', '31.000000', '22.098341', '-41.451505', '31.000000', '21.277462', '-41.728091', '31.000000', '20.491300', '-42.091809', '31.000000', '19.749071', '-42.538393', '31.000000', '19.059477', '-43.062609', '31.000000', '18.430604', '-43.658309', '31.000000', '17.869823', '-44.318511', '31.000000', '17.383710', '-45.035474', '31.000000', '16.977964', '-45.800792', '31.000000', '16.657342', '-46.605493', '31.000000', '16.425603', '-47.440141', '31.000000', '16.285464', '-48.294953', '31.000000', '16.238568', '-49.159905', '31.000000', '16.285464', '-50.024857', '31.000000', '16.425603', '-50.879669', '31.000000', '16.657342', '-51.714317', '31.000000', '16.977964', '-52.519018', '31.000000', '17.383710', '-53.284336', '31.000000', '17.869823', '-54.001299', '31.000000', '18.430604', '-54.661501', '31.000000', '19.059477', '-55.257201', '31.000000', '19.749071', '-55.781417', '31.000000', '20.491300', '-56.228001', '31.000000', '21.277462', '-56.591719', '31.000000', '22.098341', '-56.868305', '31.000000', '22.944312', '-57.054517', '31.000000', '23.805456', '-57.148172', '31.000000']
Steps/Code to Reproduce
Expected Results
Actual Results
Versions
The text was updated successfully, but these errors were encountered: