Changes between Version 3 and Version 4 of ProjectionObjects


Ignore:
Timestamp:
02/21/13 15:28:41 (12 years ago)
Author:
Jonathan
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • ProjectionObjects

    v3 v4  
    2727 * For more information on the Field sub-object's properties see ProcessingFields
    2828 * If you are making several projections, you can reuse the Projection Pointer (with or without Nullifying it) by calling {{{ CreateProjection(Projection) }}} for each new projection. 
    29  * Also if you wish to use a particular camera viewpoint you can setup a [CameraObjects camera object] as follows:
     29 * If instead of projecting along one of the axis, you wish to use a particular camera viewpoint you can setup a [CameraObjects camera object] as follows:
    3030{{{
    3131   ALLOCATE(Projection%Camera)
     
    3737}}}
    3838
    39  * Here is a full list of the various Projection parameters with the default values
    40 {{{
    41       TYPE(FieldDef) :: Field                                ! Field to use
    42       REAL(KIND=qPREC), DIMENSION(:,:), ALLOCATABLE :: Data  ! column density of field
    43       INTEGER :: dim=3                                       ! projection axis
    44       REAL(KIND=qPREC) :: pow=1d0                            ! Power to raise field value to
    45       LOGICAL :: lReadCameraList=.false.                     ! Can be used instead of a single camera to make movies
    46       INTEGER :: PlotLevel=MAXIMUMPLOTLEVEL                  ! Sets resolution of output to that of PlotLevel. 
    47       TYPE(ShapeDef), POINTER :: Shape => NULL()             ! Optional Shape object which can be used to exclude points outside of shape.
    48       TYPE(ProjectionDef), POINTER :: next   
    49       TYPE(CameraDef), POINTER :: Camera => NULL()           ! Optional camera if image is not along principal axis
    50       TYPE(ImageDef), POINTER :: Image => NULL()             ! Optional image object which will produce a file
    51 }}}
    52 
    53  * At each process event (currently each frame) a bov/dat file pair will be generated in the out directory ie. {{{out/cooling_strength_along_3_00014.bov}}} and {{{out/cooling_strength_along_3_00014.dat}}}.  The {{{.bov}}} file contains information about the data as well as the location of the actual data file {{{.dat}}} which contains the raw unformatted binary data.  Visit will only recognize the {{{.bov}}} files.  After opening the file, there will be a 2D dataset with a single variable '''projection''' that contains the integrated values.
    54 
    55 
    56  * Making movies using the camera list: If Projection%lReadCameraList == .true. then a file camera.data should be present in the run directory.  The first line contains the number of cameras and then there should be that many camera namelists each with properties for the camera for each image should be shown.  The camera%id will be present in the filename... and only the camera properties that change need to be present...  (ie focus, up vector, are inherited from the previous camera - but can be changed)
     39 * If instead of just one camera angle, you would like a sequence of camera angles for every frame you can read in a camera list. If Projection%lReadCameraList == .true. then a file camera.data should be present in the run directory.  The first line contains the number of cameras and then there should be that many camera namelists each with properties for the camera for each image should be shown.  The camera%id will be present in the filename... and only the camera properties that change need to be present...  (ie focus, up vector, are inherited from the previous camera - but can be changed)
    5740 {{{
    5841 60
    5942 &CameraData
    60  MyCamera%pos=  0.0000000E+00   50.00000       50.00000
    61  MyCamera%id=           0
     43 Camera%pos=  0.0000000E+00   50.00000       50.00000
     44 Camera%id=           0
    6245 /
    6346 &CameraData
    64  MyCamera%pos=  0.2739029       44.77357       50.00000
    65  MyCamera%id=           1
     47 Camera%pos=  0.2739029       44.77357       50.00000
     48 Camera%id=           1
    6649 /
    6750 &CameraData
    68  MyCamera%pos=   1.092617       39.60442       50.00000
    69  MyCamera%id=           2
     51 Camera%pos=   1.092617       39.60442       50.00000
     52 Camera%id=           2
    7053 /
    7154 &CameraData
    72  MyCamera%pos=   2.447174       34.54915       50.00000
    73  MyCamera%id=           3
     55 Camera%pos=   2.447174       34.54915       50.00000
     56 Camera%id=           3
    7457 /
    7558 &CameraData
    76  MyCamera%pos=   4.322727       29.66317       50.00000
    77  MyCamera%id=           4
     59 Camera%pos=   4.322727       29.66317       50.00000
     60 Camera%id=           4
    7861 /
    7962...
     
    9578      theta=2d0*acos(-1d0)*real(i)/real(nframes)
    9679      write(*,*) '&CameraData'
    97       write(*,*) 'MyCamera%pos=', focus(1)-r*cos(theta), focus(2)-r*sin(theta), focus(3)
    98       write(*,*) 'MyCamera%id=', i
     80      write(*,*) 'Camera%pos=', focus(1)-r*cos(theta), focus(2)-r*sin(theta), focus(3)
     81      write(*,*) 'Camera%id=', i
    9982      write(*,*) '/'
    10083   END DO
     
    10285
    10386 }}}
     87
     88 * And finally if you want to make a movie where the camera position changes in time, you can create a movie object.
     89
     90{{{
     91   NAMELIST /CameraData/ pos, focus, upvector, time
     92   CALL InitMovie(Projection%movie, nCameras)                                                                                                       
     93   DO i=1,nCameras                                                                                                                                   
     94      READ(PROBLEM_DATA_HANDLE,NML=CameraData)                                                                                                       
     95      CALL AddMovieCamera(Projection%movie, pos, focus, upvector, time)                                                                                           
     96   END DO                                                                                                                                           
     97   CALL FinalizeMovie(Projection%Movie)                                                                                                             
     98END IF                           
     99}}}
     100
     101 where the data file would have
     102{{{
     103&CameraData
     104 pos=  0.0000000E+00   50.00000       50.00000
     105 focus = 0.0 0.0 0.0
     106 upvector = 0.0 1.0 0.0
     107 time=0
     108/
     109&CameraData
     110 pos=  0.0000000E+00   0.00000       50.00000
     111 focus = 0.0 0.0 0.0
     112 upvector = 0.0 1.0 0.0
     113 time=1
     114/
     115}}}
     116 Other camera attributes like field of view, aspect, etc... should be set for the projection's camera object.
     117
     118 * Here is a full list of the various Projection parameters with the default values
     119{{{
     120TYPE(FieldDef) :: Field                                ! Field to use
     121REAL(KIND=qPREC), DIMENSION(:,:), ALLOCATABLE :: Data  ! column density of field
     122REAL(KIND=qPREC) :: pow=1d0                            ! Power to raise field value to
     123INTEGER :: PlotLevel=MAXIMUMPLOTLEVEL                  ! Sets resolution of output to that of PlotLevel. 
     124TYPE(ShapeDef), POINTER :: Shape => NULL()             ! Optional Shape object which can be used to exclude points outside of shape.
     125INTEGER :: dim=3                                       ! projection axis
     126TYPE(CameraDef), POINTER :: Camera => NULL()           ! Optional camera if image is not along principal axis
     127LOGICAL :: lReadCameraList=.false.                     ! Can be used instead of a single camera to make a sequence of projections for each frame
     128TYPE(ImageDef), POINTER :: Movie => NULL()             ! Optional movie object which will produce a sequence of projections from different viewpoints.
     129TYPE(ImageDef), POINTER :: Image => NULL()             ! Optional image object which will produce a ppm file in addition to the bov file.
     130TYPE(ProjectionDef), POINTER :: next   
     131}}}
     132
     133 * At each process event (currently each frame) a bov/dat file pair will be generated in the out directory ie. {{{out/cooling_strength_along_3_00014.bov}}} and {{{out/cooling_strength_along_3_00014.dat}}}.  The {{{.bov}}} file contains information about the data as well as the location of the actual data file {{{.dat}}} which contains the raw unformatted binary data.  Visit will only recognize the {{{.bov}}} files.  After opening the file, there will be a 2D dataset with a single variable '''projection''' that contains the integrated values.
     134
     135 * If you want .ppm files which can be converted to .jpeg using !ImageMagick's convert program, then you need to create the projection's [ImageObject image object]
     136
     137 * You can also use the [wiki:bov2jpeg bov2jpeg] program to quickly turn your bov files into jpeg's outside of astrobear.
     138
     139
     140