Re: fixing DICOM read issues [message #69134] |
Sat, 12 December 2009 12:20 |
dorthe
Messages: 12 Registered: April 2007
|
Junior Member |
|
|
On Dec 12, 11:57 am, David Fanning <n...@dfanning.com> wrote:
> Dorthe Wildenschild writes:
>> hey, but wait a minute....., what resolution (or voxel size) do I end
>> up with then? I measure areas of some features in the image later
>> (using another program), but what is the size of the congridded pixel,
>> then? Say I congrid from (370x400x354) to (361x400x354).I save the
>> congridded volume and use the voxel dimensions to turn a marching
>> cubes estimated area into a physical value using the voxel size.
>
> Well, exactly. This is why I am encouraging you to
> see this as a display problem, rather than monkeying
> around with your data, which is almost always a bad
> idea. :-)
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
unfortunately, I have to monkey with the data... :-) bad idea or not...
|
|
|
Re: fixing DICOM read issues [message #69135 is a reply to message #69134] |
Sat, 12 December 2009 11:57  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Dorthe Wildenschild writes:
> hey, but wait a minute....., what resolution (or voxel size) do I end
> up with then? I measure areas of some features in the image later
> (using another program), but what is the size of the congridded pixel,
> then? Say I congrid from (370x400x354) to (361x400x354).I save the
> congridded volume and use the voxel dimensions to turn a marching
> cubes estimated area into a physical value using the voxel size.
Well, exactly. This is why I am encouraging you to
see this as a display problem, rather than monkeying
around with your data, which is almost always a bad
idea. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: fixing DICOM read issues [message #69136 is a reply to message #69135] |
Sat, 12 December 2009 11:22  |
dorthe
Messages: 12 Registered: April 2007
|
Junior Member |
|
|
On Dec 11, 6:21 am, David Fanning <n...@dfanning.com> wrote:
> Dorthe Wildenschild writes:
>> I am trying to read a stack of DICOM images (.ima format) with IDL and
>> can read in the values just fine (-1054 to 3000), but the voxel
>> scaling is wrong, so my cylindrical object becomes oval. I tried
>> saving the volume from another program and that works well for meshing
>> the slices together and getting the correct data range, but I loose
>> the voxel scaling, so that once I read that simple binary data file
>> into IDL it is stretched incorrectly.
>> My array is 512,512,478, and the scaling in the DICOM file is
>> 0.43,0.43,0.5 in the three dimensions. How do I fix this in IDL so the
>> image has the right shape. Rebin only works for integers of the
>> original size...
>
> This seems more like an image *display* problem to me,
> but if you want to change the size of the data array,
> use CONGRID.
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
hey, but wait a minute....., what resolution (or voxel size) do I end
up with then? I measure areas of some features in the image later
(using another program), but what is the size of the congridded pixel,
then? Say I congrid from (370x400x354) to (361x400x354).I save the
congridded volume and use the voxel dimensions to turn a marching
cubes estimated area into a physical value using the voxel size.
|
|
|
Re: fixing DICOM read issues [message #69137 is a reply to message #69136] |
Sat, 12 December 2009 11:17  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Dorthe Wildenschild writes:
> Thanks, Dave! this is a typical case of Occam's Razor. It is so
> simple, and I was trying to make it complicated. You're right, it's a
> display issue, but since I need to crop out a circular cylinder, I
> needed it to be nice and round. I just congrid'ed it and all my
> problems are solved. Well, at least those related to image processing
> for now :-)
I was just saying that you could have a nice round slice,
without manipulating the data at all by doing something
like this:
TVImage, slice, POSITION=Aspect(1.0)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: fixing DICOM read issues [message #69138 is a reply to message #69137] |
Sat, 12 December 2009 11:03  |
dorthe
Messages: 12 Registered: April 2007
|
Junior Member |
|
|
On Dec 11, 6:21 am, David Fanning <n...@dfanning.com> wrote:
> Dorthe Wildenschild writes:
>> I am trying to read a stack of DICOM images (.ima format) with IDL and
>> can read in the values just fine (-1054 to 3000), but the voxel
>> scaling is wrong, so my cylindrical object becomes oval. I tried
>> saving the volume from another program and that works well for meshing
>> the slices together and getting the correct data range, but I loose
>> the voxel scaling, so that once I read that simple binary data file
>> into IDL it is stretched incorrectly.
>> My array is 512,512,478, and the scaling in the DICOM file is
>> 0.43,0.43,0.5 in the three dimensions. How do I fix this in IDL so the
>> image has the right shape. Rebin only works for integers of the
>> original size...
>
> This seems more like an image *display* problem to me,
> but if you want to change the size of the data array,
> use CONGRID.
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Thanks, Dave! this is a typical case of Occam's Razor. It is so
simple, and I was trying to make it complicated. You're right, it's a
display issue, but since I need to crop out a circular cylinder, I
needed it to be nice and round. I just congrid'ed it and all my
problems are solved. Well, at least those related to image processing
for now :-)
Cheers,
Dorthe
|
|
|
Re: fixing DICOM read issues [message #69156 is a reply to message #69138] |
Fri, 11 December 2009 06:21  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Dorthe Wildenschild writes:
> I am trying to read a stack of DICOM images (.ima format) with IDL and
> can read in the values just fine (-1054 to 3000), but the voxel
> scaling is wrong, so my cylindrical object becomes oval. I tried
> saving the volume from another program and that works well for meshing
> the slices together and getting the correct data range, but I loose
> the voxel scaling, so that once I read that simple binary data file
> into IDL it is stretched incorrectly.
> My array is 512,512,478, and the scaling in the DICOM file is
> 0.43,0.43,0.5 in the three dimensions. How do I fix this in IDL so the
> image has the right shape. Rebin only works for integers of the
> original size...
This seems more like an image *display* problem to me,
but if you want to change the size of the data array,
use CONGRID.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|