Re: Xinteranimate and dicom [message #77075 is a reply to message #77012] |
Mon, 01 August 2011 09:55   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
M writes:
>
> On Jul 27, 7:59 pm, David Fanning <n...@idlcoyote.com> wrote:
>> M R writes:
>>> I am using Xinteranimate command to produce an animation containing
>>> DICOM images. I have the following error
>>
>>> - Transform_Volume
>>
>>> The code is given below.
>>
>>> fil = file_search('Filepath\DICOM\*', COUNT = count)
>>
>>> image = read_dicom(fil[0])
>>
>>> s = size(image)
>>
>>> arm = make_array(s[1],s[2],count,/nozero)
>>
>>> loadct, 0
>>
>>> xinteranimate, set=[3*s[1],3*s[2],count-20],/showload
>>
>>> for i = 0, 36 do begin
>>
>>> rotData = Transform_Volume(data, Rotation =[0,0, (i*10) MOD 360],
>>> Missing = 0)
>>
>>> TVImage, Reform(Max(rotData, DIMENSION = 1))
>>
>>> XInteranimate, Frame = i, Window = !D.Window
>>
>>> End
>>
>>> Xinteranimate, 50
>>
>>> end
>>
>>> Is it because I am using DICOM images or anything else?
>>
>> You mentioned an error. Did you want to tell us what it was? :-)
>>
>> Cheers,
>>
>> David
>>
>> --
>> David Fanning, Ph.D.
>> Fanning Software Consulting, Inc.
>> Coyote's Guide to IDL Programming:http://www.idlcoyote.com/
>> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
>
> The program gets stuck at transform_volume line with the
> transform_volume code opening in a new window and the pointer at these
> lines.
>
> Catch, theError
> IF theError NE 0 THEN BEGIN
> Catch, /Cancel
> ok = Dialog_Message(!Error.State.Msg)
> RETURN, -1
> ENDIF
>
> Isn't Xinteranimate not compatible with DICOM images? Thank you!
Did you read the error message? My guess is that "data" is undefined
in this line. I least I don't see it defined anywhere in your program.
rotData = Transform_Volume(data,Rotation=[0,0,(i*10) MOD 360], $
Missing = 0)
Did you mean "image"?
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|