Dicom-how to set "origin and transformation" for the "multi-frame single file" dicom file?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Dicom-how to set "origin and transformation" for the "multi-frame single file" dicom file?

WangPing
sorry to bother everyone but this is a dicom question:

I used Matlab to create a multiframe single file, the data came from a DICOM series (separate image files) acquired on scanner.
I first used "dicominfo" to read one of the individual image file to get the dicom metadata information,

dcm_info = dicominfo([dicompath 'IM_0001']);

then used dicomwrite to write a multiframe single file,

dicomwrite(V3D, 'multiframe.dcm', dcm_info, 'MultiframeSingleFile', true, 'CreateMode', 'copy');


Everything looks good with the multiframe file but it turned out that the information of origin and transformation were lost. Does anyone know how to set such information (origin and transformation) to the "multiframe single file" dicom?

many thanks
Ping Wang


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Dicom-how to set "origin and transformation" for the "multi-frame single file" dicom file?

Fred Damen
Greetings Ping,

My first question would be, why do this?  The solution to your underlying
problem may be different than solving this problem.  The reason I say this
is most usage of multi frame DICOM data converts the DICOM files into some
application specific format, and then uses that format, e.g., NIFTI/AFNI.
Others just read in the individual DICOM files and massage them into the
internal format (selfish plug for DICOM_open ImageJ plugin).

Each DICOM file is a database record, where the image data is one of the
tag's value.  The other tags will correspond to the original data, i.e.,
slice thickness and number of volumes will need to be reconjiggered to
that of the new multi-volume.  If you want to accomplish what you are
asking, then I would look into dcn4che.  It is a set of Java programs /
tools for all sorts of DICOM stuff (files, servers, etc).  Otherwise look
into Oserix/Herous as they are kitchen sinc programmable DICOM browsers,
etc - only on Mac(s) though.

Enjoy,

Fred

On Wed, February 12, 2020 12:05 pm, Wang Ping wrote:

> sorry to bother everyone but this is a dicom question:
>
> I used Matlab to create a multiframe single file, the data came from a
> DICOM series (separate image files) acquired on scanner.
> I first used "dicominfo" to read one of the individual image file to get
> the dicom metadata information,
>
> dcm_info = dicominfo([dicompath 'IM_0001']);
>
> then used dicomwrite to write a multiframe single file,
>
> dicomwrite(V3D, 'multiframe.dcm', dcm_info, 'MultiframeSingleFile', true,
> 'CreateMode', 'copy');
>
>
> Everything looks good with the multiframe file but it turned out that the
> information of origin and transformation were lost. Does anyone know how
> to set such information (origin and transformation) to the "multiframe
> single file" dicom?
>
> many thanks
> Ping Wang
>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

回复: Dicom-how to set "origin and transformation" for the "multi-frame single file" dicom file?

WangPing
Thanks Fred, I am doing this because the a single file (multi-frame) is much convenient to deal with than hundreds of (individual) files. I actually prefer to use nifti but just the collaborated clinicians they wanted dicom 🙂

________________________________
发件人: ImageJ Interest Group <[hidden email]> 代表 Fred Damen <[hidden email]>
发送时间: 2020年2月13日 3:32
收件人: [hidden email] <[hidden email]>
主题: Re: Dicom-how to set "origin and transformation" for the "multi-frame single file" dicom file?

Greetings Ping,

My first question would be, why do this?  The solution to your underlying
problem may be different than solving this problem.  The reason I say this
is most usage of multi frame DICOM data converts the DICOM files into some
application specific format, and then uses that format, e.g., NIFTI/AFNI.
Others just read in the individual DICOM files and massage them into the
internal format (selfish plug for DICOM_open ImageJ plugin).

Each DICOM file is a database record, where the image data is one of the
tag's value.  The other tags will correspond to the original data, i.e.,
slice thickness and number of volumes will need to be reconjiggered to
that of the new multi-volume.  If you want to accomplish what you are
asking, then I would look into dcn4che.  It is a set of Java programs /
tools for all sorts of DICOM stuff (files, servers, etc).  Otherwise look
into Oserix/Herous as they are kitchen sinc programmable DICOM browsers,
etc - only on Mac(s) though.

Enjoy,

Fred

On Wed, February 12, 2020 12:05 pm, Wang Ping wrote:

> sorry to bother everyone but this is a dicom question:
>
> I used Matlab to create a multiframe single file, the data came from a
> DICOM series (separate image files) acquired on scanner.
> I first used "dicominfo" to read one of the individual image file to get
> the dicom metadata information,
>
> dcm_info = dicominfo([dicompath 'IM_0001']);
>
> then used dicomwrite to write a multiframe single file,
>
> dicomwrite(V3D, 'multiframe.dcm', dcm_info, 'MultiframeSingleFile', true,
> 'CreateMode', 'copy');
>
>
> Everything looks good with the multiframe file but it turned out that the
> information of origin and transformation were lost. Does anyone know how
> to set such information (origin and transformation) to the "multiframe
> single file" dicom?
>
> many thanks
> Ping Wang
>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html