# ACR/NEMA to DICOM Convertor!~ - DICOM

This is a discussion on ACR/NEMA to DICOM Convertor!~ - DICOM ; This is taking much longer than I had anticipated and so I am extending a request for some ideas. I am trying to write a little utility which will make an ACR/NEMA data file appears the same as a DICOM ...

# Thread: ACR/NEMA to DICOM Convertor!~

1. ## ACR/NEMA to DICOM Convertor!~

This is taking much longer than I had anticipated and so I am extending
a request for some ideas.

I am trying to write a little utility which will make an ACR/NEMA data
file appears the same as a DICOM file to a third party program, binary
image wise that is... I am having great difficulty determining when I
need to flip the image and when it is not necessary.

I was able to get the unit vectors worked out ok, as well as the
positioning (top left corner) calculated ok... But I am having problem
determining flipping rules..

For example...

Axial DICOM image has the orientation vectors, (1,0,0) (0,1,0)
Axial ACR/NEMA image has the orientation vectors, (1,0,0) (0,1,0) when
the axes are flipped (in this case, Y -> -Y), the orientation vectors
become (1,0,0) (0,-1,0) ... for the same axial ACR/NEMA image.

Therefore, if I wanted to superimpose the two images on top of each
others, I need to flip the image in the "y" direction... is that
correct? Also, how would this rule extend to obligue angle, that is an
angle of say Axial -> Coronal angle of 20 degrees.
Any ideas or hints on this issue are greatly appreciated.

Ammar.

2. ## Re: ACR/NEMA to DICOM Convertor!~

Hi Ammar

See the source of appsrc/dcfile/antodc.cc in my dicom3tools.

The only difference between positioning and orientation in
ACR-NEMA versus DICOM is that the former is gantry relative
and the latter patient relative, hence the head or feet
first and prone or supine positioning make a difference.

Note that there is not always sufficient information in the
header to make this determination reliably.

David

Ammar wrote:

> This is taking much longer than I had anticipated and so I am extending
> a request for some ideas.
>
> I am trying to write a little utility which will make an ACR/NEMA data
> file appears the same as a DICOM file to a third party program, binary
> image wise that is... I am having great difficulty determining when I
> need to flip the image and when it is not necessary.
>
> I was able to get the unit vectors worked out ok, as well as the
> positioning (top left corner) calculated ok... But I am having problem
> determining flipping rules..
>
> For example...
>
> Axial DICOM image has the orientation vectors, (1,0,0) (0,1,0)
> Axial ACR/NEMA image has the orientation vectors, (1,0,0) (0,1,0) when
> the axes are flipped (in this case, Y -> -Y), the orientation vectors
> become (1,0,0) (0,-1,0) ... for the same axial ACR/NEMA image.
>
> Therefore, if I wanted to superimpose the two images on top of each
> others, I need to flip the image in the "y" direction... is that
> correct? Also, how would this rule extend to obligue angle, that is an
> angle of say Axial -> Coronal angle of 20 degrees.
> Any ideas or hints on this issue are greatly appreciated.
>
> Ammar.
>

3. ## Re: ACR/NEMA to DICOM Convertor!~

David,

I am trying to unzip the package
dicom3tools_1.00.snapshot.20041026.helgray.tar.gz with both tar on
cygwin or linux as well as using the winzip on window but I am having
problems such as "Can not open file:it does not appear to be avalid
archive." when I try to unzip with Windows...

Do you require certain commandline? By the way, I download it from
Windows XP machine to local to test with cygwin or unzip or I download
it through the same machine to a mapped drive linux box.

Thanks so much for your help with this one. All of my data is acquired
HFS so hopefully that will not be an issue.

Regards,

Ammar.

4. ## Re: ACR/NEMA to DICOM Convertor!~

It is not a gzip file, it is a bzip2 file and has a bz2 extension.

e.g.:

wget http://www.dclunie.com/dicom3tools/w...elgray.tar.bz2
bzcat <http://www.dclunie.com/dicom3tools/w...elgray.tar.bz2 | tar -xvf -

David

Ammar wrote:

> David,
>
> I am trying to unzip the package
> dicom3tools_1.00.snapshot.20041026.helgray.tar.gz with both tar on
> cygwin or linux as well as using the winzip on window but I am having
> problems such as "Can not open file:it does not appear to be avalid
> archive." when I try to unzip with Windows...
>
> Do you require certain commandline? By the way, I download it from
> Windows XP machine to local to test with cygwin or unzip or I download
> it through the same machine to a mapped drive linux box.
>
> Thanks so much for your help with this one. All of my data is acquired
> HFS so hopefully that will not be an issue.
>
> Regards,
>
> Ammar.
>

5. ## Re: ACR/NEMA to DICOM Convertor!~

Sorry, typo, that obviously should be:

wget http://www.dclunie.com/dicom3tools/w...elgray.tar.bz2

bzcat
David

David Clunie wrote:

> It is not a gzip file, it is a bzip2 file and has a bz2 extension.
>
> e.g.:
>
> wget
> http://www.dclunie.com/dicom3tools/w...elgray.tar.bz2
>
> bzcat
> <http://www.dclunie.com/dicom3tools/w...elgray.tar.bz2
> | tar -xvf -
>
> David
>
> Ammar wrote:
>
>> David,
>>
>> I am trying to unzip the package
>> dicom3tools_1.00.snapshot.20041026.helgray.tar.gz with both tar on
>> cygwin or linux as well as using the winzip on window but I am having
>> problems such as "Can not open file:it does not appear to be avalid
>> archive." when I try to unzip with Windows...
>>
>> Do you require certain commandline? By the way, I download it from
>> Windows XP machine to local to test with cygwin or unzip or I download
>> it through the same machine to a mapped drive linux box.
>>
>> Thanks so much for your help with this one. All of my data is acquired
>> HFS so hopefully that will not be an issue.
>>
>> Regards,
>>
>> Ammar.
>>

>