NII -> DICOM
Moderator: Moderator Team
NII -> DICOM
Hello everybody first of all, this is my first post here. I hope you can help me with a problem I have! This is my workflow:
DICOM -> NIFTY -> edit nifty file (add maps etc.) -> DICOM
My problem is the conversion back into DICOM. Do you have any suggestion how to realize this? I know that there are programs which can do this but I need to process huge amounts of files automaticly (script).
Regarding the header it would maybe be smart to be able to take the header of the original file and edit it.
Best,
C
DICOM -> NIFTY -> edit nifty file (add maps etc.) -> DICOM
My problem is the conversion back into DICOM. Do you have any suggestion how to realize this? I know that there are programs which can do this but I need to process huge amounts of files automaticly (script).
Regarding the header it would maybe be smart to be able to take the header of the original file and edit it.
Best,
C
-
- DCMTK Developer
- Posts: 2052
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Re: NII -> DICOM
Hi,
what is "nifty"?
If you like to edit the header of the new images, you might use dcmodify that comes with DCMTK.
Best,
Michael
what is "nifty"?
If you like to edit the header of the new images, you might use dcmodify that comes with DCMTK.
Best,
Michael
-
- DCMTK Developer
- Posts: 2506
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: NII -> DICOM
Thanks for posting the link.
Michael: Thanks - even though I guess that editing the header will be the smalles problem I have to face.
Michael: Thanks - even though I guess that editing the header will be the smalles problem I have to face.
-
- DCMTK Developer
- Posts: 2052
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Re: NII -> DICOM
Now that I know nifty, I agree. I guess nobody from the DICOM team in OFFIS has experience with that, maybe some forum users know something, good luck
Re: NII -> DICOM
It is difficult, and dangerous. Be aware that the nifti format usually lacks some critical information that DICOM needs, and safely restoring a proper DICOM volume from a nifti volume is not possible as a general case.
If you have a known, fixed workflow, as I think is what you described, you can restore a DICOM series by utilizing information from the original DICOM series. However, to do this you need to not only know what you are doing, but also make sure you restrict the freedom to change things around while the data is in the nifti stage.
If you have a known, fixed workflow, as I think is what you described, you can restore a DICOM series by utilizing information from the original DICOM series. However, to do this you need to not only know what you are doing, but also make sure you restrict the freedom to change things around while the data is in the nifti stage.
Re: NII -> DICOM
Yes, I'm aware of the lower information content of the nifti format. I do have a fixed workflow. I thought about taking information which is still the same (age, sex...) from the original file and edit the critical fields. Its also "just" for research purposes so no patient is in danger.
Could you outline your idea how to achieve the conversion, Per?
Could you outline your idea how to achieve the conversion, Per?
Re: NII -> DICOM
Basically, just export the nifti data that you have to DICOM using the official niftilib, then fill in the holes with data supplied from the original DICOM series.
Incidentially, I have been writing a program to do such a conversion, but I never finished it. Since it looks like weather will turn sour this weekend, I might just feel inspired to complete it If not, I can turn the unfinished code over to you. Unfortunately, it is not written using DCMTK.
Nag me if I forget.
Incidentially, I have been writing a program to do such a conversion, but I never finished it. Since it looks like weather will turn sour this weekend, I might just feel inspired to complete it If not, I can turn the unfinished code over to you. Unfortunately, it is not written using DCMTK.
Nag me if I forget.
Re: NII -> DICOM
Either way .. that would really help Per, thanks! I'll send you a PM with my email.
have a nice weekend everybody!
have a nice weekend everybody!
Re: NII -> DICOM
Am I blind or is there no PM system integrated in this forum? Anyway - Per I would still be happy about any line of code you already did. Maybe you can upload it somewhere?
-
- DCMTK Developer
- Posts: 2052
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Re: NII -> DICOM
Hi C,
we disabled PM due to SPAM misuse. Since we now only permit manual registration for the same reason, we will discuss enabling PM in the future.
Best,
Michael
we disabled PM due to SPAM misuse. Since we now only permit manual registration for the same reason, we will discuss enabling PM in the future.
Best,
Michael
Re: NII -> DICOM
This turned out to be a fine weekend, so I did not feel inclined to do much programming, but I have something that "should have worked" now, except it doesn't, and I just need to figure out why. If you just want some example code, you can look at http://gitorious.org/zzdicom (see nifti directory). I will let you know when I have something that at least passes my own tests.Per wrote:Since it looks like weather will turn sour this weekend, I might just feel inspired to complete it
Re: NII -> DICOM
Now it should work. Mind you, it will only work with modern multi-frame DICOM files.
To use, run
To use, run
Then edit 'mynewniftifile'. Finally,./zzdcm2nifti mydicomfile mynewniftifile
Now 'mynewdicomfile' should contain your modifications to 'mynewniftifile' but still be a valid DICOM file with good positioning information../zzniftistitch mydicomfile mynewniftifile mynewdicomfile
Re: NII -> DICOM
Thanks a lot! I will have a look at it this weekend!
-
- Posts: 24
- Joined: Thu, 2013-01-10, 16:40
Re: NII -> DICOM
In the your case, you must convert to DICOM to NII file. What is library name that is used to convert? Because I want to convert to DICOM to NII in C++. Thank you
Who is online
Users browsing this forum: Baidu [Spider], Bing [Bot] and 1 guest