C++********************************************************************* C C VOMD.F C C ********************************************************************** C=* FROM: SPIDER - MODULAR IMAGE PROCESSING SYSTEM. AUTHOR: J.FRANK * C=* Copyright (C) 1985-2005 Health Research Inc. * C=* * C=* HEALTH RESEARCH INCORPORATED (HRI), * C=* ONE UNIVERSITY PLACE, RENSSELAER, NY 12144-3455. * C=* * C=* Email: spider@wadsworth.org * C=* * C=* This program is free software; you can redistribute it and/or * C=* modify it under the terms of the GNU General Public License as * C=* published by the Free Software Foundation; either version 2 of the * C=* License, or (at your option) any later version. * C=* * C=* This program is distributed in the hope that it will be useful, * C=* but WITHOUT ANY WARRANTY; without even the implied warranty of * C=* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * C=* General Public License for more details. * C=* * C=* You should have received a copy of the GNU General Public License * C=* along with this program; if not, write to the * C=* Free Software Foundation, Inc., * C=* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * C=* * C ********************************************************************** C C CREATE ANGULAR DOCUMENT FILE FROM THE AP MD OUTPUT 07/12/93 C CHANGED TO NEW FORMAT OF THE AP MD OUTPUT DOC FILE 08/05/99 C PSI INVERTED C MIRRORED IMAGES HAVE NEGATIVE SIGN 10/21/99 C UNASSIGNED IMAGES MARKED BY 0 C C23456789012345678901234567890123456789012345678901234567890123456789012 C--********************************************************************* SUBROUTINE VOMD INCLUDE 'CMBLOCK.INC' COMMON DUMMY(1024),X(6),Y(0:3),AAA(6,1) CHARACTER*81 DOCFIL CHARACTER*1 NULL DATA NDOC,NDOUT/55,56/ #ifdef USE_MPI include 'mpif.h' INTEGER MYPID, COMM, MPIERR COMM = MPI_COMM_WORLD MPIERR = 0 CALL MPI_COMM_RANK(COMM, MYPID, MPIERR) #else MYPID = -1 #endif NULL=CHAR(0) CALL FILERD(DOCFIL,NLETI,NULL,'ANGULAR DOCUMENT',IRTFLG) IF(IRTFLG.EQ.-1) RETURN K=0 K2=1 778 LERR=-1 KP1=K+1 CALL UNSAV(DOCFIL,K,NDOC,KP1,AAA(1,KP1),3,LERR,K2) IF(LERR.EQ.0) THEN K=K+1 GOTO 778 ENDIF CLOSE(NDOC) CALL FILERD & (DOCFIL,NLETI,NULL,'OUTPUT FROM AP MD/RD/RN DOCUMENT',IRTFLG) IF (IRTFLG.EQ.-1) RETURN NLIST=4 K=0 K2=1 779 LERR=-1 KP1=K+1 CALL UNSAV(DOCFIL,K,NDOC,KP1,X,6,LERR,K2) IF(LERR.EQ.0) THEN K=K+1 MM=X(1) IF(MM.NE.0) THEN Y(1)=-X(3)+360.0 IF(MM.LT.0) THEN MM=-MM Y(1)=Y(1)+180.0 Y(2)=180.0-AAA(2,MM) Y(3)=AAA(3,MM)+180.0 ELSE Y(2)=AAA(2,MM) Y(3)=AAA(3,MM) ENDIF IF(Y(1).GE.360.0) Y(1)=Y(1)-360.0 IF(Y(3).GE.360.0) Y(3)=Y(3)-360.0 Y(0)=X(6) CALL SAVD(NDOUT,Y,NLIST,IRTFLG) IF(IRTFLG.EQ.-1) GOTO 5 ENDIF GOTO 779 ENDIF 5 CALL SAVDC IF (MYPID .LE. 0) CLOSE(NDOUT) IF (MYPID .LE. 0) CLOSE(NDOC) END