comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: MIP routine
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: MIP routine [message #5064] Wed, 27 September 1995 00:00
rmmoss is currently offline  rmmoss
Messages: 12
Registered: August 1995
Junior Member
The VOXEL_PROJ routine should be capable of doing this.

------------
Robert M. Moss, Ph.D.
Texaco Inc.
mossrm@texaco.com

This is not necessarily the opinion of Texaco Inc.
------------

In article <44bl6f$20n@usenet.INS.CWRU.Edu>, miller@amber.uh.cwru.edu (David A. Miller) writes:
|> Does anyone know of a routine in IDL that will allow the user to do a maximum intensity projection of a
|> 3-D data set? I have not been able to find anything using IDL help, although I may not be looking for the
|> right routine name. Any insight in this area would be greatly appreciated.
|>
|> Thanks in advance,
|>
|> Dave Miller
|>
Re: MIP routine [message #5065 is a reply to message #5064] Wed, 27 September 1995 00:00 Go to previous message
phil is currently offline  phil
Messages: 15
Registered: April 1995
Junior Member
In article <44bl6f$20n@usenet.INS.CWRU.Edu> miller@amber.uh.cwru.edu (David A. Miller) writes:

> Does anyone know of a routine in IDL that will allow the user to do a maximum intensity projection of a
> 3-D data set? I have not been able to find anything using IDL help, although I may not be looking for the
> right routine name. Any insight in this area would be greatly appreciated.
>

Dave,

I have written just such a routine and it follows below.

function mip,steps,images,id=id
;+
; NAME: MIP
;
;
; PURPOSE:
; Performs a maximum intensity projection on a given 3D volume
;
; CATEGORY:
; Image processing.
;
; CALLING SEQUENCE:
; Result = mip(steps, images [,id = id])
;
; INPUTS:
; steps: Number of rotations to perform from 0->180 degress.
; images: The 3D volume to perform the mip upon
;
; KEYWORD PARAMETERS:
; id: The id of a text widget to send informational statements
; This is to allow compatiblity with widget calls to mip.
; If not specified statements are sent to the IDL window.
;
; OUTPUTS: none
;
; COMMON BLOCKS: none
;
; SIDE EFFECTS: A call to ROT is issued to perform the rotations.
;
; RESTRICTIONS: images must be a 3D stack.
;
; PROCEDURE:
; Rotates each slice of volume and the perform the MIP algorithm.
;
; EXAMPLE:
; Straightforward
;
; MODIFICATION HISTORY:
; Version 1.0 Created by Phil Williams 5/15/95
;-

info = size(images)
rows = info(1) & cols = info(2) & imgs = info(3)
rot_images = intarr(rows,cols,imgs)
temp = intarr(cols,imgs,rows)
mip1 = intarr(cols,imgs)
mips = intarr(cols,imgs,steps)

;perform the rotation!
delta_angle = 180./float(steps)
for a = 0,steps-1 do begin
angle = delta_angle*float(a)
if Keyword_set(id) then begin
widget_control,id,set_value = "Angle: "+strcompress(angle)
endif else begin
print,'Angle: ',angle
endelse
for i = 0,imgs-1 do begin
if Keyword_set(id) then begin
widget_control,id,set_value = 'Rotating slice:'+strcompress(i)
endif else begin
print,'rotating slice',i
endelse
rot_images(*,*,i) = rot(images(*,*,i),angle,missing=0)
endfor

if Keyword_set(id) then begin
widget_control,id,set_value = 'Performing mip'
endif else begin
print,'Performing mip'
endelse
for i=0,rows-1 do begin
j=0
for k=0,imgs-1 do begin
temp(*,j,i)=rot_images(*,i,k) ;use images here to get original mip!
j=j+1
endfor
endfor

for j=0,cols-1 do begin
for k=0,imgs-1 do begin
mip1(j,k)=max(temp(j,k,*))
endfor
endfor
mips(*,*,a) = mip1
endfor
return,mips
end

;--------end

Hope this helps. Let me know if you have any problems.

Phil
--
/*********************************************************** ****************/
Phil Williams
Postdoctoral Researcher "One man gathers what
MRI Facility another man spills..."
The Ohio State University -The Grateful Dead
email: phil@peace.med.ohio-state.edu
URL: http://justice.med.ohio-state.edu:1525
/*********************************************************** ****************/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: AVI to IDL conversion
Next Topic: MIP routine

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:51:16 PDT 2025

Total time taken to generate the page: 0.00507 seconds