dox/IO/vtkPhilipsRECReader.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   vtkCNMRRLibrary
00004   Module:    $RCSfile: vtkPhilipsRECReader.h,v $
00005 
00006   Copyright  2005  The Pennsylvania State University
00007   
00008                Notice
00009   
00010   The contents of this file are subject to The Pennsylvania State University 
00011   Open Source License (the "License"); you may not use this file except in 
00012   compliance with the License. You may obtain a copy of the License at H066 
00013   Radiology, NMR Building, 500 University Drive, Hershey, PA, 
00014   tel. (717) 531-6069 or via email at dcb210@psu.edu.
00015  
00016   Software distributed under the License is distributed on an "AS IS" basis, 
00017   WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 
00018   for the specific language governing rights and limitations under the 
00019   License.
00020  
00021   The Original Code is listed under Exhibit A of the license.
00022  
00023   The Initial Developer of the Original Code is Don Bigler.
00024  
00025   Contributor(s):
00026   
00027 =========================================================================*/
00045 #ifndef __vtkPhilipsRECReader_h
00046 #define __vtkPhilipsRECReader_h
00047 
00048 #include "vtkMedicalImageReader2.h"
00049 #include "vtkCNMRRIOWin32Header.h"
00050 #include "vtkPhilipsPAR.h"
00051 
00052 class vtkPhilipsRECReaderRescaleValuesType;
00053 class vtkPhilipsRECReaderSliceIndexType;
00054 class vtkPhilipsRECReaderDiffusionGradientOrientation;
00055 class vtkPhilipsRECReaderDiffusionBValue;
00056    
00057 class VTK_CNMRR_IO_EXPORT vtkPhilipsRECReader : public vtkMedicalImageReader2
00058 {
00059    public:
00060       static vtkPhilipsRECReader *New();
00061       vtkTypeRevisionMacro(vtkPhilipsRECReader,vtkMedicalImageReader2);
00062       virtual void PrintSelf(ostream& os, vtkIndent indent);
00063 
00064       virtual int CanReadFile(const char* fname);
00065    
00067 
00068       virtual const char* GetFileExtensions()
00069       {
00070         return ".PAR .REC .par .rec";
00071       }
00073 
00075 
00076       virtual const char* GetDescriptiveName()
00077       {
00078          return "Philips PAR/REC image";
00079       }
00081       
00084       void* GetPARFileParameters(){return (void*)(this->PARFileParameters);};
00085       
00087 
00089       vtkSetMacro(SortByBlock, int);
00090       vtkGetMacro(SortByBlock, int);
00091       vtkBooleanMacro(SortByBlock, int);
00093       
00096       virtual int GetNumberOfImageBlocks(){return this->PARFileParameters->image_blocks;};
00097       
00100       int GetSliceIndex(int index);
00101       
00104       int GetNumberOfImageTypes(){return this->PARFileParameters->num_image_types;};
00105       
00107 
00111       vtkGetVectorMacro(ImageTypes,int,PAR_DEFAULT_IMAGE_TYPES_SIZE);
00113       
00116       int GetNumberOfScanningSequences(){return this->PARFileParameters->num_scanning_sequences;};
00117       
00119 
00124       vtkGetVectorMacro(ScanningSequences,int,PAR_DEFAULT_SCAN_SEQUENCE_SIZE);
00126       
00131       float GetRescaleSlope(int image_type, int scanning_sequence);
00132       
00137       float GetRescaleIntercept(int image_type, int scanning_sequence);
00138       
00143       float GetScaleSlope(int image_type, int scanning_sequence);
00144       
00148       int GetMaximumNumberOfGradientOrientations(){return this->PARFileParameters->max_num_grad_orient;};
00149       
00154       float GetDiffusionOrientationAP(int diffusion_num);
00155       
00160       float GetDiffusionOrientationFH(int diffusion_num);
00161       
00166       float GetDiffusionOrientationRL(int diffusion_num);
00167       
00172       float GetDiffusionBValue(int diffusion_num);
00173       
00175       virtual void ComputeInternalFileName(int slice);
00176 
00177    protected:
00178       vtkPhilipsRECReader();
00179       ~vtkPhilipsRECReader();
00180 
00181       virtual void ExecuteInformation();
00182       virtual void ExecuteData(vtkDataObject *out);
00183    
00184       par_parameter *PARFileParameters;
00185       int SortByBlock;
00186       int ImageTypes[PAR_DEFAULT_IMAGE_TYPES_SIZE];
00187       int ScanningSequences[PAR_DEFAULT_SCAN_SEQUENCE_SIZE];
00188       vtkPhilipsRECReaderSliceIndexType *SliceIndex;
00189       vtkPhilipsRECReaderRescaleValuesType *RescaleValues;
00190       vtkPhilipsRECReaderDiffusionGradientOrientation *DiffusionGradientOrientations;
00191       vtkPhilipsRECReaderDiffusionBValue *DiffusionBValues;
00192 
00193    private:
00194       vtkPhilipsRECReader(const vtkPhilipsRECReader&);  // Not implemented.
00195       void operator=(const vtkPhilipsRECReader&);  // Not implemented.
00196 };
00197 #endif

Generated on Tue May 12 14:53:03 2009 for vtkCNMRRLibrary by  doxygen 1.4.7