├── Support └── cmp │ ├── ConfiguredFiles │ ├── QtLicenseFiles.h.in │ ├── QtResourceFile.qrc.in │ ├── cmpVersion.h.in │ └── cmpVersion.cpp.in │ ├── OSX_Tools │ ├── UBTest.sh │ └── FixTBB.sh │ ├── Linux_Tools │ ├── CompleteBundle.cmake.in │ ├── launch_script.sh.in │ └── InstallLibraries.sh.in │ ├── CoreTests │ ├── TestCharSignedness.cxx │ ├── TestBoolType.cxx │ ├── GetTimeOfDayTest.cpp │ ├── TestCompareTypes.cxx │ ├── TestConvertTypes.cxx │ └── SSEChecks.cmake │ └── Modules │ ├── FindSZip.cmake │ ├── FindEigen.cmake │ ├── FindMinGW.cmake │ └── cmpAdjustLibVars.cmake ├── Resources ├── icons │ ├── ico │ │ ├── HAADFGui.ico │ │ └── BrightFieldGui.ico │ ├── images │ │ ├── Link.png │ │ ├── undo.png │ │ ├── view.png │ │ ├── view_1_1.png │ │ ├── zoom_in.png │ │ ├── zoom_out.png │ │ ├── Link_Left.png │ │ ├── Link_Right.png │ │ ├── background3.png │ │ ├── background4.png │ │ ├── disk_blue.png │ │ ├── fit_to_size.png │ │ ├── media_end.png │ │ ├── photo_scenery.png │ │ ├── media_beginning.png │ │ ├── media_play_green.png │ │ ├── media_stop_red.png │ │ ├── bullet_triangle_grey.png │ │ ├── DisclosableGroupBoxHeader.png │ │ ├── bullet_triangle_grey_down.png │ │ ├── DisclosableGroupBoxHeader_backup.png │ │ └── Icons.qrc │ ├── icns │ │ ├── HAADFGui.icns │ │ └── BrightFieldGui.icns │ ├── images_16x16 │ │ ├── Link.png │ │ ├── view.png │ │ ├── zoom_in.png │ │ ├── disk_blue.png │ │ ├── media_end.png │ │ ├── zoom_out.png │ │ ├── fit_to_size.png │ │ ├── media_beginning.png │ │ ├── media_stop_red.png │ │ ├── photo_scenery.png │ │ ├── media_play_green.png │ │ ├── bullet_triangle_grey.png │ │ ├── DisclosableGroupBoxHeader.png │ │ ├── bullet_triangle_grey_down.png │ │ └── Icons.qrc │ └── png │ │ ├── HAADFGui_16x16.png │ │ ├── HAADFGui_24x24.png │ │ ├── HAADFGui_32x32.png │ │ ├── HAADFGui_48x48.png │ │ ├── HAADFGui_128x128.png │ │ ├── HAADFGui_256x256.png │ │ ├── HAADFGui_512x512.png │ │ ├── BrightFieldGui_16x16.png │ │ ├── BrightFieldGui_24x24.png │ │ ├── BrightFieldGui_32x32.png │ │ ├── BrightFieldGui_48x48.png │ │ ├── BrightFieldGui_128x128.png │ │ ├── BrightFieldGui_256x256.png │ │ └── BrightFieldGui_512x512.png ├── upload.sh.in ├── InputFiles │ ├── GainOffsetParams_ShepLoganPhantom.bin │ ├── ScheppLoganSinogram128NoiselessLimitedAngle.bin │ ├── RunningTheCode.sh.in │ └── ParamsWithROIAndViewSelectShepLogan.txt ├── CPack │ └── OS_X_ReadMe.txt ├── OpenMBIR │ ├── ReadMe.txt.in │ └── License.txt.in ├── testscript.sh ├── BiSphereTest │ └── BiSphereTest.sh.in └── DocConfigFiles │ └── BlueQuartz.tex.in ├── Documentation ├── UserManual │ └── Images │ │ ├── AFRL_Logo.png │ │ ├── TEMBIR_UI.png │ │ ├── Purdue_Logo.png │ │ ├── CMU_MRSEC_Logo.png │ │ ├── SingleSliceSelect.png │ │ └── BlueQuartzSoftware_Logo.png └── CMakeLists.txt ├── .gitignore ├── Code ├── H5Support │ └── H5SupportConfiguration.h.in ├── Test │ ├── CMakeLists.txt │ └── Tiff │ │ ├── SourceList.cmake │ │ └── TiffTest16Bit.cpp ├── tclap │ ├── README │ ├── COPYING │ ├── Visitor.h │ ├── IgnoreRestVisitor.h │ ├── OptionalUnlabeledTracker.h │ ├── Constraint.h │ ├── HelpVisitor.h │ ├── VersionVisitor.h │ ├── CmdLineOutput.h │ └── ArgTraits.h ├── MXA │ ├── Common │ │ ├── IO │ │ │ ├── MXAFileWriter64.h │ │ │ ├── MXAFileReader64.h │ │ │ └── Private │ │ │ │ ├── MXAPrivateFileWriter.cpp │ │ │ │ ├── MXAPrivateFileReader.cpp │ │ │ │ ├── MXAPrivateWindowsFileReader.cpp │ │ │ │ └── MXAPrivateWindowsFileWriter.cpp │ │ ├── Cast │ │ │ └── Cast.h │ │ ├── Win32Defines.h │ │ ├── RTTIMacros.h │ │ ├── SourceList.cmake │ │ └── MXAErrorDefinitions.h │ ├── Utilities │ │ ├── SourceList.cmake │ │ └── MXADirent.h │ ├── MXAConfiguration.h.in │ └── MXADLLExport.h ├── MBIRLib │ ├── HAADF │ │ ├── HAADF_QGGMRFPriorModel.h │ │ ├── HAADF_QGGMRFPriorModel.cpp │ │ ├── SourceList.cmake │ │ └── HAADFConstants.h │ ├── Reconstruction │ │ ├── SourceList.cmake │ │ ├── ReconstructionInputs.cpp │ │ └── ReconstructionInputs.h │ ├── BrightField │ │ ├── SourceList.cmake │ │ ├── BFConstants.h │ │ └── BF_QGGMRFPriorModel.h │ ├── Common │ │ ├── SourceList.cmake │ │ ├── MSVCDefines.h │ │ ├── EIMTime.c │ │ ├── allocate.h │ │ ├── AbstractFilter.cpp │ │ └── AbstractFilter.h │ ├── IOFilters │ │ ├── SourceList.cmake │ │ └── RawGeometryWriter.h │ ├── GenericFilters │ │ ├── SourceList.cmake │ │ ├── BackgroundCalculation.h │ │ ├── CostData.h │ │ ├── TomoFilter.cpp │ │ ├── MRCSinogramInitializer.h │ │ ├── RawSinogramInitializer.h │ │ ├── RawSinogramInitializer.cpp │ │ └── TomoFilter.h │ └── MBIRLibConfiguration.h.in ├── QtSupport │ ├── TomogramTiltLoader.h │ ├── QFSDropLineEdit.h │ ├── CheckBoxDelegate.h │ ├── UI_Files │ │ ├── ImageOpenDialog.ui │ │ └── ProcessQueueDialog.ui │ ├── TiltAngleGroupBox.h │ ├── QFSDropLineEdit.cpp │ ├── TomogramTiltLoader.cpp │ ├── ColorComboPicker.h │ ├── ImageOpenDialog.h │ ├── MRCInfoWidget.h │ ├── ImageOpenDialog.cpp │ └── QFileCompleter.h └── Applications │ ├── MRCSubset │ └── CMakeLists.txt │ ├── BFReconstruction │ ├── CMakeLists.txt │ └── BFReconstructionArgsParser.h │ └── HAADFReconstruction │ ├── CMakeLists.txt │ └── HAADFReconstructionArgsParser.h ├── License ├── tiff.license ├── MXA.license ├── Boost.license └── License.cmake ├── License.txt ├── README.md └── Todo.txt /Support/cmp/ConfiguredFiles/QtLicenseFiles.h.in: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Support/cmp/OSX_Tools/UBTest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #echo "Running $1 architecture of $2 test" 3 | arch -arch $1 $2 4 | -------------------------------------------------------------------------------- /Resources/icons/ico/HAADFGui.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/ico/HAADFGui.ico -------------------------------------------------------------------------------- /Resources/icons/images/Link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/images/Link.png -------------------------------------------------------------------------------- /Resources/icons/images/undo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/images/undo.png -------------------------------------------------------------------------------- /Resources/icons/images/view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/images/view.png -------------------------------------------------------------------------------- /Resources/icons/icns/HAADFGui.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/icns/HAADFGui.icns -------------------------------------------------------------------------------- /Resources/icons/images/view_1_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/images/view_1_1.png -------------------------------------------------------------------------------- /Resources/icons/images/zoom_in.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/images/zoom_in.png -------------------------------------------------------------------------------- /Resources/icons/images/zoom_out.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/images/zoom_out.png -------------------------------------------------------------------------------- /Resources/icons/ico/BrightFieldGui.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/ico/BrightFieldGui.ico -------------------------------------------------------------------------------- /Resources/icons/images/Link_Left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/images/Link_Left.png -------------------------------------------------------------------------------- /Resources/icons/images/Link_Right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/images/Link_Right.png -------------------------------------------------------------------------------- /Resources/icons/images/background3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/images/background3.png -------------------------------------------------------------------------------- /Resources/icons/images/background4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/images/background4.png -------------------------------------------------------------------------------- /Resources/icons/images/disk_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/images/disk_blue.png -------------------------------------------------------------------------------- /Resources/icons/images/fit_to_size.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/images/fit_to_size.png -------------------------------------------------------------------------------- /Resources/icons/images/media_end.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/images/media_end.png -------------------------------------------------------------------------------- /Resources/icons/images_16x16/Link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/images_16x16/Link.png -------------------------------------------------------------------------------- /Resources/icons/images_16x16/view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/images_16x16/view.png -------------------------------------------------------------------------------- /Resources/icons/png/HAADFGui_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/png/HAADFGui_16x16.png -------------------------------------------------------------------------------- /Resources/icons/png/HAADFGui_24x24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/png/HAADFGui_24x24.png -------------------------------------------------------------------------------- /Resources/icons/png/HAADFGui_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/png/HAADFGui_32x32.png -------------------------------------------------------------------------------- /Resources/icons/png/HAADFGui_48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/png/HAADFGui_48x48.png -------------------------------------------------------------------------------- /Resources/icons/icns/BrightFieldGui.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/icns/BrightFieldGui.icns -------------------------------------------------------------------------------- /Resources/icons/images/photo_scenery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/images/photo_scenery.png -------------------------------------------------------------------------------- /Resources/icons/images_16x16/zoom_in.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/images_16x16/zoom_in.png -------------------------------------------------------------------------------- /Resources/icons/png/HAADFGui_128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/png/HAADFGui_128x128.png -------------------------------------------------------------------------------- /Resources/icons/png/HAADFGui_256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/png/HAADFGui_256x256.png -------------------------------------------------------------------------------- /Resources/icons/png/HAADFGui_512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/png/HAADFGui_512x512.png -------------------------------------------------------------------------------- /Resources/icons/images/media_beginning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/images/media_beginning.png -------------------------------------------------------------------------------- /Resources/icons/images/media_play_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/images/media_play_green.png -------------------------------------------------------------------------------- /Resources/icons/images/media_stop_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/images/media_stop_red.png -------------------------------------------------------------------------------- /Resources/icons/images_16x16/disk_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/images_16x16/disk_blue.png -------------------------------------------------------------------------------- /Resources/icons/images_16x16/media_end.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/images_16x16/media_end.png -------------------------------------------------------------------------------- /Resources/icons/images_16x16/zoom_out.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/images_16x16/zoom_out.png -------------------------------------------------------------------------------- /Documentation/UserManual/Images/AFRL_Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Documentation/UserManual/Images/AFRL_Logo.png -------------------------------------------------------------------------------- /Documentation/UserManual/Images/TEMBIR_UI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Documentation/UserManual/Images/TEMBIR_UI.png -------------------------------------------------------------------------------- /Resources/icons/images_16x16/fit_to_size.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/images_16x16/fit_to_size.png -------------------------------------------------------------------------------- /Resources/icons/png/BrightFieldGui_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/png/BrightFieldGui_16x16.png -------------------------------------------------------------------------------- /Resources/icons/png/BrightFieldGui_24x24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/png/BrightFieldGui_24x24.png -------------------------------------------------------------------------------- /Resources/icons/png/BrightFieldGui_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/png/BrightFieldGui_32x32.png -------------------------------------------------------------------------------- /Resources/icons/png/BrightFieldGui_48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/png/BrightFieldGui_48x48.png -------------------------------------------------------------------------------- /Documentation/UserManual/Images/Purdue_Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Documentation/UserManual/Images/Purdue_Logo.png -------------------------------------------------------------------------------- /Resources/icons/images/bullet_triangle_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/images/bullet_triangle_grey.png -------------------------------------------------------------------------------- /Resources/icons/images_16x16/media_beginning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/images_16x16/media_beginning.png -------------------------------------------------------------------------------- /Resources/icons/images_16x16/media_stop_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/images_16x16/media_stop_red.png -------------------------------------------------------------------------------- /Resources/icons/images_16x16/photo_scenery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/images_16x16/photo_scenery.png -------------------------------------------------------------------------------- /Resources/icons/png/BrightFieldGui_128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/png/BrightFieldGui_128x128.png -------------------------------------------------------------------------------- /Resources/icons/png/BrightFieldGui_256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/png/BrightFieldGui_256x256.png -------------------------------------------------------------------------------- /Resources/icons/png/BrightFieldGui_512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/png/BrightFieldGui_512x512.png -------------------------------------------------------------------------------- /Documentation/UserManual/Images/CMU_MRSEC_Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Documentation/UserManual/Images/CMU_MRSEC_Logo.png -------------------------------------------------------------------------------- /Resources/icons/images_16x16/media_play_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/images_16x16/media_play_green.png -------------------------------------------------------------------------------- /Support/cmp/Linux_Tools/CompleteBundle.cmake.in: -------------------------------------------------------------------------------- 1 | 2 | execute_process(COMMAND /bin/bash @OPTIMIZE_BUNDLE_SHELL_SCRIPT@ ${CMAKE_INSTALL_PREFIX}) 3 | 4 | 5 | -------------------------------------------------------------------------------- /Documentation/UserManual/Images/SingleSliceSelect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Documentation/UserManual/Images/SingleSliceSelect.png -------------------------------------------------------------------------------- /Resources/icons/images/DisclosableGroupBoxHeader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/images/DisclosableGroupBoxHeader.png -------------------------------------------------------------------------------- /Resources/icons/images/bullet_triangle_grey_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/images/bullet_triangle_grey_down.png -------------------------------------------------------------------------------- /Resources/icons/images_16x16/bullet_triangle_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/images_16x16/bullet_triangle_grey.png -------------------------------------------------------------------------------- /Resources/upload.sh.in: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | scp @UPLOAD_FILE_NAME@ @OpenMBIR_WEBSITE_SCP_USERNAME@@@OpenMBIR_WEBSITE_SERVER@:@OpenMBIR_WEBSITE_SERVER_PATH@ 4 | -------------------------------------------------------------------------------- /Resources/InputFiles/GainOffsetParams_ShepLoganPhantom.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/InputFiles/GainOffsetParams_ShepLoganPhantom.bin -------------------------------------------------------------------------------- /Resources/icons/images_16x16/DisclosableGroupBoxHeader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/images_16x16/DisclosableGroupBoxHeader.png -------------------------------------------------------------------------------- /Resources/icons/images_16x16/bullet_triangle_grey_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/images_16x16/bullet_triangle_grey_down.png -------------------------------------------------------------------------------- /Documentation/UserManual/Images/BlueQuartzSoftware_Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Documentation/UserManual/Images/BlueQuartzSoftware_Logo.png -------------------------------------------------------------------------------- /Resources/icons/images/DisclosableGroupBoxHeader_backup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/icons/images/DisclosableGroupBoxHeader_backup.png -------------------------------------------------------------------------------- /Resources/InputFiles/ScheppLoganSinogram128NoiselessLimitedAngle.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenMBIR/OpenMBIR-TEM/HEAD/Resources/InputFiles/ScheppLoganSinogram128NoiselessLimitedAngle.bin -------------------------------------------------------------------------------- /Support/cmp/ConfiguredFiles/QtResourceFile.qrc.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | @cmp_text_file_name@ 5 | 6 | 7 | -------------------------------------------------------------------------------- /Support/cmp/CoreTests/TestCharSignedness.cxx: -------------------------------------------------------------------------------- 1 | /* Return 1 for char signed and 0 for char unsigned. */ 2 | int main() 3 | { 4 | unsigned char uc = 255; 5 | return (*reinterpret_cast(&uc) < 0)?1:0; 6 | } 7 | -------------------------------------------------------------------------------- /Support/cmp/CoreTests/TestBoolType.cxx: -------------------------------------------------------------------------------- 1 | // Minimal test for existence of "bool" type. 2 | void TestBool(bool) {} 3 | 4 | int main() 5 | { 6 | TestBool(false); 7 | TestBool(true); 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | CMakeLists.txt.user 2 | /Build/ 3 | /zRel/ 4 | /CleanBuild/ 5 | .cproject 6 | .project 7 | Source/Plugins/MFESurfaceSmoothing 8 | Source/Plugins/CMUSurfaceMeshing 9 | /clang/ 10 | /xcode/ 11 | /x64/ 12 | /i386/ 13 | -------------------------------------------------------------------------------- /Support/cmp/CoreTests/GetTimeOfDayTest.cpp: -------------------------------------------------------------------------------- 1 | #if defined (TRY_SYS_TIME_H) 2 | #include 3 | #include 4 | #endif 5 | 6 | 7 | #if defined (TRY_TIME_H) 8 | #include 9 | #endif 10 | 11 | int main(int argc, char **argv) { 12 | struct timeval t1; 13 | gettimeofday(&t1, 0x00); 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /Support/cmp/OSX_Tools/FixTBB.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | TBB_ROOT=/Users/Shared/Toolkits/tbb41_20121003oss 4 | 5 | cd $TBB_ROOT/lib 6 | 7 | libs=`ls *.dylib` 8 | for l in $libs 9 | do 10 | echo "------------------" 11 | echo 'Changing '$l 12 | 13 | install_name_tool -id $TBB_ROOT/lib/$l $l 14 | otool -L $TBB_ROOT/lib/$l 15 | 16 | done 17 | 18 | -------------------------------------------------------------------------------- /Resources/CPack/OS_X_ReadMe.txt: -------------------------------------------------------------------------------- 1 | In order to save space and download time the DREAM.3D OS X distribution uses a 2 | shared Frameworks and Library folder. Because of this if you want to move the 3 | DREAM.3D applications you MUST move the entire DREAM.3D Distribution folder and 4 | NOT individual applications and utilities. 5 | 6 | Thanks 7 | The DREAM3D Dev Team. -------------------------------------------------------------------------------- /Resources/OpenMBIR/ReadMe.txt.in: -------------------------------------------------------------------------------- 1 | Part of this code was written under United States Air Force Contract FA8650-07-D-5800 2 | 3 | Other parts of the code were written under other contracts or provided by open source 4 | projects. See the License.txt file for more information. 5 | 6 | All source code has been release under US Air Force Public Affairs Case number 88ABW-2011-1237 7 | 8 | -------------------------------------------------------------------------------- /Code/H5Support/H5SupportConfiguration.h.in: -------------------------------------------------------------------------------- 1 | /* This file is auto generated. DO NOT EDIT THIS FILE. Edit the original template file and then rerun CMake 2 | * again to regenerate this file. 3 | */ 4 | 5 | /* Define to 1 if H5Support was built as a dynamic library */ 6 | #cmakedefine H5Support_BUILT_AS_DYNAMIC_LIB @H5Support_BUILT_AS_DYNAMIC_LIB@ 7 | 8 | /* Include the DLL export preprocessor defines */ 9 | #include "@PROJECT_NAME@/@PROJECT_NAME@DLLExport.h" 10 | 11 | -------------------------------------------------------------------------------- /Resources/testscript.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | user=mjackson 4 | bindir=/Users/mjackson/Workspace/EIMTomo/Build/Bin 5 | paramdir=/Users/mjackson/Contracts/AFRL-TO81-Extension/TomoData 6 | outputdir=/tmp 7 | cd $bindir 8 | 9 | 10 | 11 | ./BasicReconstructionAlgorithm -p ${paramdir}/Params.txt -s ${paramdir}/ScheppLoganSinogram128NoiselessLimitedAngle.bin -i ${paramdir}/ConstantInitialEst255Slices3Size128X128.bin -o ${outputdir}/ShepLoganReconstructionSigmaXPoint5P1_2Iter25.bin -l 0.5 -m 1.2 -n 25 -------------------------------------------------------------------------------- /Code/Test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | #if(OpenMBIR_USE_TIFF) 4 | include_directories(${PROJECT_CODE_DIR}) 5 | add_executable(mrctest ${PROJECT_CODE_DIR}/Test/MRCReaderTest.cpp) 6 | target_link_libraries(mrctest MXA MBIRLib ${TIFF_LIBRARIES}) 7 | #endif() 8 | 9 | 10 | # -------------------------------------------------------------------- 11 | # 12 | # -------------------------------------------------------------------- 13 | add_executable(WrappedArrayTest WrappedArrayTest.cpp) 14 | target_link_libraries(WrappedArrayTest MXA MBIRLib ) 15 | 16 | 17 | -------------------------------------------------------------------------------- /Code/tclap/README: -------------------------------------------------------------------------------- 1 | 2 | TCLAP - Templatized Command Line Argument Parser 3 | 4 | This is a simple C++ library that facilitates parsing command line 5 | arguments in a type independent manner. It doesn't conform exactly 6 | to either the GNU or POSIX standards, although it is close. See 7 | docs/manual.html for descriptions of how things work or look at the 8 | simple examples in the examples dir. 9 | 10 | To find out what the latest changes are read the NEWS file in this directory. 11 | 12 | 13 | Any and all feedback is welcome to: Mike Smoot 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Resources/InputFiles/RunningTheCode.sh.in: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd "@OpenMBIR_BINARY_DIR@" 4 | 5 | 6 | INPUT_FILE_DIR="@PROJECT_RESOURCES_DIR@/InputFiles" 7 | PARAM_FILE="$INPUT_FILE_DIR/ParamsWithROIAndViewSelectShepLogan.txt" 8 | SINO_FILE="$INPUT_FILE_DIR/ScheppLoganSinogram128NoiselessLimitedAngle.bin" 9 | GEOM_FILE="$INPUT_FILE_DIR/GainOffsetParams_ShepLoganPhantom.bin" 10 | OUTPUT_FILE="@OpenMBIR_BINARY_DIR@/TestOutput.bin" 11 | 12 | "@OpenMBIR_BINARY_DIR@/Bin/ScaleOffsetCorrectionAlgorithm" -p "$PARAM_FILE" -s "$SINO_FILE" -g "$GEOM_FILE" -o "$OUTPUT_FILE" -m 1.2 -l 0.4 -n 10 -O 1 13 | 14 | -------------------------------------------------------------------------------- /Code/MXA/Common/IO/MXAFileWriter64.h: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // Copyright (c) 2008, Michael A. Jackson for BlueQuartz Software 4 | // All rights reserved. 5 | // BSD License: http://www.opensource.org/licenses/bsd-license.html 6 | // 7 | // This code was written under United States Air Force Contract number 8 | // FA8650-04-C-5229 9 | // 10 | 11 | #ifndef _MXAFILEWRITER64_H_ 12 | #define _MXAFILEWRITER64_H_ 13 | 14 | #if defined (_MSC_VER) 15 | #include 16 | 17 | #else 18 | #include 19 | #endif 20 | 21 | #endif // _MXAFILEWRITER64_H_ 22 | -------------------------------------------------------------------------------- /Resources/icons/images_16x16/Icons.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | bullet_triangle_grey_down.png 5 | bullet_triangle_grey.png 6 | DisclosableGroupBoxHeader.png 7 | disk_blue.png 8 | view.png 9 | zoom_in.png 10 | zoom_out.png 11 | photo_scenery.png 12 | fit_to_size.png 13 | media_beginning.png 14 | media_end.png 15 | media_play_green.png 16 | media_stop_red.png 17 | Link.png 18 | 19 | 20 | -------------------------------------------------------------------------------- /Code/MXA/Common/IO/MXAFileReader64.h: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // Copyright (c) 2007, 2010 Michael A. Jackson for BlueQuartz Software 4 | // All rights reserved. 5 | // BSD License: http://www.opensource.org/licenses/bsd-license.html 6 | // 7 | // This code was written under United States Air Force Contract number 8 | // FA8650-04-C-5229 9 | // 10 | 11 | 12 | #ifndef _MXAFILEREADER_64_H_ 13 | #define _MXAFILEREADER_64_H_ 14 | 15 | #include 16 | 17 | #if defined (_MSC_VER) 18 | #include 19 | 20 | #else 21 | #include 22 | #endif 23 | 24 | 25 | #endif /*_MXAFILEREADER_64_H_*/ 26 | -------------------------------------------------------------------------------- /Resources/BiSphereTest/BiSphereTest.sh.in: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd @CMAKE_RUNTIME_OUTPUT_DIRECTORY@ 4 | 5 | args="" 6 | args="$args --sinofile @BiSphere_Input_File@" 7 | args="$args --TargetGain 7872950.013398" 8 | args="$args --defaultOffset 0" 9 | args="$args --extendObject 0" 10 | args="$args -m 1.2" 11 | args="$args -l 4.5e-7" 12 | args="$args -n 10" 13 | args="$args -O 30" 14 | args="$args -T .00001" 15 | args="$args --outdir @OpenMBIR_BINARY_DIR@/BiSphere_Output" 16 | args="$args -o ReconstructedObject.bin" 17 | args="$args --xz_size 1" 18 | args="$args --xy_size 1" 19 | args="$args --thickness 100" 20 | args="$args --tilt_selection 1" 21 | args="$args --subvolume 0,80,0,199,120,180" 22 | 23 | echo "Parameters" 24 | echo $args 25 | 26 | ./@EXECUTABLE_NAME@ $args 27 | -------------------------------------------------------------------------------- /Resources/icons/images/Icons.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | background3.png 5 | background4.png 6 | bullet_triangle_grey_down.png 7 | bullet_triangle_grey.png 8 | DisclosableGroupBoxHeader.png 9 | disk_blue.png 10 | view.png 11 | zoom_in.png 12 | zoom_out.png 13 | photo_scenery.png 14 | fit_to_size.png 15 | media_beginning.png 16 | media_end.png 17 | media_play_green.png 18 | media_stop_red.png 19 | undo.png 20 | Link_Left.png 21 | Link_Right.png 22 | 23 | 24 | -------------------------------------------------------------------------------- /Documentation/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #--//////////////////////////////////////////////////////////////////////////// 2 | #-- Copyright (c) 2009, Michael A. Jackson. BlueQuartz Software 3 | #-- All rights reserved. 4 | #-- BSD License: http://www.opensource.org/licenses/bsd-license.html 5 | #-- This code was partly written under US Air Force Contract FA8650-07-D-5800 6 | #--//////////////////////////////////////////////////////////////////////////// 7 | 8 | FIND_PACKAGE(Doxygen) 9 | if (NOT DOXYGEN_FOUND) 10 | message(WARNING "Doxygen is needed to build the documentation. Please install it correctly") 11 | else() 12 | 13 | 14 | # Add a target that builds just the High Level User Manuals/Tutorial type documentation 15 | add_subdirectory(${PROJECT_SOURCE_DIR}/Documentation/UserManual ${PROJECT_BINARY_DIR}/Documentation/UserManual) 16 | 17 | endif() 18 | -------------------------------------------------------------------------------- /Code/MBIRLib/HAADF/HAADF_QGGMRFPriorModel.h: -------------------------------------------------------------------------------- 1 | #ifndef _HAADF_QGGMRF_PRIORMODEL_H_ 2 | #define _HAADF_QGGMRF_PRIORMODEL_H_ 3 | 4 | #include "MBIRLib/MBIRLib.h" 5 | #include "MBIRLib/Common/EIMMath.h" 6 | #include "MBIRLib/HAADF/HAADFConstants.h" 7 | #include "MBIRLib/Reconstruction/ReconstructionStructures.h" 8 | 9 | class QGGMRF_Values; 10 | 11 | namespace QGGMRF 12 | { 13 | 14 | 15 | /** 16 | * @brief initializePriorModel 17 | * @param tomoInputs 18 | * @param qggmrf_values 19 | */ 20 | void initializePriorModel(TomoInputsPtr tomoInputs, QGGMRF_Values* qggmrf_values); 21 | 22 | /** 23 | * @brief updatePriorModel 24 | * @param NewSigmaX 25 | * @param qggmrf_values 26 | * @return 27 | */ 28 | Real_t updatePriorModel(Real_t NewSigmaX, QGGMRF_Values* qggmrf_values, Real_t gamma); 29 | } 30 | 31 | #endif /* _HAADF_QGGMRF_PRIORMODEL_H_ */ 32 | -------------------------------------------------------------------------------- /Code/Test/Tiff/SourceList.cmake: -------------------------------------------------------------------------------- 1 | #--//////////////////////////////////////////////////////////////////////////// 2 | #-- Copyright (c) 2009, Michael A. Jackson. BlueQuartz Software 3 | #-- All rights reserved. 4 | #-- BSD License: http://www.opensource.org/licenses/bsd-license.html 5 | #-- This code was partly written under US Air Force Contract FA8650-07-D-5800 6 | #--//////////////////////////////////////////////////////////////////////////// 7 | set (OpenMBIR_Tiff_SRCS 8 | ${OpenMBIR_SOURCE_DIR}/Tiff/TiffUtilities.cpp 9 | ) 10 | 11 | set (OpenMBIR_Tiff_HDRS 12 | ${OpenMBIR_SOURCE_DIR}/Tiff/TiffUtilities.h 13 | ) 14 | cmp_IDE_SOURCE_PROPERTIES( "Tiff" "${OpenMBIR_Tiff_HDRS}" "${OpenMBIR_Tiff_SRCS}" "${PROJECT_INSTALL_HEADERS}") 15 | 16 | add_executable(tiffTest16Bit ${OpenMBIR_SOURCE_DIR}/Tiff/TiffTest16Bit.cpp ${OpenMBIR_Tiff_SRCS}) 17 | target_link_libraries(tiffTest16Bit ${TIFF_LIBRARIES}) 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Code/QtSupport/TomogramTiltLoader.h: -------------------------------------------------------------------------------- 1 | #ifndef _TomogramTiltLoader_H_ 2 | #define _TomogramTiltLoader_H_ 3 | 4 | #include 5 | 6 | #include 7 | 8 | 9 | #include "ui_TomogramTiltLoader.h" 10 | 11 | class TomogramTiltLoader : public QDialog, private Ui::TomogramTiltLoader 12 | { 13 | 14 | Q_OBJECT 15 | 16 | public: 17 | TomogramTiltLoader(QWidget* parent = NULL); 18 | 19 | virtual ~TomogramTiltLoader(); 20 | 21 | QVector getATilts(); 22 | QVector getBTilts(); 23 | float getPixelSize(); 24 | 25 | void setNumTilts(int nTilts); 26 | protected: 27 | void setupGui(); 28 | 29 | private: 30 | int m_NumTilts; 31 | 32 | TomogramTiltLoader(const TomogramTiltLoader&); // Copy Constructor Not Implemented 33 | void operator=(const TomogramTiltLoader&); // Operator '=' Not Implemented 34 | 35 | 36 | 37 | }; 38 | 39 | 40 | #endif /* _TomogramTiltLoader_H_ */ 41 | -------------------------------------------------------------------------------- /Code/QtSupport/QFSDropLineEdit.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) 2010, Michael A. Jackson. BlueQuartz Software 4 | // All rights reserved. 5 | // BSD License: http://www.opensource.org/licenses/bsd-license.html 6 | // 7 | /////////////////////////////////////////////////////////////////////////////// 8 | #ifndef MYLINEEDIT_H 9 | #define MYLINEEDIT_H 10 | 11 | #include 12 | 13 | 14 | /** 15 | * @class QFSDropLineEdit QFSDropLineEdit.h EmMpm/Common/Qt/QFSDropLineEdit.h 16 | * @brief 17 | * @author Michael A. Jackson for BlueQuartz Software 18 | * @date Feb 5, 2010 19 | * @version 1.0 20 | */ 21 | class QFSDropLineEdit : public QLineEdit 22 | { 23 | Q_OBJECT 24 | 25 | public: 26 | QFSDropLineEdit(QWidget* parent = NULL); 27 | 28 | void dragEnterEvent(QDragEnterEvent* event); 29 | void dropEvent(QDropEvent* event); 30 | 31 | private: 32 | 33 | }; 34 | 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /Support/cmp/CoreTests/TestCompareTypes.cxx: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: Visualization Toolkit 4 | Module: $RCSfile: vtkTestCompareTypes.cxx,v $ 5 | 6 | Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 7 | All rights reserved. 8 | See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 9 | 10 | This software is distributed WITHOUT ANY WARRANTY; without even 11 | the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 12 | PURPOSE. See the above copyright notice for more information. 13 | 14 | =========================================================================*/ 15 | 16 | #define TYPE_LONG_LONG long long 17 | 18 | typedef VTK_TEST_COMPARE_TYPE_1 Type1; 19 | typedef VTK_TEST_COMPARE_TYPE_2 Type2; 20 | 21 | void function(Type1**) {} 22 | 23 | int main() 24 | { 25 | Type2** p = 0; 26 | function(p); 27 | return 0; 28 | } 29 | -------------------------------------------------------------------------------- /Code/MXA/Utilities/SourceList.cmake: -------------------------------------------------------------------------------- 1 | #message(STATUS "MXA/Utilities/SourceList.cmake") 2 | set(MXA_Utilities_SRCS 3 | ${MXA_SOURCE_DIR}/Utilities/MXADir.cpp 4 | ${MXA_SOURCE_DIR}/Utilities/MXAFileInfo.cpp 5 | # ${MXA_SOURCE_DIR}/Utilities/MXALogger.cpp 6 | ${MXA_SOURCE_DIR}/Utilities/MD5.cpp 7 | ) 8 | 9 | set(MXA_Utilities_HDRS 10 | ${MXA_SOURCE_DIR}/Utilities/StringUtils.h 11 | ${MXA_SOURCE_DIR}/Utilities/MXADir.h 12 | ${MXA_SOURCE_DIR}/Utilities/MXAFileInfo.h 13 | # ${MXA_SOURCE_DIR}/Utilities/MXALogger.h 14 | ${MXA_SOURCE_DIR}/Utilities/MD5.h 15 | ) 16 | 17 | if(MSVC) 18 | set(MXA_Utilities_SRCS ${MXA_Utilities_SRCS} ${MXA_SOURCE_DIR}/Utilities/MXADirent.c ) 19 | set(MXA_Utilities_HDRS ${MXA_Utilities_HDRS} ${MXA_SOURCE_DIR}/Utilities/MXADirent.h ) 20 | endif() 21 | cmp_IDE_SOURCE_PROPERTIES( "MXA/Utilities" "${MXA_Utilities_HDRS}" "${MXA_Utilities_SRCS}" "0") 22 | 23 | if( ${MXA_INSTALL_FILES} EQUAL 1 ) 24 | INSTALL (FILES ${MXA_Utilities_HDRS} 25 | DESTINATION include/MXA/Utilities 26 | COMPONENT Headers ) 27 | endif() 28 | 29 | -------------------------------------------------------------------------------- /Code/QtSupport/CheckBoxDelegate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This code was taken directly from 3 | * http://stackoverflow.com/questions/3363190/qt-qtableview-how-to-have-a-checkbox-only-column 4 | * 5 | * There was no license attached and the code was on a public web server so I will 6 | * assume the author put the code in the public domain. 7 | */ 8 | 9 | 10 | #ifndef CHECKBOXDELEGATE_H_ 11 | #define CHECKBOXDELEGATE_H_ 12 | 13 | #include 14 | 15 | /** 16 | * @brief 17 | * 18 | */ 19 | class CheckBoxDelegate : public QStyledItemDelegate 20 | { 21 | Q_OBJECT; 22 | 23 | public: 24 | explicit CheckBoxDelegate(QObject* parent = NULL); 25 | virtual ~CheckBoxDelegate(); 26 | 27 | 28 | void paint ( QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index ) const; 29 | 30 | bool editorEvent(QEvent* event, 31 | QAbstractItemModel* model, 32 | const QStyleOptionViewItem& option, 33 | const QModelIndex& index); 34 | }; 35 | 36 | #endif /* CHECKBOXDELEGATE_H_ */ 37 | -------------------------------------------------------------------------------- /Code/MXA/Common/Cast/Cast.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | // 4 | // Copyright (c) 2002, Perry L. Miller IV 5 | // All rights reserved. 6 | // BSD License: http://www.opensource.org/licenses/bsd-license.html 7 | // 8 | 9 | 10 | 11 | // 12 | // Macro for casting. So that c-style casts are easy to find. 13 | // 14 | 15 | 16 | #ifndef _USUL_CAST_H_ 17 | #define _USUL_CAST_H_ 18 | 19 | 20 | 21 | // 22 | // Macro for unsafe casting. Makes it easier to search for these. 23 | // 24 | 25 | 26 | #define USUL_UNSAFE_CAST(to_type,from_object)\ 27 | ( (to_type) (from_object) ) 28 | 29 | 30 | 31 | // 32 | // Macro for safe casting of FOX pointer. 33 | // 34 | 35 | 36 | #define SAFE_CAST_FOX(Type,pointer)\ 37 | ( ( (pointer) && (pointer)->isMemberOf ( FXMETACLASS ( Type ) ) ) ? reinterpret_cast < Type * > ( pointer ) : 0x0 ) 38 | 39 | 40 | 41 | // 42 | // Macro for safe casting of const FOX pointer. 43 | // 44 | 45 | 46 | #define SAFE_CAST_FOX_CONST(Type,pointer)\ 47 | ( ( (pointer) && (pointer)->isMemberOf ( FXMETACLASS ( Type ) ) ) ? reinterpret_cast < const Type * > ( pointer ) : 0x0 ) 48 | 49 | 50 | #endif // _USUL_CAST_H_ 51 | -------------------------------------------------------------------------------- /Support/cmp/Linux_Tools/launch_script.sh.in: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | makeAbsolute() { 4 | case $1 in 5 | /*) 6 | # already absolute, return it 7 | echo "$1" 8 | ;; 9 | *) 10 | # relative, prepend $2 made absolute 11 | echo `makeAbsolute "$2" "$PWD"`/"$1" | sed 's,/\.$,,' 12 | ;; 13 | esac 14 | } 15 | 16 | me=`which "$0"` # Search $PATH if necessary 17 | if test -L "$me"; then 18 | # Try readlink(1) 19 | readlink=`type readlink 2>/dev/null` || readlink= 20 | if test -n "$readlink"; then 21 | # We have readlink(1), so we can use it. Assuming GNU readlink (for -f). 22 | me=`readlink -nf "$me"` 23 | else 24 | # No readlink(1), so let's try ls -l 25 | me=`ls -l "$me" | sed 's/^.*-> //'` 26 | base=`dirname "$me"` 27 | me=`makeAbsolute "$me" "$base"` 28 | fi 29 | fi 30 | 31 | bindir=`dirname "$me"` 32 | libdir=`cd "$bindir/../lib" ; pwd` 33 | LD_LIBRARY_PATH=$libdir:${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} 34 | export LD_LIBRARY_PATH 35 | exec "$bindir/@linux_app_name@" ${1+"$@"} 36 | -------------------------------------------------------------------------------- /Code/MXA/Common/Win32Defines.h: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // Copyright (c) 2006, Michael A. Jackson 4 | // All rights reserved. 5 | // BSD License: http://www.opensource.org/licenses/bsd-license.html 6 | // 7 | // This code was written under United States Air Force Contract number 8 | // FA8650-04-C-5229 9 | // 10 | 11 | #ifndef _WIN32DEFINES_H_ 12 | #define _WIN32DEFINES_H_ 13 | 14 | #ifdef _MSC_VER 15 | #include 16 | #include 17 | #include 18 | #include "MXA/MXA.h" 19 | /* 20 | "It's a known, long-standing bug in the compiler system's headers. For 21 | some reason the manufacturer, in its infinite wisdom, chose to #define 22 | macros min() and max() in violation of the upper-case convention and so 23 | break any legitimate functions with those names, including those in the 24 | standard C++ library." 25 | */ 26 | 27 | #ifndef NOMINMAX 28 | #define NOMINMAX 29 | #endif 30 | 31 | #define WINDOWS_LARGE_FILE_SUPPORT 32 | #if _MSC_VER < 1400 33 | #define snprintf _snprintf 34 | #else 35 | #define snprintf sprintf_s 36 | #endif 37 | #endif 38 | 39 | 40 | 41 | #endif /* _WIN32DEFINES_H_ */ 42 | -------------------------------------------------------------------------------- /Support/cmp/CoreTests/TestConvertTypes.cxx: -------------------------------------------------------------------------------- 1 | /*========================================================================= 2 | 3 | Program: Visualization Toolkit 4 | Module: $RCSfile: vtkTestConvertTypes.cxx,v $ 5 | 6 | Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 7 | All rights reserved. 8 | See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 9 | 10 | This software is distributed WITHOUT ANY WARRANTY; without even 11 | the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 12 | PURPOSE. See the above copyright notice for more information. 13 | 14 | =========================================================================*/ 15 | 16 | #define TYPE_UNSIGNED___INT64 unsigned __int64_t 17 | 18 | typedef VTK_TEST_CONVERT_TYPE_TO TypeTo; 19 | typedef VTK_TEST_CONVERT_TYPE_FROM TypeFrom; 20 | 21 | void function(TypeTo& l, TypeFrom const& r) 22 | { 23 | l = static_cast(r); 24 | } 25 | 26 | int main() 27 | { 28 | TypeTo tTo = TypeTo(); 29 | TypeFrom tFrom = TypeFrom(); 30 | function(tTo, tFrom); 31 | return 0; 32 | } 33 | -------------------------------------------------------------------------------- /Code/MBIRLib/Reconstruction/SourceList.cmake: -------------------------------------------------------------------------------- 1 | #--//////////////////////////////////////////////////////////////////////////// 2 | #-- 3 | #-- Copyright (c) 2011, Michael A. Jackson. BlueQuartz Software 4 | 5 | #-- All rights reserved. 6 | #-- BSD License: http://www.opensource.org/licenses/bsd-license.html 7 | #-- 8 | #-- This code was partly written under US Air Force Contract FA8650-07-D-5800 9 | #-- 10 | #--//////////////////////////////////////////////////////////////////////////// 11 | 12 | 13 | set(MBIRLib_Reconstruction_SRCS 14 | ${MBIRLib_SOURCE_DIR}/Reconstruction/ReconstructionInputs.cpp 15 | ${MBIRLib_SOURCE_DIR}/Reconstruction/QGGMRF_Functions.cpp 16 | ) 17 | 18 | set(MBIRLib_Reconstruction_HDRS 19 | ${MBIRLib_SOURCE_DIR}/Reconstruction/ReconstructionInputs.h 20 | ${MBIRLib_SOURCE_DIR}/Reconstruction/ReconstructionStructures.h 21 | ${MBIRLib_SOURCE_DIR}/Reconstruction/ReconstructionConstants.h 22 | ${MBIRLib_SOURCE_DIR}/Reconstruction/QGGMRF_Functions.h 23 | ) 24 | 25 | cmp_IDE_SOURCE_PROPERTIES( "MBIRLib/Reconstruction" "${MBIRLib_Reconstruction_HDRS}" "${MBIRLib_Reconstruction_SRCS}" "${CMP_INSTALL_FILES}") 26 | -------------------------------------------------------------------------------- /Code/tclap/COPYING: -------------------------------------------------------------------------------- 1 | 2 | 3 | Copyright (c) 2003 Michael E. Smoot 4 | 5 | Permission is hereby granted, free of charge, to any person 6 | obtaining a copy of this software and associated documentation 7 | files (the "Software"), to deal in the Software without restriction, 8 | including without limitation the rights to use, copy, modify, merge, 9 | publish, distribute, sublicense, and/or sell copies of the Software, 10 | and to permit persons to whom the Software is furnished to do so, 11 | subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 18 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 20 | BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 21 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 22 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | 25 | 26 | -------------------------------------------------------------------------------- /Code/QtSupport/UI_Files/ImageOpenDialog.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | ImageOpenDialog 4 | 5 | 6 | 7 | 0 8 | 0 9 | 403 10 | 70 11 | 12 | 13 | 14 | MRC File Loading 15 | 16 | 17 | false 18 | 19 | 20 | true 21 | 22 | 23 | 24 | 25 | 26 | 27 | 0 28 | 0 29 | 30 | 31 | 32 | Loading MRC File and Calculating initial Sigma X Estimate.... 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /Code/MXA/Utilities/MXADirent.h: -------------------------------------------------------------------------------- 1 | #ifndef DIRENT_INCLUDED 2 | #define DIRENT_INCLUDED 3 | 4 | #if !defined (WIN32) 5 | #error This header is NOT to be included on POSIX systems 6 | #endif 7 | /* 8 | 9 | Declaration of POSIX directory browsing functions and types for Win32. 10 | 11 | Author: Kevlin Henney (kevlin@acm.org, kevlin@curbralan.com) 12 | History: Created March 1997. Updated June 2003. 13 | Rights: See end of file. 14 | 15 | */ 16 | 17 | #ifdef __cplusplus 18 | extern "C" 19 | { 20 | #endif 21 | 22 | typedef struct DIR DIR; 23 | 24 | struct dirent 25 | { 26 | unsigned char d_namlen; 27 | char* d_name; 28 | }; 29 | 30 | DIR* opendir(const char*); 31 | int closedir(DIR*); 32 | struct dirent* readdir(DIR*); 33 | void rewinddir(DIR*); 34 | 35 | /* 36 | 37 | Copyright Kevlin Henney, 1997, 2003. All rights reserved. 38 | 39 | Permission to use, copy, modify, and distribute this software and its 40 | documentation for any purpose is hereby granted without fee, provided 41 | that this copyright and permissions notice appear in all copies and 42 | derivatives. 43 | 44 | This software is supplied "as is" without express or implied warranty. 45 | 46 | But that said, if there are any problems please get in touch. 47 | 48 | */ 49 | 50 | #ifdef __cplusplus 51 | } 52 | #endif 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /License/tiff.license: -------------------------------------------------------------------------------- 1 | Copyright (c) 1988-1997 Sam Leffler 2 | Copyright (c) 1991-1997 Silicon Graphics, Inc. 3 | 4 | Permission to use, copy, modify, distribute, and sell this software and 5 | its documentation for any purpose is hereby granted without fee, provided 6 | that (i) the above copyright notices and this permission notice appear in 7 | all copies of the software and related documentation, and (ii) the names of 8 | Sam Leffler and Silicon Graphics may not be used in any advertising or 9 | publicity relating to the software without the specific, prior written 10 | permission of Sam Leffler and Silicon Graphics. 11 | 12 | THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 13 | EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 14 | WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR 17 | ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, 18 | OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 19 | WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 20 | LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 21 | OF THIS SOFTWARE. 22 | 23 | The source codes used for this project can be found at http://scm.bluequartz.net 24 | -------------------------------------------------------------------------------- /Code/MBIRLib/HAADF/HAADF_QGGMRFPriorModel.cpp: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include "HAADF_QGGMRFPriorModel.h" 4 | #include "MBIRLib/Reconstruction/QGGMRF_Functions.h" 5 | 6 | 7 | namespace QGGMRF 8 | { 9 | 10 | void initializePriorModel(TomoInputsPtr tomoInputs, QGGMRF_Values* qggmrf_values) 11 | { 12 | qggmrf_values->MRF_P = 2; 13 | qggmrf_values->MRF_Q = tomoInputs->p; 14 | qggmrf_values->MRF_C = 0.001; 15 | qggmrf_values->MRF_ALPHA = 1.5; 16 | qggmrf_values->SIGMA_X_P = pow(tomoInputs->SigmaX, qggmrf_values->MRF_P); 17 | qggmrf_values->SIGMA_X_P_Q = pow(tomoInputs->SigmaX, (qggmrf_values->MRF_P - qggmrf_values->MRF_Q)); 18 | qggmrf_values->SIGMA_X_Q = pow(tomoInputs->SigmaX, qggmrf_values->MRF_Q); 19 | } 20 | 21 | // ----------------------------------------------------------------------------- 22 | // 23 | // ----------------------------------------------------------------------------- 24 | Real_t updatePriorModel(Real_t NewSigmaX, QGGMRF_Values* qggmrf_values, Real_t gamma) 25 | { 26 | Real_t SigmaX = gamma * pow(NewSigmaX * qggmrf_values->MRF_Q, 1.0 / qggmrf_values->MRF_Q); 27 | qggmrf_values->SIGMA_X_P = pow(SigmaX, qggmrf_values->MRF_P); 28 | qggmrf_values->SIGMA_X_P_Q = pow(SigmaX, (qggmrf_values->MRF_P - qggmrf_values->MRF_Q)); 29 | qggmrf_values->SIGMA_X_Q = pow(SigmaX, qggmrf_values->MRF_Q); 30 | return SigmaX; 31 | } 32 | 33 | 34 | } /* End Namespace */ 35 | -------------------------------------------------------------------------------- /Support/cmp/Linux_Tools/InstallLibraries.sh.in: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | InstallPrefix="${1}" 4 | 5 | if [ "x@HDF5_IS_SHARED@" = "x1" ]; then 6 | echo "Installing into ${1}" 7 | fi 8 | 9 | if [ "x@HDF5_IS_SHARED@" = "x1" ]; then 10 | 11 | cd "@HDF5_INSTALL@"/lib 12 | libs=`ls libhdf5@lib_suffix@.s*` 13 | for l in ${libs} 14 | do 15 | echo "Copy ${l} into Deployment Lib Directory" 16 | cp -d ${l} ${InstallPrefix}/lib/. 17 | done 18 | fi 19 | # We are done with the HDF5 portion. 20 | 21 | # Now we need to get the TBB if needed. 22 | 23 | #Only copy TBB Libraries if needed 24 | if [ "@OpenMBIR_USE_MultiThreading@" = "ON" ]; then 25 | 26 | cd "@TBB_LIBRARY_DIR@" 27 | # Copy the libtbb libraries 28 | libs=`ls libtbb@lib_suffix@.s*` 29 | for l in ${libs} 30 | do 31 | echo "Copy ${l} into Deployment Lib Directory" 32 | cp -d ${l} ${InstallPrefix}/lib/. 33 | done 34 | 35 | # Copy the libtbbmalloc libraries 36 | libs=`ls libtbbmalloc@lib_suffix@.s*` 37 | for l in ${libs} 38 | do 39 | echo "Copy ${l} into Deployment Lib Directory" 40 | cp -d ${l} ${InstallPrefix}/lib/. 41 | done 42 | fi 43 | 44 | # We are done with the TBB libraries 45 | 46 | # Write a qt.conf file into the bin directory to make sure we load the Qt plugins 47 | # from the proper location 48 | echo "[Paths]" > "${InstallPrefix}/bin/qt.conf" 49 | echo "Plugins = ../plugins" >> "${InstallPrefix}/bin/qt.conf" 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /Code/Applications/MRCSubset/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #--//////////////////////////////////////////////////////////////////////////// 2 | #-- Copyright (c) 2011, Michael A. Jackson. BlueQuartz Software 3 | #-- All rights reserved. 4 | #-- BSD License: http://www.opensource.org/licenses/bsd-license.html 5 | #-- This code was partly written under US Air Force Contract FA8650-07-D-5800 6 | #--//////////////////////////////////////////////////////////////////////////// 7 | 8 | project(MRCSubset) 9 | cmake_minimum_required(VERSION 2.8.6) 10 | 11 | 12 | # -------------------------------------------------------------------- 13 | # Setup the install rules for the various platforms 14 | set(install_dir "tools") 15 | if (WIN32) 16 | set (install_dir ".") 17 | endif() 18 | 19 | set(MRCSubset_SRCS 20 | ${MRCSubset_SOURCE_DIR}/MRCSubset.cpp 21 | ) 22 | 23 | BuildToolBundle(TARGET MRCSubset 24 | SOURCES ${MRCSubset_SRCS} 25 | DEBUG_EXTENSION ${EXE_DEBUG_EXTENSION} 26 | VERSION_MAJOR 27 | VERSION_MAJOR ${OpenMBIR_VER_MAJOR} 28 | VERSION_MINOR ${OpenMBIR_VER_MINOR} 29 | VERSION_PATCH ${OpenMBIR_VER_PATCH} 30 | BINARY_DIR ${PROJECT_BINARY_DIR}/MRCSubset 31 | COMPONENT Applications 32 | INSTALL_DEST ${install_dir} 33 | LINK_LIBRARIES MXA MBIRLib 34 | LIB_SEARCH_DIRS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} 35 | ) 36 | -------------------------------------------------------------------------------- /Code/QtSupport/TiltAngleGroupBox.h: -------------------------------------------------------------------------------- 1 | #ifndef _TiltAngleGroupBox_H_ 2 | #define _TiltAngleGroupBox_H_ 3 | 4 | 5 | #include 6 | #include 7 | 8 | #include "ui_TiltAngleGroupBox.h" 9 | 10 | class QAbstractButton; 11 | 12 | class TiltAngleGroupBox : public QGroupBox, private Ui::TiltAngleGroupBox 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | TiltAngleGroupBox(QWidget* parent = NULL); 18 | 19 | virtual ~TiltAngleGroupBox(); 20 | QVector getAngles(); 21 | void setNumTilts(int nTilts); 22 | 23 | public slots: 24 | void on_selectRawTlt_clicked(); 25 | void on_rawTltFile_textChanged(const QString& text); 26 | void on_increment_textChanged(const QString& text); 27 | void on_startingAngle_textChanged(const QString& text); 28 | void on_startIncrementBtn_toggled(bool b); 29 | void on_rawTltBtn_toggled(bool b); 30 | 31 | protected: 32 | void setupGui(); 33 | void toggleWidgetsForIncrement(); 34 | void toggleWidgetsForRawTltFile(); 35 | 36 | bool verifyPathExists(QString filePath, QLineEdit* lineEdit); 37 | void loadAngles(); 38 | 39 | private: 40 | QVector m_Angles; 41 | int m_NumTilts; 42 | 43 | static QString m_OpenDialogLastDirectory; 44 | 45 | TiltAngleGroupBox(const TiltAngleGroupBox&); // Copy Constructor Not Implemented 46 | void operator=(const TiltAngleGroupBox&); // Operator '=' Not Implemented 47 | }; 48 | 49 | 50 | #endif /* _TiltAngleGroupBox_H_ */ 51 | -------------------------------------------------------------------------------- /Support/cmp/Modules/FindSZip.cmake: -------------------------------------------------------------------------------- 1 | # - Find szlib 2 | # Find the native SZLIB includes and library 3 | # 4 | # SZLIB_INCLUDE_DIR - where to find szlib.h, etc. 5 | # SZLIB_LIBRARIES - List of libraries when using szlib. 6 | # SZLIB_FOUND - True if szlib found. 7 | 8 | MESSAGE(STATUS "MXAFindSZip.cmake: This File is Unfinished. Use at your own risk") 9 | IF (SZLIB_INCLUDE_DIR) 10 | # Already in cache, be silent 11 | SET(SZLIB_FIND_QUIETLY TRUE) 12 | ENDIF (SZLIB_INCLUDE_DIR) 13 | 14 | FIND_PATH(SZLIB_INCLUDE_DIR szlib.h 15 | /usr/local/include 16 | /usr/include 17 | ) 18 | 19 | SET(SZLIB_NAMES z szlib zdll) 20 | FIND_LIBRARY(SZLIB_LIBRARY 21 | NAMES ${SZLIB_NAMES} 22 | PATHS /usr/lib /usr/local/lib 23 | ) 24 | 25 | IF (SZLIB_INCLUDE_DIR AND SZLIB_LIBRARY) 26 | SET(SZLIB_FOUND TRUE) 27 | SET( SZLIB_LIBRARIES ${SZLIB_LIBRARY} ) 28 | ELSE (SZLIB_INCLUDE_DIR AND SZLIB_LIBRARY) 29 | SET(SZLIB_FOUND FALSE) 30 | SET( SZLIB_LIBRARIES ) 31 | ENDIF (SZLIB_INCLUDE_DIR AND SZLIB_LIBRARY) 32 | 33 | IF (SZLIB_FOUND) 34 | IF (NOT SZLIB_FIND_QUIETLY) 35 | MESSAGE(STATUS "Found SZLIB: ${SZLIB_LIBRARY}") 36 | ENDIF (NOT SZLIB_FIND_QUIETLY) 37 | ELSE (SZLIB_FOUND) 38 | IF (SZLIB_FIND_REQUIRED) 39 | MESSAGE(STATUS "Looked for Z libraries named ${SZLIBS_NAMES}.") 40 | MESSAGE(FATAL_ERROR "Could NOT find z library") 41 | ENDIF (SZLIB_FIND_REQUIRED) 42 | ENDIF (SZLIB_FOUND) 43 | 44 | MARK_AS_ADVANCED( 45 | SZLIB_LIBRARY 46 | SZLIB_INCLUDE_DIR 47 | ) 48 | -------------------------------------------------------------------------------- /Code/tclap/Visitor.h: -------------------------------------------------------------------------------- 1 | 2 | /****************************************************************************** 3 | * 4 | * file: Visitor.h 5 | * 6 | * Copyright (c) 2003, Michael E. Smoot . 7 | * All rights reverved. 8 | * 9 | * See the file COPYING in the top directory of this distribution for 10 | * more information. 11 | * 12 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 13 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 15 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 18 | * DEALINGS IN THE SOFTWARE. 19 | * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef TCLAP_VISITOR_H 24 | #define TCLAP_VISITOR_H 25 | 26 | namespace TCLAP { 27 | 28 | /** 29 | * A base class that defines the interface for visitors. 30 | */ 31 | class Visitor 32 | { 33 | public: 34 | 35 | /** 36 | * Constructor. Does nothing. 37 | */ 38 | Visitor() { } 39 | 40 | /** 41 | * Destructor. Does nothing. 42 | */ 43 | virtual ~Visitor() { } 44 | 45 | /** 46 | * Does nothing. Should be overridden by child. 47 | */ 48 | virtual void visit() { } 49 | }; 50 | 51 | } 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /Code/MXA/Common/IO/Private/MXAPrivateFileWriter.cpp: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // Copyright (c) 2009, Michael A. Jackson. BlueQuartz Software 4 | // All rights reserved. 5 | // BSD License: http://www.opensource.org/licenses/bsd-license.html 6 | // 7 | // 8 | 9 | #include "MXAPrivateFileWriter.h" 10 | 11 | 12 | 13 | // ----------------------------------------------------------------------------- 14 | // 15 | // ----------------------------------------------------------------------------- 16 | MXAFILEWRITER_CLASS_NAME::MXAFILEWRITER_CLASS_NAME(const std::string& filename) : 17 | _filename(filename) 18 | { 19 | 20 | } 21 | 22 | // ----------------------------------------------------------------------------- 23 | // 24 | // ----------------------------------------------------------------------------- 25 | MXAFILEWRITER_CLASS_NAME::~MXAFILEWRITER_CLASS_NAME() 26 | { 27 | 28 | } 29 | 30 | // ----------------------------------------------------------------------------- 31 | // 32 | // ----------------------------------------------------------------------------- 33 | bool MXAFILEWRITER_CLASS_NAME::initWriter() 34 | { 35 | _outStream.open(this->_filename.c_str(), std::ios::out | std::ios::binary); 36 | if ( _outStream.fail() ) 37 | { 38 | std::cout << "Output File '" << this->_filename << "' could not be opened for writing. Please" << 39 | " check the path is correct and permissions are set correctly on the parent folder." << std::endl; 40 | return false; 41 | } 42 | return true; 43 | } 44 | 45 | -------------------------------------------------------------------------------- /Code/MXA/Common/IO/Private/MXAPrivateFileReader.cpp: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // Copyright (c) 2009, Michael A. Jackson. BlueQuartz Software 4 | // All rights reserved. 5 | // BSD License: http://www.opensource.org/licenses/bsd-license.html 6 | // 7 | // 8 | 9 | #include "MXAPrivateFileReader.h" 10 | #include 11 | 12 | 13 | // ----------------------------------------------------------------------------- 14 | // 15 | // ----------------------------------------------------------------------------- 16 | MXAFILEREADER_CLASS_NAME::MXAFILEREADER_CLASS_NAME(const std::string& filename) : 17 | _filename(filename) 18 | { 19 | 20 | } 21 | 22 | // ----------------------------------------------------------------------------- 23 | // 24 | // ----------------------------------------------------------------------------- 25 | MXAFILEREADER_CLASS_NAME::~MXAFILEREADER_CLASS_NAME() 26 | { 27 | 28 | } 29 | 30 | // ----------------------------------------------------------------------------- 31 | // 32 | // ----------------------------------------------------------------------------- 33 | bool MXAFILEREADER_CLASS_NAME::initReader() 34 | { 35 | // Open a stream with a large buffer. 36 | _buffer.resize(BUFF_SIZE, 0); 37 | _instream.rdbuf()->pubsetbuf ( &(_buffer.front()), BUFF_SIZE ); 38 | _instream.open ( _filename.c_str(), std::ifstream::in | std::ifstream::binary ); 39 | if ( !_instream.is_open() ) 40 | { 41 | std::cout << "Error: Failed to open file: " + _filename << std::endl; 42 | return false; 43 | } 44 | 45 | return true; 46 | } 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /Code/tclap/IgnoreRestVisitor.h: -------------------------------------------------------------------------------- 1 | 2 | /****************************************************************************** 3 | * 4 | * file: IgnoreRestVisitor.h 5 | * 6 | * Copyright (c) 2003, Michael E. Smoot . 7 | * All rights reverved. 8 | * 9 | * See the file COPYING in the top directory of this distribution for 10 | * more information. 11 | * 12 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 13 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 15 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 18 | * DEALINGS IN THE SOFTWARE. 19 | * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef TCLAP_IGNORE_REST_VISITOR_H 24 | #define TCLAP_IGNORE_REST_VISITOR_H 25 | 26 | #include 27 | #include 28 | 29 | namespace TCLAP { 30 | 31 | /** 32 | * A Vistor that tells the CmdLine to begin ignoring arguments after 33 | * this one is parsed. 34 | */ 35 | class IgnoreRestVisitor: public Visitor 36 | { 37 | public: 38 | 39 | /** 40 | * Constructor. 41 | */ 42 | IgnoreRestVisitor() : Visitor() {} 43 | 44 | /** 45 | * Sets Arg::_ignoreRest. 46 | */ 47 | void visit() { Arg::beginIgnoring(); } 48 | }; 49 | 50 | } 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /Support/cmp/ConfiguredFiles/cmpVersion.h.in: -------------------------------------------------------------------------------- 1 | /*-------------------------------------------------------------------------- 2 | * This file is autogenerated from @CMP_SOURCE_DIR@/ConfiguredFiles/cmpVersion.h.in during the cmake 3 | * configuration of your project. If you need to make changes, edit the 4 | * original file NOT THIS FILE. 5 | * --------------------------------------------------------------------------*/ 6 | 7 | 8 | #ifndef _@VERSION_GEN_NAMESPACE@_VERSION_H_ 9 | #define _@VERSION_GEN_NAMESPACE@_VERSION_H_ 10 | 11 | 12 | #include 13 | 14 | #include "@CMP_TOP_HEADER_FILE@" 15 | 16 | 17 | namespace @VERSION_GEN_NAMESPACE@ 18 | { 19 | /* 20 | namespace Version 21 | { 22 | std::string Complete(); 23 | std::string Major (); 24 | std::string Minor (); 25 | std::string Patch (); 26 | std::string Package (); 27 | std::string PackageComplete (); 28 | } 29 | */ 30 | 31 | class Version 32 | { 33 | public: 34 | virtual ~Version(); 35 | 36 | static @VERSION_GEN_NAMESPACE@_EXPORT std::string Complete(); 37 | static @VERSION_GEN_NAMESPACE@_EXPORT std::string Major (); 38 | static @VERSION_GEN_NAMESPACE@_EXPORT std::string Minor (); 39 | static @VERSION_GEN_NAMESPACE@_EXPORT std::string Patch (); 40 | static @VERSION_GEN_NAMESPACE@_EXPORT std::string Package (); 41 | static @VERSION_GEN_NAMESPACE@_EXPORT std::string PackageComplete (); 42 | 43 | protected: 44 | Version(); 45 | 46 | }; 47 | } 48 | 49 | 50 | 51 | 52 | 53 | #endif /* _@VERSION_GEN_NAMESPACE@_VERSION_H_ */ 54 | -------------------------------------------------------------------------------- /Code/Applications/BFReconstruction/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #--//////////////////////////////////////////////////////////////////////////// 2 | #-- Copyright (c) 2011, Michael A. Jackson. BlueQuartz Software 3 | #-- All rights reserved. 4 | #-- BSD License: http://www.opensource.org/licenses/bsd-license.html 5 | #-- This code was partly written under US Air Force Contract FA8650-07-D-5800 6 | #--//////////////////////////////////////////////////////////////////////////// 7 | 8 | project(BFReconstruction) 9 | cmake_minimum_required(VERSION 2.8.6) 10 | 11 | # -------------------------------------------------------------------- 12 | # Setup the install rules for the various platforms 13 | set(install_dir "tools") 14 | if (WIN32) 15 | set (install_dir ".") 16 | endif() 17 | 18 | set(BFReconstruction_SRCS 19 | ${BFReconstruction_SOURCE_DIR}/main.cpp 20 | ${BFReconstruction_SOURCE_DIR}/BFReconstructionArgsParser.cpp 21 | ${BFReconstruction_SOURCE_DIR}/BFReconstructionArgsParser.h 22 | ) 23 | 24 | BuildToolBundle(TARGET BFReconstruction 25 | SOURCES ${BFReconstruction_SRCS} 26 | DEBUG_EXTENSION ${EXE_DEBUG_EXTENSION} 27 | VERSION_MAJOR 28 | VERSION_MAJOR ${OpenMBIR_VER_MAJOR} 29 | VERSION_MINOR ${OpenMBIR_VER_MINOR} 30 | VERSION_PATCH ${OpenMBIR_VER_PATCH} 31 | BINARY_DIR ${PROJECT_BINARY_DIR}/BFReconstruction 32 | COMPONENT Applications 33 | INSTALL_DEST ${install_dir} 34 | LINK_LIBRARIES MBIRLib 35 | LIB_SEARCH_DIRS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} 36 | ) 37 | -------------------------------------------------------------------------------- /Code/Applications/HAADFReconstruction/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #--//////////////////////////////////////////////////////////////////////////// 2 | #-- Copyright (c) 2011, Michael A. Jackson. BlueQuartz Software 3 | #-- All rights reserved. 4 | #-- BSD License: http://www.opensource.org/licenses/bsd-license.html 5 | #-- This code was partly written under US Air Force Contract FA8650-07-D-5800 6 | #--//////////////////////////////////////////////////////////////////////////// 7 | 8 | project(HAADFReconstruction) 9 | cmake_minimum_required(VERSION 2.8.6) 10 | 11 | # -------------------------------------------------------------------- 12 | # Setup the install rules for the various platforms 13 | set(install_dir "tools") 14 | if (WIN32) 15 | set (install_dir ".") 16 | endif() 17 | 18 | set(HAADFReconstruction_SRCS 19 | ${HAADFReconstruction_SOURCE_DIR}/main.cpp 20 | ${HAADFReconstruction_SOURCE_DIR}/HAADFReconstructionArgsParser.cpp 21 | ${HAADFReconstruction_SOURCE_DIR}/HAADFReconstructionArgsParser.h 22 | ) 23 | 24 | BuildToolBundle(TARGET HAADFReconstruction 25 | SOURCES ${HAADFReconstruction_SRCS} 26 | DEBUG_EXTENSION ${EXE_DEBUG_EXTENSION} 27 | VERSION_MAJOR 28 | VERSION_MAJOR ${OpenMBIR_VER_MAJOR} 29 | VERSION_MINOR ${OpenMBIR_VER_MINOR} 30 | VERSION_PATCH ${OpenMBIR_VER_PATCH} 31 | BINARY_DIR ${PROJECT_BINARY_DIR}/HAADFReconstruction 32 | COMPONENT Applications 33 | INSTALL_DEST ${install_dir} 34 | LINK_LIBRARIES MBIRLib 35 | LIB_SEARCH_DIRS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} 36 | ) 37 | -------------------------------------------------------------------------------- /Code/MXA/Common/RTTIMacros.h: -------------------------------------------------------------------------------- 1 | #ifndef RTTIMACROS_H_ 2 | #define RTTIMACROS_H_ 3 | 4 | 5 | 6 | // 7 | // Copyright (c) 2002, Perry L. Miller IV 8 | // Small Changes by Michael A. Jackson for the MXA Project 9 | // All rights reserved. 10 | // BSD License: http://www.opensource.org/licenses/bsd-license.html 11 | // 12 | 13 | 14 | 15 | // 16 | // Base class with virtual type-id member. 17 | // 18 | 19 | 20 | 21 | 22 | #include "MXA/MXADLLExport.h" 23 | 24 | #include 25 | 26 | 27 | namespace MXA 28 | { 29 | namespace RTTI 30 | { 31 | 32 | 33 | struct MXA_EXPORT Typed 34 | { 35 | static const std::type_info& classTypeId(); 36 | virtual const std::type_info& typeId() const = 0; 37 | }; 38 | 39 | 40 | }; // namespace RTTI 41 | }; // namespace MXA 42 | 43 | 44 | 45 | // 46 | // Convenience macros so that classes can easily implement typeId(). 47 | // 48 | 49 | 50 | #define MXA_DECLARE_TYPE_ID(class_name) \ 51 | static const std::type_info &classTypeId(); \ 52 | virtual const std::type_info &typeId() const 53 | 54 | #define MXA_IMPLEMENT_TYPE_ID(class_name) \ 55 | const std::type_info &class_name::classTypeId() \ 56 | { \ 57 | return typeid ( class_name ); \ 58 | } \ 59 | const std::type_info &class_name::typeId() const \ 60 | { \ 61 | return class_name::classTypeId(); \ 62 | } 63 | 64 | #define MXA_IMPLEMENT_INLINE_TYPE_ID(class_name) \ 65 | static const std::type_info &classTypeId() \ 66 | { \ 67 | return typeid ( class_name ); \ 68 | } \ 69 | virtual const std::type_info &typeId() const \ 70 | { \ 71 | return class_name::classTypeId(); \ 72 | } 73 | 74 | 75 | 76 | 77 | #endif /*RTTIMACROS_H_*/ 78 | -------------------------------------------------------------------------------- /Support/cmp/Modules/FindEigen.cmake: -------------------------------------------------------------------------------- 1 | # - Find Eigen Library 2 | # Find teh native Eigen headers and Libraries 3 | # 4 | # EIGEN_INCLUDE_DIRS 5 | # EIGEN_FOUND 6 | # 7 | # User can set the EIGEN_INSTALL environment variable to help find the installation 8 | 9 | set(EIGEN_DEBUG 0) 10 | 11 | if("${EIGEN_INSTALL}" STREQUAL "") 12 | set(EIGEN_INSTALL $ENV{EIGEN_INSTALL}) 13 | endif() 14 | 15 | 16 | SET(EIGEN_INCLUDE_SEARCH_DIRS 17 | ${EIGEN_INSTALL}/include/eigen3 18 | ) 19 | 20 | FIND_PATH(EIGEN_INCLUDE_DIR 21 | NAMES Eigen/Eigen 22 | PATHS ${EIGEN_INCLUDE_SEARCH_DIRS} 23 | NO_DEFAULT_PATH 24 | ) 25 | 26 | mark_as_advanced(EIGEN_INCLUDE_DIR) 27 | 28 | if(EIGEN_DEBUG) 29 | MESSAGE(STATUS "EIGEN_INCLUDE_SEARCH_DIRS: ${EIGEN_INCLUDE_SEARCH_DIRS}") 30 | MESSAGE(STATUS "EIGEN_INCLUDE_DIR: ${EIGEN_INCLUDE_DIR}") 31 | endif(EIGEN_DEBUG) 32 | 33 | # Copy the results to the output variables. 34 | if(EIGEN_INCLUDE_DIR ) 35 | SET(EIGEN_FOUND 1) 36 | SET(EIGEN_INCLUDE_DIRS ${EIGEN_INCLUDE_DIR}) 37 | ELSE(EIGEN_INCLUDE_DIR) 38 | SET(EIGEN_FOUND 0) 39 | SET(EIGEN_INCLUDE_DIRS) 40 | ENDif(EIGEN_INCLUDE_DIR) 41 | 42 | 43 | # Report the results. 44 | if(NOT EIGEN_FOUND) 45 | SET(EIGEN_DIR_MESSAGE 46 | "EIGEN was not found. Make sure EIGEN_INCLUDE_DIR are set or set the EIGEN_INSTALL environment variable.") 47 | if(NOT EIGEN_FIND_QUIETLY) 48 | MESSAGE(STATUS "${EIGEN_DIR_MESSAGE}") 49 | ELSE(NOT EIGEN_FIND_QUIETLY) 50 | if(EIGEN_FIND_REQUIRED) 51 | MESSAGE(FATAL_ERROR "EIGEN was NOT found and is Required by this project") 52 | ENDif(EIGEN_FIND_REQUIRED) 53 | ENDif(NOT EIGEN_FIND_QUIETLY) 54 | else() 55 | message(STATUS "Found Eigen Library: ${EIGEN_INCLUDE_DIR}") 56 | endif(NOT EIGEN_FOUND) 57 | 58 | -------------------------------------------------------------------------------- /License/MXA.license: -------------------------------------------------------------------------------- 1 | Copyright (c) <2008,2009,2010>, 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | 1) Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 2) Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | 3) Neither the name of Michael A. Jackson nor BlueQuartz Software nor the names 13 | of its contributors may be used to endorse or promote products derived from this 14 | software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 20 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 21 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 24 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 25 | OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | The source codes used for this project can be found at http://scm.bluequartz.net -------------------------------------------------------------------------------- /Code/MBIRLib/BrightField/SourceList.cmake: -------------------------------------------------------------------------------- 1 | #--//////////////////////////////////////////////////////////////////////////// 2 | #-- Copyright (c) 2009, Michael A. Jackson. BlueQuartz Software 3 | #-- All rights reserved. 4 | #-- BSD License: http://www.opensource.org/licenses/bsd-license.html 5 | #-- This code was partly written under US Air Force Contract FA8650-07-D-5800 6 | #--//////////////////////////////////////////////////////////////////////////// 7 | 8 | set (MBIRLib_BrightField_HDRS 9 | ${MBIRLib_SOURCE_DIR}/BrightField/BFForwardModel.h 10 | ${MBIRLib_SOURCE_DIR}/BrightField/BFForwardProject.h 11 | ${MBIRLib_SOURCE_DIR}/BrightField/BF_QGGMRFPriorModel.h 12 | ${MBIRLib_SOURCE_DIR}/BrightField/BFUpdateYSlice.h 13 | ${MBIRLib_SOURCE_DIR}/BrightField/BFReconstructionEngine.h 14 | ${MBIRLib_SOURCE_DIR}/BrightField/BFMultiResolutionReconstruction.h 15 | ${MBIRLib_SOURCE_DIR}/BrightField/BFConstants.h 16 | ) 17 | 18 | set (MBIRLib_BrightField_SRCS 19 | ${MBIRLib_SOURCE_DIR}/BrightField/BFForwardModel.cpp 20 | ${MBIRLib_SOURCE_DIR}/BrightField/BFForwardProject.cpp 21 | ${MBIRLib_SOURCE_DIR}/BrightField/BF_QGGMRFPriorModel.cpp 22 | ${MBIRLib_SOURCE_DIR}/BrightField/BFUpdateYSlice.cpp 23 | ${MBIRLib_SOURCE_DIR}/BrightField/BFReconstructionEngine.cpp 24 | ${MBIRLib_SOURCE_DIR}/BrightField/BFReconstructionEngine_Extra.cpp 25 | ${MBIRLib_SOURCE_DIR}/BrightField/BFMultiResolutionReconstruction.cpp 26 | ) 27 | 28 | set_source_files_properties( ${MBIRLib_SOURCE_DIR}/BrightField/BFReconstructionEngine_Extra.cpp 29 | PROPERTIES HEADER_FILE_ONLY TRUE) 30 | 31 | cmp_IDE_SOURCE_PROPERTIES( "MBIRLib/BrightField" "${MBIRLib_BrightField_HDRS}" "${MBIRLib_BrightField_SRCS}" "${CMP_INSTALL_FILES}") 32 | -------------------------------------------------------------------------------- /Code/MBIRLib/HAADF/SourceList.cmake: -------------------------------------------------------------------------------- 1 | #--//////////////////////////////////////////////////////////////////////////// 2 | #-- 3 | #-- Copyright (c) 2011, Michael A. Jackson. BlueQuartz Software 4 | 5 | #-- All rights reserved. 6 | #-- BSD License: http://www.opensource.org/licenses/bsd-license.html 7 | #-- 8 | #-- This code was partly written under US Air Force Contract FA8650-07-D-5800 9 | #-- 10 | #--//////////////////////////////////////////////////////////////////////////// 11 | 12 | 13 | set (MBIRLib_HAADF_SRCS 14 | ${MBIRLib_SOURCE_DIR}/HAADF/HAADF_QGGMRFPriorModel.cpp 15 | ${MBIRLib_SOURCE_DIR}/HAADF/HAADF_MultiResolutionReconstruction.cpp 16 | ${MBIRLib_SOURCE_DIR}/HAADF/HAADF_ForwardModel.cpp 17 | ${MBIRLib_SOURCE_DIR}/HAADF/HAADF_ForwardProject.cpp 18 | ${MBIRLib_SOURCE_DIR}/HAADF/HAADF_ReconstructionEngine.cpp 19 | ${MBIRLib_SOURCE_DIR}/HAADF/HAADF_ReconstructionEngine_UpdateVoxels.cpp 20 | ${MBIRLib_SOURCE_DIR}/HAADF/HAADF_ReconstructionEngine_Extra.cpp 21 | ) 22 | 23 | set (MBIRLib_HAADF_HDRS 24 | ${MBIRLib_SOURCE_DIR}/HAADF/HAADFConstants.h 25 | ${MBIRLib_SOURCE_DIR}/HAADF/HAADF_ForwardModel.h 26 | ${MBIRLib_SOURCE_DIR}/HAADF/HAADF_QGGMRFPriorModel.h 27 | ${MBIRLib_SOURCE_DIR}/HAADF/HAADF_MultiResolutionReconstruction.h 28 | ${MBIRLib_SOURCE_DIR}/HAADF/HAADF_ForwardProject.h 29 | ${MBIRLib_SOURCE_DIR}/HAADF/HAADF_ReconstructionEngine.h 30 | ) 31 | 32 | set_source_files_properties( ${MBIRLib_SOURCE_DIR}/HAADF/HAADF_ReconstructionEngine_UpdateVoxels.cpp 33 | ${MBIRLib_SOURCE_DIR}/HAADF/HAADF_ReconstructionEngine_Extra.cpp 34 | PROPERTIES HEADER_FILE_ONLY TRUE) 35 | 36 | cmp_IDE_SOURCE_PROPERTIES( "MBIRLib/HAADF" "${MBIRLib_HAADF_HDRS}" "${MBIRLib_HAADF_SRCS}" "${CMP_INSTALL_FILES}") 37 | -------------------------------------------------------------------------------- /Resources/InputFiles/ParamsWithROIAndViewSelectShepLogan.txt: -------------------------------------------------------------------------------- 1 | SinoN_r 2 | 128 3 | SinoN_t 4 | 3 5 | N_tStart 6 | 0 7 | N_tEnd 8 | 2 9 | N_rStart 10 | 0 11 | N_rEnd 12 | 127 13 | SinoN_theta 87 SinoDelta_r 14 | 1 15 | SinoDelta_t 1 SinoAngles 16 | -70 17 | 1 18 | -69 19 | 1 20 | -68 21 | 1 22 | -67 23 | 1 24 | -66 25 | 1 26 | -65 27 | 1 28 | -64 29 | 1 30 | -63 31 | 1 32 | -62 33 | 1 34 | -61 35 | 1 36 | -60 37 | 1 38 | -59 39 | 1 40 | -58 41 | 1 42 | -57 43 | 1 44 | -56 45 | 1 46 | -55 47 | 1 48 | -54 49 | 1 50 | -52 51 | 1 52 | -50 53 | 1 54 | -48 55 | 1 56 | -46 57 | 1 58 | -44 59 | 1 60 | -42 61 | 1 62 | -40 63 | 1 64 | -38 65 | 1 66 | -36 67 | 1 68 | -34 69 | 1 70 | -32 71 | 1 72 | -30 73 | 1 74 | -28 75 | 1 76 | -26 77 | 1 78 | -24 79 | 1 80 | -22 81 | 1 82 | -20 83 | 1 84 | -18 85 | 1 86 | -16 87 | 1 88 | -14 89 | 1 90 | -12 91 | 1 92 | -10 93 | 1 94 | -8 95 | 1 96 | -6 97 | 1 98 | -4 99 | 1 100 | -2 101 | 1 102 | 0 103 | 1 104 | 2 105 | 1 106 | 4 107 | 1 108 | 6 109 | 1 110 | 8 111 | 1 112 | 10 113 | 1 114 | 12 115 | 1 116 | 14 117 | 1 118 | 16 119 | 1 120 | 18 121 | 1 122 | 20 123 | 1 124 | 22 125 | 1 126 | 24 127 | 1 128 | 26 129 | 1 130 | 28 131 | 1 132 | 30 133 | 1 134 | 32 135 | 1 136 | 34 137 | 1 138 | 36 139 | 1 140 | 38 141 | 1 142 | 40 143 | 1 144 | 42 145 | 1 146 | 44 147 | 1 148 | 46 149 | 1 150 | 48 151 | 1 152 | 50 153 | 1 154 | 52 155 | 1 156 | 54 157 | 1 158 | 55 159 | 1 160 | 56 161 | 1 162 | 57 163 | 1 164 | 58 165 | 1 166 | 59 167 | 1 168 | 60 169 | 1 170 | 61 171 | 1 172 | 62 173 | 1 174 | 63 175 | 1 176 | 64 177 | 1 178 | 65 179 | 1 180 | 66 181 | 1 182 | 67 183 | 1 184 | 68 185 | 1 186 | 69 187 | 1 188 | 70 189 | 1 190 | GeomDeltaXZ 1 GeomDeltaXY 1 GeomLengthZ 128 191 | TargetGain 192 | 1 -------------------------------------------------------------------------------- /Code/MBIRLib/Common/SourceList.cmake: -------------------------------------------------------------------------------- 1 | #--//////////////////////////////////////////////////////////////////////////// 2 | #-- Copyright (c) 2009, Michael A. Jackson. BlueQuartz Software 3 | #-- All rights reserved. 4 | #-- BSD License: http://www.opensource.org/licenses/bsd-license.html 5 | #-- This code was partly written under US Air Force Contract FA8650-07-D-5800 6 | #--//////////////////////////////////////////////////////////////////////////// 7 | set (MBIRLib_Common_SRCS 8 | ${MBIRLib_SOURCE_DIR}/Common/allocate.c 9 | ${MBIRLib_SOURCE_DIR}/Common/AMatrixCol.cpp 10 | ${MBIRLib_SOURCE_DIR}/Common/EIMTime.c 11 | ${MBIRLib_SOURCE_DIR}/Common/EIMImage.cpp 12 | ${MBIRLib_SOURCE_DIR}/Common/AbstractFilter.cpp 13 | ${MBIRLib_SOURCE_DIR}/Common/FilterPipeline.cpp 14 | ${MBIRLib_SOURCE_DIR}/Common/Observer.cpp 15 | ${MBIRLib_SOURCE_DIR}/Common/Observable.cpp 16 | ${MBIRLib_SOURCE_DIR}/Common/VoxelUpdateList.cpp 17 | ) 18 | 19 | set (MBIRLib_Common_HDRS 20 | ${MBIRLib_SOURCE_DIR}/Common/allocate.h 21 | ${MBIRLib_SOURCE_DIR}/Common/AMatrixCol.h 22 | ${MBIRLib_SOURCE_DIR}/Common/MBIRLibDLLExport.h 23 | ${MBIRLib_SOURCE_DIR}/Common/MSVCDefines.h 24 | ${MBIRLib_SOURCE_DIR}/Common/EIMImage.h 25 | ${MBIRLib_SOURCE_DIR}/Common/EIMTime.h 26 | ${MBIRLib_SOURCE_DIR}/Common/EIMMath.h 27 | ${MBIRLib_SOURCE_DIR}/Common/AbstractFilter.h 28 | ${MBIRLib_SOURCE_DIR}/Common/FilterPipeline.h 29 | ${MBIRLib_SOURCE_DIR}/Common/Observer.h 30 | ${MBIRLib_SOURCE_DIR}/Common/Observable.h 31 | ${MBIRLib_SOURCE_DIR}/Common/CE_ConstraintEquation.hpp 32 | ${MBIRLib_SOURCE_DIR}/Common/DerivOfCostFunc.hpp 33 | ${MBIRLib_SOURCE_DIR}/Common/TomoArray.hpp 34 | ${MBIRLib_SOURCE_DIR}/Common/VoxelUpdateList.h 35 | ) 36 | 37 | cmp_IDE_SOURCE_PROPERTIES( "MBIRLib/Common" "${MBIRLib_Common_HDRS}" "${MBIRLib_Common_SRCS}" "${CMP_INSTALL_FILES}") 38 | -------------------------------------------------------------------------------- /Code/MBIRLib/IOFilters/SourceList.cmake: -------------------------------------------------------------------------------- 1 | #--//////////////////////////////////////////////////////////////////////////// 2 | #-- Copyright (c) 2011, Michael A. Jackson. BlueQuartz Software 3 | #-- All rights reserved. 4 | #-- BSD License: http://www.opensource.org/licenses/bsd-license.html 5 | #-- This code was partly written under US Air Force Contract FA8650-07-D-5800 6 | #--//////////////////////////////////////////////////////////////////////////// 7 | set (MBIRLib_IOFilters_SRCS 8 | ${MBIRLib_SOURCE_DIR}/IOFilters/AvizoUniformCoordinateWriter.cpp 9 | ${MBIRLib_SOURCE_DIR}/IOFilters/DetectorResponseWriter.cpp 10 | ${MBIRLib_SOURCE_DIR}/IOFilters/GainsOffsetsReader.cpp 11 | ${MBIRLib_SOURCE_DIR}/IOFilters/RawGeometryWriter.cpp 12 | ${MBIRLib_SOURCE_DIR}/IOFilters/MRCReader.cpp 13 | ${MBIRLib_SOURCE_DIR}/IOFilters/MRCWriter.cpp 14 | ${MBIRLib_SOURCE_DIR}/IOFilters/NuisanceParamWriter.cpp 15 | ${MBIRLib_SOURCE_DIR}/IOFilters/NuisanceParamReader.cpp 16 | ${MBIRLib_SOURCE_DIR}/IOFilters/SinogramBinWriter.cpp 17 | ) 18 | 19 | set (MBIRLib_IOFilters_HDRS 20 | ${MBIRLib_SOURCE_DIR}/IOFilters/AvizoUniformCoordinateWriter.h 21 | ${MBIRLib_SOURCE_DIR}/IOFilters/DetectorResponseWriter.h 22 | ${MBIRLib_SOURCE_DIR}/IOFilters/GainsOffsetsReader.h 23 | ${MBIRLib_SOURCE_DIR}/IOFilters/VTKFileWriters.hpp 24 | ${MBIRLib_SOURCE_DIR}/IOFilters/VTKWriterMacros.h 25 | ${MBIRLib_SOURCE_DIR}/IOFilters/RawGeometryWriter.h 26 | ${MBIRLib_SOURCE_DIR}/IOFilters/MRCReader.h 27 | ${MBIRLib_SOURCE_DIR}/IOFilters/MRCWriter.h 28 | ${MBIRLib_SOURCE_DIR}/IOFilters/MRCHeader.h 29 | ${MBIRLib_SOURCE_DIR}/IOFilters/NuisanceParamWriter.h 30 | ${MBIRLib_SOURCE_DIR}/IOFilters/NuisanceParamReader.h 31 | ${MBIRLib_SOURCE_DIR}/IOFilters/SinogramBinWriter.h 32 | ) 33 | cmp_IDE_SOURCE_PROPERTIES( "MBIRLib/IOFilters" "${MBIRLib_IOFilters_HDRS}" "${MBIRLib_IOFilters_SRCS}" "${CMP_INSTALL_FILES}") 34 | 35 | -------------------------------------------------------------------------------- /License/Boost.license: -------------------------------------------------------------------------------- 1 | Boost from http://www.boost.org/ - A subset of the complete boost open-source 2 | project is being used by the project. The license to use and distribute boost 3 | related source and binaries is as follows: 4 | Boost Software License - Version 1.0 - August 17th, 2003 5 | 6 | Permission is hereby granted, free of charge, to any person or organization 7 | obtaining a copy of the software and accompanying documentation covered by 8 | this license (the "Software") to use, reproduce, display, distribute, 9 | execute, and transmit the Software, and to prepare derivative works of the 10 | Software, and to permit third-parties to whom the Software is furnished to 11 | do so, all subject to the following: 12 | 13 | The copyright notices in the Software and this entire statement, including 14 | the above license grant, this restriction and the following disclaimer, 15 | must be included in all copies of the Software, in whole or in part, and 16 | all derivative works of the Software, unless such copies or derivative 17 | works are solely in the form of machine-executable object code generated by 18 | a source language processor. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 23 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 24 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 25 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | 28 | The complete sub-set of boost is included in this release of the project. The source 29 | is compressed as a GZip file and can be found as the file "MXABoost.tar.gz". 30 | 31 | The source codes used for this project can be found at http://scm.bluequartz.net -------------------------------------------------------------------------------- /Code/tclap/OptionalUnlabeledTracker.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | /****************************************************************************** 4 | * 5 | * file: OptionalUnlabeledTracker.h 6 | * 7 | * Copyright (c) 2005, Michael E. Smoot . 8 | * All rights reverved. 9 | * 10 | * See the file COPYING in the top directory of this distribution for 11 | * more information. 12 | * 13 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 14 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 | * DEALINGS IN THE SOFTWARE. 20 | * 21 | *****************************************************************************/ 22 | 23 | 24 | #ifndef TCLAP_OPTIONAL_UNLABELED_TRACKER_H 25 | #define TCLAP_OPTIONAL_UNLABELED_TRACKER_H 26 | 27 | #include 28 | 29 | namespace TCLAP { 30 | 31 | class OptionalUnlabeledTracker 32 | { 33 | 34 | public: 35 | 36 | static void check( bool req, const std::string& argName ); 37 | 38 | static void gotOptional() { alreadyOptionalRef() = true; } 39 | 40 | static bool& alreadyOptional() { return alreadyOptionalRef(); } 41 | 42 | private: 43 | 44 | static bool& alreadyOptionalRef() { static bool ct = false; return ct; } 45 | }; 46 | 47 | 48 | inline void OptionalUnlabeledTracker::check( bool req, const std::string& argName ) 49 | { 50 | if ( OptionalUnlabeledTracker::alreadyOptional() ) 51 | throw( SpecificationException( 52 | "You can't specify ANY Unlabeled Arg following an optional Unlabeled Arg", 53 | argName ) ); 54 | 55 | if ( !req ) 56 | OptionalUnlabeledTracker::gotOptional(); 57 | } 58 | 59 | 60 | } // namespace TCLAP 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /Code/tclap/Constraint.h: -------------------------------------------------------------------------------- 1 | 2 | /****************************************************************************** 3 | * 4 | * file: Constraint.h 5 | * 6 | * Copyright (c) 2005, Michael E. Smoot 7 | * All rights reverved. 8 | * 9 | * See the file COPYING in the top directory of this distribution for 10 | * more information. 11 | * 12 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 13 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 15 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 18 | * DEALINGS IN THE SOFTWARE. 19 | * 20 | *****************************************************************************/ 21 | 22 | #ifndef TCLAP_CONSTRAINT_H 23 | #define TCLAP_CONSTRAINT_H 24 | 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | 32 | namespace TCLAP { 33 | 34 | /** 35 | * The interface that defines the interaction between the Arg and Constraint. 36 | */ 37 | template 38 | class Constraint 39 | { 40 | 41 | public: 42 | /** 43 | * Returns a description of the Constraint. 44 | */ 45 | virtual std::string description() const =0; 46 | 47 | /** 48 | * Returns the short ID for the Constraint. 49 | */ 50 | virtual std::string shortID() const =0; 51 | 52 | /** 53 | * The method used to verify that the value parsed from the command 54 | * line meets the constraint. 55 | * \param value - The value that will be checked. 56 | */ 57 | virtual bool check(const T& value) const =0; 58 | 59 | /** 60 | * Destructor. 61 | * Silences warnings about Constraint being a base class with virtual 62 | * functions but without a virtual destructor. 63 | */ 64 | virtual ~Constraint() { ; } 65 | }; 66 | 67 | } //namespace TCLAP 68 | #endif 69 | -------------------------------------------------------------------------------- /Code/tclap/HelpVisitor.h: -------------------------------------------------------------------------------- 1 | 2 | /****************************************************************************** 3 | * 4 | * file: HelpVisitor.h 5 | * 6 | * Copyright (c) 2003, Michael E. Smoot . 7 | * All rights reverved. 8 | * 9 | * See the file COPYING in the top directory of this distribution for 10 | * more information. 11 | * 12 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 13 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 15 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 18 | * DEALINGS IN THE SOFTWARE. 19 | * 20 | *****************************************************************************/ 21 | 22 | #ifndef TCLAP_HELP_VISITOR_H 23 | #define TCLAP_HELP_VISITOR_H 24 | 25 | #include 26 | #include 27 | #include 28 | 29 | namespace TCLAP { 30 | 31 | /** 32 | * A Visitor object that calls the usage method of the given CmdLineOutput 33 | * object for the specified CmdLine object. 34 | */ 35 | class HelpVisitor: public Visitor 36 | { 37 | protected: 38 | 39 | /** 40 | * The CmdLine the output will be generated for. 41 | */ 42 | CmdLineInterface* _cmd; 43 | 44 | /** 45 | * The output object. 46 | */ 47 | CmdLineOutput** _out; 48 | 49 | public: 50 | 51 | /** 52 | * Constructor. 53 | * \param cmd - The CmdLine the output will be generated for. 54 | * \param out - The type of output. 55 | */ 56 | HelpVisitor(CmdLineInterface* cmd, CmdLineOutput** out) 57 | : Visitor(), _cmd( cmd ), _out( out ) { } 58 | 59 | /** 60 | * Calls the usage method of the CmdLineOutput for the 61 | * specified CmdLine. 62 | */ 63 | void visit() { (*_out)->usage(*_cmd); throw ExitException(0); } 64 | 65 | }; 66 | 67 | } 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /Code/QtSupport/QFSDropLineEdit.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) 2010, Michael A. Jackson. BlueQuartz Software 4 | // All rights reserved. 5 | // BSD License: http://www.opensource.org/licenses/bsd-license.html 6 | // 7 | /////////////////////////////////////////////////////////////////////////////// 8 | 9 | #include "QFSDropLineEdit.h" 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | 17 | // ----------------------------------------------------------------------------- 18 | // 19 | // ----------------------------------------------------------------------------- 20 | QFSDropLineEdit::QFSDropLineEdit(QWidget* parent) 21 | : QLineEdit(parent) 22 | { 23 | 24 | } 25 | 26 | // ----------------------------------------------------------------------------- 27 | // 28 | // ----------------------------------------------------------------------------- 29 | void QFSDropLineEdit::dragEnterEvent(QDragEnterEvent* event) 30 | { 31 | // accept just text/uri-list mime format 32 | if (event->mimeData()->hasFormat("text/uri-list")) 33 | { 34 | event->acceptProposedAction(); 35 | } 36 | } 37 | 38 | // ----------------------------------------------------------------------------- 39 | // 40 | // ----------------------------------------------------------------------------- 41 | void QFSDropLineEdit::dropEvent(QDropEvent* event) 42 | { 43 | QList urlList; 44 | QString fName; 45 | QFileInfo info; 46 | 47 | if (event->mimeData()->hasUrls()) 48 | { 49 | urlList = event->mimeData()->urls(); // returns list of QUrls 50 | // if just text was dropped, urlList is empty (size == 0) 51 | 52 | if ( urlList.size() > 0) // if at least one QUrl is present in list 53 | { 54 | fName = urlList[0].toLocalFile(); // convert first QUrl to local path 55 | info.setFile( fName ); // information about file 56 | setText( fName ); // if is file, setText 57 | } 58 | } 59 | 60 | event->acceptProposedAction(); 61 | } 62 | 63 | 64 | -------------------------------------------------------------------------------- /License.txt: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * Copyright (c) 2013 Michael A. Jackson (BlueQuartz Software) 3 | * Copyright (c) 2013 Singanallur Venkatakrishnan (Purdue University) 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without modification, 7 | * are permitted provided that the following conditions are met: 8 | * 9 | * Redistributions of source code must retain the above copyright notice, this 10 | * list of conditions and the following disclaimer. 11 | * 12 | * Redistributions in binary form must reproduce the above copyright notice, this 13 | * list of conditions and the following disclaimer in the documentation and/or 14 | * other materials provided with the distribution. 15 | * 16 | * Neither the name of Singanallur Venkatakrishnan, Michael A. Jackson, the Pudue 17 | * Univeristy, BlueQuartz Software nor the names of its contributors may be used 18 | * to endorse or promote products derived from this software without specific 19 | * prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 27 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 30 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * This code was written under United States Air Force Contract number 33 | * FA8650-07-D-5800 34 | * 35 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ 36 | -------------------------------------------------------------------------------- /Code/tclap/VersionVisitor.h: -------------------------------------------------------------------------------- 1 | // -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*- 2 | 3 | /****************************************************************************** 4 | * 5 | * file: VersionVisitor.h 6 | * 7 | * Copyright (c) 2003, Michael E. Smoot . 8 | * All rights reverved. 9 | * 10 | * See the file COPYING in the top directory of this distribution for 11 | * more information. 12 | * 13 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 14 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 | * DEALINGS IN THE SOFTWARE. 20 | * 21 | *****************************************************************************/ 22 | 23 | 24 | #ifndef TCLAP_VERSION_VISITOR_H 25 | #define TCLAP_VERSION_VISITOR_H 26 | 27 | #include 28 | #include 29 | #include 30 | 31 | namespace TCLAP { 32 | 33 | /** 34 | * A Vistor that will call the version method of the given CmdLineOutput 35 | * for the specified CmdLine object and then exit. 36 | */ 37 | class VersionVisitor: public Visitor 38 | { 39 | protected: 40 | 41 | /** 42 | * The CmdLine of interest. 43 | */ 44 | CmdLineInterface* _cmd; 45 | 46 | /** 47 | * The output object. 48 | */ 49 | CmdLineOutput** _out; 50 | 51 | public: 52 | 53 | /** 54 | * Constructor. 55 | * \param cmd - The CmdLine the output is generated for. 56 | * \param out - The type of output. 57 | */ 58 | VersionVisitor( CmdLineInterface* cmd, CmdLineOutput** out ) 59 | : Visitor(), _cmd( cmd ), _out( out ) { } 60 | 61 | /** 62 | * Calls the version method of the output object using the 63 | * specified CmdLine. 64 | */ 65 | void visit() { 66 | (*_out)->version(*_cmd); 67 | throw ExitException(0); 68 | } 69 | 70 | }; 71 | 72 | } 73 | 74 | #endif 75 | -------------------------------------------------------------------------------- /Code/QtSupport/TomogramTiltLoader.cpp: -------------------------------------------------------------------------------- 1 | #include "TomogramTiltLoader.h" 2 | 3 | 4 | // ----------------------------------------------------------------------------- 5 | // 6 | // ----------------------------------------------------------------------------- 7 | TomogramTiltLoader::TomogramTiltLoader(QWidget* parent) : 8 | QDialog(parent) 9 | { 10 | setupUi(this); 11 | setupGui(); 12 | } 13 | 14 | // ----------------------------------------------------------------------------- 15 | // 16 | // ----------------------------------------------------------------------------- 17 | TomogramTiltLoader::~TomogramTiltLoader() 18 | { 19 | } 20 | 21 | // ----------------------------------------------------------------------------- 22 | // 23 | // ----------------------------------------------------------------------------- 24 | void TomogramTiltLoader::setupGui() 25 | { 26 | QDoubleValidator* dVal = new QDoubleValidator(this); 27 | dVal->setDecimals(6); 28 | pixelSize->setValidator(dVal); 29 | 30 | } 31 | 32 | // ----------------------------------------------------------------------------- 33 | // 34 | // ----------------------------------------------------------------------------- 35 | QVector TomogramTiltLoader::getATilts() 36 | { 37 | return aTilts->getAngles(); 38 | } 39 | 40 | // ----------------------------------------------------------------------------- 41 | // 42 | // ----------------------------------------------------------------------------- 43 | QVector TomogramTiltLoader::getBTilts() 44 | { 45 | return bTilts->getAngles(); 46 | } 47 | 48 | // ----------------------------------------------------------------------------- 49 | // 50 | // ----------------------------------------------------------------------------- 51 | float TomogramTiltLoader::getPixelSize() 52 | { 53 | bool ok = false; 54 | return pixelSize->text().toFloat(&ok); 55 | } 56 | 57 | // ----------------------------------------------------------------------------- 58 | // 59 | // ----------------------------------------------------------------------------- 60 | void TomogramTiltLoader::setNumTilts(int nTilts) 61 | { 62 | m_NumTilts = nTilts; 63 | aTilts->setNumTilts(m_NumTilts); 64 | bTilts->setNumTilts(m_NumTilts); 65 | } 66 | -------------------------------------------------------------------------------- /Code/QtSupport/UI_Files/ProcessQueueDialog.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | ProcessQueueDialog 4 | 5 | 6 | 7 | 0 8 | 0 9 | 311 10 | 150 11 | 12 | 13 | 14 | 15 | 0 16 | 0 17 | 18 | 19 | 20 | 21 | 0 22 | 23 | 24 | 6 25 | 26 | 27 | 0 28 | 29 | 30 | 31 | 32 | QFrame::NoFrame 33 | 34 | 35 | true 36 | 37 | 38 | 39 | 40 | 0 41 | 0 42 | 311 43 | 150 44 | 45 | 46 | 47 | 48 | 2 49 | 50 | 51 | 2 52 | 53 | 54 | 55 | 56 | Qt::Vertical 57 | 58 | 59 | 60 | 20 61 | 143 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /Resources/OpenMBIR/License.txt.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | BSD License: http://www.opensource.org/licenses/bsd-license.html 4 | 5 | /* ============================================================================ 6 | * Copyright (c) 2011 Michael A. Jackson (BlueQuartz Software) 7 | * Copyright (c) 2011 Singanallur Venkatakrishnan (Purdue University) 8 | * All rights reserved. 9 | * 10 | * Redistribution and use in source and binary forms, with or without modification, 11 | * are permitted provided that the following conditions are met: 12 | * 13 | * Redistributions of source code must retain the above copyright notice, this 14 | * list of conditions and the following disclaimer. 15 | * 16 | * Redistributions in binary form must reproduce the above copyright notice, this 17 | * list of conditions and the following disclaimer in the documentation and/or 18 | * other materials provided with the distribution. 19 | * 20 | * Neither the name of Singanallur Venkatakrishnan, Michael A. Jackson, the Pudue 21 | * Univeristy, BlueQuartz Software nor the names of its contributors may be used 22 | * to endorse or promote products derived from this software without specific 23 | * prior written permission. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 28 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 29 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 30 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 31 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 32 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 33 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 34 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 | * 36 | * This code was written under United States Air Force Contract number 37 | * FA8650-07-D-5800 38 | * 39 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -------------------------------------------------------------------------------- /Code/MXA/MXAConfiguration.h.in: -------------------------------------------------------------------------------- 1 | /*-------------------------------------------------------------------------- 2 | * This file is autogenerated from 3 | * @PROJECT_RESOURCES_DIR@/CMake/Configuration.h.in 4 | * during the cmake configuration of your project. If you need to make changes 5 | * edit the original file NOT THIS FILE. 6 | * --------------------------------------------------------------------------*/ 7 | #ifndef _MXA_CONFIGURATION_H_ 8 | #define _MXA_CONFIGURATION_H_ 9 | 10 | /* This section is particular to MXADataModel and its needs. */ 11 | 12 | /* Did we compile with HDF5 support */ 13 | #define MXA_HDF5_SUPPORT @MXA_HDF5_SUPPORT@ 14 | 15 | /* Are we compiling Tiff support using an external libTiff */ 16 | #define MXA_TIFF_SUPPORT @MXA_TIFF_SUPPORT@ 17 | 18 | /* Are we compiling with XML support */ 19 | #define MXA_XML_SUPPORT @MXA_XML_SUPPORT@ 20 | 21 | /* Are we using HDF5 primitives in some of the code sources */ 22 | #cmakedefine MXA_USE_HDF5_PRIMITIVE_TYPES @MXA_USE_HDF5_PRIMITIVE_TYPES@ 23 | 24 | /* Are we using MXA types and classes in the H5Lite methods */ 25 | #cmakedefine H5LITE_USE_MXA_CONSTRUCTS @H5LITE_USE_MXA_CONSTRUCTS@ 26 | 27 | /* Are we compiling the VTK<-->HDF5 bridge code */ 28 | #define HDF5_VTK_BRIDGE @HDF5_VTK_BRIDGE@ 29 | 30 | /* Define to 1 when MXADataModel is built as a dynamic library (All platforms)*/ 31 | #cmakedefine MXA_BUILT_AS_DYNAMIC_LIB @MXA_BUILT_AS_DYNAMIC_LIB@ 32 | 33 | /* What system is the library running */ 34 | #define MXADATAMODEL_SYSTEM "@CMAKE_SYSTEM@" 35 | 36 | /* What is the name of our FileReader Class */ 37 | #define MXAFILEREADER_CLASS_NAME MXAFileReader64 38 | 39 | /* What is the name of our File Writer Class */ 40 | #define MXAFILEWRITER_CLASS_NAME MXAFileWriter64 41 | 42 | /* Should we use Boost Shared_Pointer Wrapped strings*/ 43 | #cmakedefine MXA_USE_SHARED_STRINGS @MXA_USE_SHARED_STRINGS@ 44 | 45 | /* Include the Overall Configuration header file */ 46 | #include "@PROJECT_NAME@/@CMP_CONFIGURATION_FILE_NAME@" 47 | 48 | /* Include the Typedefs Header */ 49 | #include "@PROJECT_NAME@/@CMP_TYPES_FILE_NAME@" 50 | 51 | /* Include the DLL export preprocessor defines */ 52 | #include "@PROJECT_NAME@/@PROJECT_NAME@DLLExport.h" 53 | 54 | #endif /* _MXA_CONFIGURATION_H_ */ 55 | -------------------------------------------------------------------------------- /Code/tclap/CmdLineOutput.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | /****************************************************************************** 4 | * 5 | * file: CmdLineOutput.h 6 | * 7 | * Copyright (c) 2004, Michael E. Smoot 8 | * All rights reverved. 9 | * 10 | * See the file COPYING in the top directory of this distribution for 11 | * more information. 12 | * 13 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 14 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 | * DEALINGS IN THE SOFTWARE. 20 | * 21 | *****************************************************************************/ 22 | 23 | #ifndef TCLAP_CMDLINEOUTPUT_H 24 | #define TCLAP_CMDLINEOUTPUT_H 25 | 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | namespace TCLAP { 34 | 35 | class CmdLineInterface; 36 | class ArgException; 37 | 38 | /** 39 | * The interface that any output object must implement. 40 | */ 41 | class CmdLineOutput 42 | { 43 | 44 | public: 45 | 46 | /** 47 | * Virtual destructor. 48 | */ 49 | virtual ~CmdLineOutput() {} 50 | 51 | /** 52 | * Generates some sort of output for the USAGE. 53 | * \param c - The CmdLine object the output is generated for. 54 | */ 55 | virtual void usage(CmdLineInterface& c)=0; 56 | 57 | /** 58 | * Generates some sort of output for the version. 59 | * \param c - The CmdLine object the output is generated for. 60 | */ 61 | virtual void version(CmdLineInterface& c)=0; 62 | 63 | /** 64 | * Generates some sort of output for a failure. 65 | * \param c - The CmdLine object the output is generated for. 66 | * \param e - The ArgException that caused the failure. 67 | */ 68 | virtual void failure( CmdLineInterface& c, 69 | ArgException& e )=0; 70 | 71 | }; 72 | 73 | } //namespace TCLAP 74 | #endif 75 | -------------------------------------------------------------------------------- /Code/Test/Tiff/TiffTest16Bit.cpp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #include 5 | 6 | #include "TiffUtilities.h" 7 | 8 | 9 | /** 10 | * @brief This program takes a single argument, the path to the 16 bit image 11 | * @param argc 12 | * @param argv 13 | * @return 14 | */ 15 | int main(int argc, char** argv) 16 | { 17 | if (argc != 2) 18 | { 19 | std::cout << "This program needs a single argument which is the path to the tiff iamge" << std::endl; 20 | return EXIT_FAILURE; 21 | } 22 | 23 | // Allocate a TiffImage Structure 24 | TiffImage* tiffImage = static_cast(malloc(sizeof(TiffImage))); 25 | 26 | // Create an instance of the TiffUtilities Class 27 | TiffUtilities tifUtil; 28 | 29 | int err = tifUtil.readInputImage(tiffImage, argv[1]); 30 | if (err < 0) 31 | { 32 | return EXIT_FAILURE; 33 | } 34 | 35 | // At this point the image data is stored in the tiffImage->imageData pointer 36 | // which is a void pointer. If you are going to work with it you need to know 37 | // how to cast it. This next if-then-else does the decision making for you. THere 38 | // are other ways of doing this decision making process. C++ with Templates might 39 | // be a slightly more efficient way of doing this. 40 | 41 | 42 | if (tiffImage->bitsPerSample == 16) 43 | { 44 | std::cout << "16 Bit Tiff Image" << std::endl; 45 | unsigned short max = 0; 46 | unsigned short min = 0xFFFF; 47 | unsigned short* pixels = static_cast(tiffImage->imageData); 48 | size_t totalPixels = tiffImage->width * tiffImage->height; 49 | for(size_t p = 0; p < totalPixels; ++p) 50 | { 51 | if (pixels[p] > max) { max = pixels[p]; }; 52 | if (pixels[p] < min) { min = pixels[p]; }; 53 | } 54 | std::cout << "Max 16 Bit Value: " << max << std::endl; 55 | std::cout << "Min 16 Bit Value: " << min << std::endl; 56 | } 57 | else if(tiffImage->bitsPerSample == 8) 58 | { 59 | std::cout << "8 Bit Tiff Image" << std::endl; 60 | } 61 | else 62 | { 63 | std::cout << "Unknown Tiff bitsPerSample" << std::endl; 64 | } 65 | 66 | 67 | 68 | 69 | // When you are completely done with the image data you need to free it: 70 | free(tiffImage->imageData); 71 | 72 | return EXIT_SUCCESS; 73 | } 74 | 75 | 76 | -------------------------------------------------------------------------------- /License/License.cmake: -------------------------------------------------------------------------------- 1 | #--//////////////////////////////////////////////////////////////////////////// 2 | #-- Copyright (c) 2009, Michael A. Jackson. BlueQuartz Software 3 | #-- All rights reserved. 4 | #-- BSD License: http://www.opensource.org/licenses/bsd-license.html 5 | #-- This code was partly written under US Air Force Contract FA8650-07-D-5800 6 | #--//////////////////////////////////////////////////////////////////////////// 7 | # -------------------------------------------------------------------- 8 | # create Resource files for the various license files that are used and 9 | # also create a header file that lists all the License Files 10 | set(LICENSE_FILES ${PROJECT_BINARY_DIR}/License.txt 11 | ${PROJECT_SOURCE_DIR}/License/Boost.license 12 | ${PROJECT_SOURCE_DIR}/License/MXA.license 13 | ${PROJECT_SOURCE_DIR}/License/Qt.license 14 | ${PROJECT_SOURCE_DIR}/License/tiff.license ) 15 | set(QRC_LICENSE_FILES "") 16 | file(WRITE ${PROJECT_BINARY_DIR}/License/LicenseFiles.h "#ifndef _LICENSE_FILES_H_\n") 17 | file(APPEND ${PROJECT_BINARY_DIR}/License/LicenseFiles.h "#define _LICENSE_FILES_H_\n") 18 | file(APPEND ${PROJECT_BINARY_DIR}/License/LicenseFiles.h "namespace ${PROJECT_PREFIX} {\n") 19 | file(APPEND ${PROJECT_BINARY_DIR}/License/LicenseFiles.h " QStringList LicenseList = (QStringList() ") 20 | foreach(lf ${LICENSE_FILES}) 21 | get_filename_component(cmp_text_file_name ${lf} NAME) 22 | get_filename_component(lf_fn ${lf} NAME_WE) 23 | # Copy the text file into the Build Directory 24 | configure_file("${lf}" ${PROJECT_BINARY_DIR}/License/${cmp_text_file_name} COPYONLY ) 25 | 26 | # create the Qt Resource File 27 | configure_file(${CMP_CONFIGURED_FILES_SOURCE_DIR}/QtResourceFile.qrc.in 28 | ${PROJECT_BINARY_DIR}/License/${lf_fn}.qrc) 29 | 30 | set(QRC_LICENSE_FILES ${QRC_LICENSE_FILES} ${PROJECT_BINARY_DIR}/License/${lf_fn}.qrc) 31 | file(APPEND ${PROJECT_BINARY_DIR}/License/LicenseFiles.h " << \":/${cmp_text_file_name}\"") 32 | 33 | endforeach(lf ${LICENSE_FILES}) 34 | file(APPEND ${PROJECT_BINARY_DIR}/License/LicenseFiles.h ");\n") 35 | file(APPEND ${PROJECT_BINARY_DIR}/License/LicenseFiles.h "}\n#endif /* _LICENSE_FILES_H_ */ \n") 36 | 37 | -------------------------------------------------------------------------------- /Code/MBIRLib/GenericFilters/SourceList.cmake: -------------------------------------------------------------------------------- 1 | #--//////////////////////////////////////////////////////////////////////////// 2 | #-- Copyright (c) 2009, Michael A. Jackson. BlueQuartz Software 3 | #-- All rights reserved. 4 | #-- BSD License: http://www.opensource.org/licenses/bsd-license.html 5 | #-- This code was partly written under US Air Force Contract FA8650-07-D-5800 6 | #--//////////////////////////////////////////////////////////////////////////// 7 | set (MBIRLib_GenericFilters_SRCS 8 | ${MBIRLib_SOURCE_DIR}/GenericFilters/BackgroundCalculation.cpp 9 | ${MBIRLib_SOURCE_DIR}/GenericFilters/CalculateAMatrixColumn.cpp 10 | ${MBIRLib_SOURCE_DIR}/GenericFilters/ComputeInitialOffsets.cpp 11 | ${MBIRLib_SOURCE_DIR}/GenericFilters/CostData.cpp 12 | ${MBIRLib_SOURCE_DIR}/GenericFilters/DetectorParameters.cpp 13 | ${MBIRLib_SOURCE_DIR}/GenericFilters/DetectorResponse.cpp 14 | ${MBIRLib_SOURCE_DIR}/GenericFilters/InitialReconstructionBinReader.cpp 15 | ${MBIRLib_SOURCE_DIR}/GenericFilters/InitialReconstructionInitializer.cpp 16 | ${MBIRLib_SOURCE_DIR}/GenericFilters/MRCSinogramInitializer.cpp 17 | ${MBIRLib_SOURCE_DIR}/GenericFilters/RawSinogramInitializer.cpp 18 | ${MBIRLib_SOURCE_DIR}/GenericFilters/SigmaXEstimation.cpp 19 | ${MBIRLib_SOURCE_DIR}/GenericFilters/TomoFilter.cpp 20 | 21 | ) 22 | 23 | set (MBIRLib_GenericFilters_HDRS 24 | ${MBIRLib_SOURCE_DIR}/GenericFilters/BackgroundCalculation.h 25 | ${MBIRLib_SOURCE_DIR}/GenericFilters/CalculateAMatrixColumn.h 26 | ${MBIRLib_SOURCE_DIR}/GenericFilters/ComputeInitialOffsets.h 27 | ${MBIRLib_SOURCE_DIR}/GenericFilters/CostData.h 28 | ${MBIRLib_SOURCE_DIR}/GenericFilters/DetectorParameters.h 29 | ${MBIRLib_SOURCE_DIR}/GenericFilters/DetectorResponse.h 30 | ${MBIRLib_SOURCE_DIR}/GenericFilters/InitialReconstructionBinReader.h 31 | ${MBIRLib_SOURCE_DIR}/GenericFilters/InitialReconstructionInitializer.h 32 | ${MBIRLib_SOURCE_DIR}/GenericFilters/MRCSinogramInitializer.h 33 | ${MBIRLib_SOURCE_DIR}/GenericFilters/RawSinogramInitializer.h 34 | ${MBIRLib_SOURCE_DIR}/GenericFilters/SigmaXEstimation.h 35 | ${MBIRLib_SOURCE_DIR}/GenericFilters/TomoFilter.h 36 | 37 | ) 38 | 39 | cmp_IDE_SOURCE_PROPERTIES( "MBIRLib/GenericFilters" "${MBIRLib_GenericFilters_HDRS}" "${MBIRLib_GenericFilters_SRCS}" "${CMP_INSTALL_FILES}") 40 | -------------------------------------------------------------------------------- /Support/cmp/CoreTests/SSEChecks.cmake: -------------------------------------------------------------------------------- 1 | 2 | # In this file we are doing all of our 'configure' checks. Things like checking 3 | # for headers, functions, libraries, types and size of types. 4 | INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake) 5 | INCLUDE (${CMAKE_ROOT}/Modules/CheckTypeSize.cmake) 6 | INCLUDE (${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake) 7 | INCLUDE (${CMAKE_ROOT}/Modules/CheckCXXSourceCompiles.cmake) 8 | 9 | CHECK_INCLUDE_FILE("stddef.h" HAVE_STDDEF_H) 10 | CHECK_INCLUDE_FILE("stdint.h" HAVE_STDINT_H) 11 | CHECK_INCLUDE_FILE("sys/types.h" HAVE_SYS_TYPES_H) 12 | 13 | 14 | set (SSE_COMPILE_FLAGS "") 15 | option(AIM_USE_SSE "Use SSE2/3 Instructions where possible." ON) 16 | if (AIM_USE_SSE) 17 | if (NOT MSVC) 18 | set(CMAKE_REQUIRED_C_FLAGS_SAVE ${CMAKE_REQUIRED_C_FLAGS}) 19 | set(CMAKE_REQUIRED_C_FLAGS ${CMAKE_REQUIRED_C_FLAGS} "-msse3") 20 | CHECK_INCLUDE_FILE("pmmintrin.h" HAVE_SSE3_H) 21 | set(CMAKE_REQUIRED_C_FLAGS ${CMAKE_REQUIRED_C_FLAGS_SAVE}) 22 | if (HAVE_SSE3_H) 23 | set(HAVE_SSE2_H 1) 24 | if (CMAKE_COMPILER_IS_GNUCC) 25 | set (SSE_COMPILE_FLAGS "-msse3") 26 | message(STATUS "SSE3 Detected") 27 | endif() 28 | else() 29 | set (HAVE_SSE3_H 0) 30 | endif() 31 | 32 | if (NOT HAVE_SSE3_H) 33 | set(CMAKE_REQUIRED_C_FLAGS_SAVE ${CMAKE_REQUIRED_C_FLAGS}) 34 | set(CMAKE_REQUIRED_C_FLAGS ${CMAKE_REQUIRED_C_FLAGS} "-msse2") 35 | CHECK_INCLUDE_FILE("emmintrin.h" HAVE_SSE2_H) 36 | set(CMAKE_REQUIRED_C_FLAGS ${CMAKE_REQUIRED_C_FLAGS_SAVE}) 37 | if(HAVE_SSE2_H) 38 | if (CMAKE_COMPILER_IS_GNUCC) 39 | set (SSE_COMPILE_FLAGS "-msse2" PARENT_SCOPE) 40 | message(STATUS "SSE2 Detected") 41 | endif() 42 | else() 43 | set (HAVE_SSE2_H 0) 44 | endif() 45 | endif() 46 | else() 47 | set(CMAKE_REQUIRED_C_FLAGS_SAVE ${CMAKE_REQUIRED_C_FLAGS}) 48 | set(CMAKE_REQUIRED_C_FLAGS ${CMAKE_REQUIRED_C_FLAGS} "/arch:SSE2") 49 | CHECK_INCLUDE_FILE("intrin.h" HAVE_INTRIN_H) 50 | set(CMAKE_REQUIRED_C_FLAGS ${CMAKE_REQUIRED_C_FLAGS_SAVE}) 51 | if (HAVE_INTRIN_H) 52 | set (SSE_COMPILE_FLAGS " /arch:SSE2 " PARENT_SCOPE) 53 | else() 54 | set (HAVE_INTRIN_H 0) 55 | endif() 56 | endif() 57 | endif() 58 | -------------------------------------------------------------------------------- /Resources/DocConfigFiles/BlueQuartz.tex.in: -------------------------------------------------------------------------------- 1 | %---------------------------------------------------------- 2 | % This is a substitute header file for Doxygen to use to generate the refman.tex file 3 | %---------------------------------------------------------- 4 | %\batchmode 5 | \documentclass[12pt,oneside]{book} 6 | \usepackage{newclude} 7 | \usepackage{a4wide} 8 | \usepackage{makeidx} 9 | \usepackage{graphicx} 10 | \usepackage{multicol} 11 | \usepackage{float} 12 | \usepackage{listings} 13 | \usepackage{color} 14 | \usepackage{textcomp} 15 | \usepackage{alltt} 16 | \usepackage{times} 17 | \usepackage{ifpdf} 18 | \ifpdf 19 | \usepackage[pdftex, 20 | pagebackref=true, 21 | colorlinks=true, 22 | linkcolor=blue, 23 | unicode 24 | ]{hyperref} 25 | \else 26 | \usepackage[ps2pdf, 27 | pagebackref=true, 28 | colorlinks=true, 29 | linkcolor=blue, 30 | unicode 31 | ]{hyperref} 32 | \usepackage{pspicture} 33 | \fi 34 | \usepackage[utf8]{inputenc} 35 | \usepackage{doxygen} 36 | \lstset{language=C++,inputencoding=utf8,basicstyle=\footnotesize,breaklines=true,breakatwhitespace=true,tabsize=4,numbers=left } 37 | \makeindex 38 | \setcounter{tocdepth}{3} 39 | \renewcommand{\footrulewidth}{0.4pt} 40 | 41 | \textheight=9.0in 42 | \textwidth=6.0in 43 | \oddsidemargin=0.25in 44 | \evensidemargin=0.0in 45 | \topmargin=-0.5in 46 | 47 | %---------------------------------------------------------- 48 | % Set the LaTex variables for the title page 49 | %---------------------------------------------------------- 50 | \title{ @LATEX_TITLE@} 51 | \author{@LATEX_AUTHOR@} 52 | \authoraddress{ 53 | \url{http://dream3d.bluequartz.net}\\ 54 | Email: \email{dream3d@bluequartz.net} 55 | } 56 | \date{\today} 57 | \begin{document} 58 | \maketitle 59 | 60 | \hypersetup{pageanchor=false} 61 | 62 | %---------------------------------------------------------- 63 | % Set Table of Contents 64 | %---------------------------------------------------------- 65 | %\clearemptydoublepage 66 | \pagenumbering{roman} 67 | \tableofcontents 68 | %\clearemptydoublepage 69 | \pagenumbering{arabic} 70 | \hypersetup{pageanchor=true} 71 | 72 | %---------------------------------------------------------- 73 | % This is the end of the header file 74 | %---------------------------------------------------------- 75 | -------------------------------------------------------------------------------- /Code/QtSupport/ColorComboPicker.h: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * Copyright (c) 2010, Michael A. Jackson (BlueQuartz Software) 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 11 | * Redistributions in binary form must reproduce the above copyright notice, this 12 | * list of conditions and the following disclaimer in the documentation and/or 13 | * other materials provided with the distribution. 14 | * 15 | * Neither the name of Michael A. Jackson nor the names of its contributors may 16 | * be used to endorse or promote products derived from this software without 17 | * specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 28 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ 30 | 31 | #ifndef COLORCOMBOPICKER_H_ 32 | #define COLORCOMBOPICKER_H_ 33 | 34 | #include 35 | 36 | class QColor; 37 | class QWidget; 38 | 39 | class ColorComboPicker : public QComboBox 40 | { 41 | Q_OBJECT; 42 | Q_PROPERTY(QColor color READ color WRITE setColor USER true); 43 | 44 | public: 45 | ColorComboPicker(QWidget* widget = 0); 46 | 47 | public: 48 | QColor color() const; 49 | void setColor(QColor c); 50 | 51 | private: 52 | void populateList(); 53 | }; 54 | 55 | #endif 56 | 57 | -------------------------------------------------------------------------------- /Code/MBIRLib/Reconstruction/ReconstructionInputs.cpp: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * Copyright (c) 2011 Michael A. Jackson (BlueQuartz Software) 3 | * Copyright (c) 2011 Singanallur Venkatakrishnan (Purdue University) 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without modification, 7 | * are permitted provided that the following conditions are met: 8 | * 9 | * Redistributions of source code must retain the above copyright notice, this 10 | * list of conditions and the following disclaimer. 11 | * 12 | * Redistributions in binary form must reproduce the above copyright notice, this 13 | * list of conditions and the following disclaimer in the documentation and/or 14 | * other materials provided with the distribution. 15 | * 16 | * Neither the name of Singanallur Venkatakrishnan, Michael A. Jackson, the Purdue 17 | * Univeristy, BlueQuartz Software nor the names of its contributors may be used 18 | * to endorse or promote products derived from this software without specific 19 | * prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 27 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 30 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * This code was written under United States Air Force Contract number 33 | * FA8650-07-D-5800 34 | * 35 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ 36 | 37 | #include "ReconstructionInputs.h" 38 | 39 | ReconstructionInputs::ReconstructionInputs() 40 | { 41 | // TODO Auto-generated constructor stub 42 | 43 | } 44 | 45 | ReconstructionInputs::~ReconstructionInputs() 46 | { 47 | // TODO Auto-generated destructor stub 48 | } 49 | 50 | -------------------------------------------------------------------------------- /Support/cmp/Modules/FindMinGW.cmake: -------------------------------------------------------------------------------- 1 | # - Find MINGW library 2 | # - Derived from the FindMINGW.cmake that is included with cmake 3 | # Find the native MINGW includes and library 4 | # This module defines 5 | # MINGW_INCLUDE_DIR, where to find MINGW.h, etc. 6 | # MINGW_LIBRARIES, libraries to link against to use MINGW. 7 | # MINGW_FOUND, If false, do not try to use MINGW. 8 | # also defined, but not for general use are 9 | # MINGW_LIBRARY, where to find the MINGW library. 10 | # MINGW_LIBRARY_DEBUG - Debug version of MINGW library 11 | # MINGW_LIBRARY_RELEASE - Release Version of MINGW library 12 | 13 | # MESSAGE (STATUS "Finding MINGW library and headers..." ) 14 | 15 | # Only set MINGW_INSTALL to the environment variable if it is blank 16 | if ("${MINGW_INSTALL}" STREQUAL "") 17 | set(MINGW_INSTALL $ENV{MINGW_INSTALL}) 18 | endif() 19 | 20 | # Look for the header file. 21 | SET(MINGW_INCLUDE_SEARCH_DIRS 22 | ${MINGW_INSTALL}/include 23 | ) 24 | 25 | set(MINGW_LIB_SEARCH_DIRS 26 | ${MINGW_INSTALL}/bin 27 | ) 28 | 29 | FIND_PATH(MINGW_INCLUDE_DIR 30 | NAMES _mingw.h 31 | PATHS ${MINGW_INCLUDE_SEARCH_DIRS} 32 | NO_DEFAULT_PATH 33 | ) 34 | 35 | set(MINGW_SEARCH_NAMES "mingwm10") 36 | 37 | # Look for the library. 38 | FIND_LIBRARY(MINGW_LIBRARY 39 | NAMES ${MINGW_SEARCH_NAMES} 40 | PATHS ${MINGW_LIB_SEARCH_DIRS} 41 | NO_DEFAULT_PATH 42 | ) 43 | 44 | # MESSAGE(STATUS "MINGW_INCLUDE_DIR: ${MINGW_INCLUDE_DIR}") 45 | # MESSAGE(STATUS "MINGW_LIBRARY: ${MINGW_LIBRARY}") 46 | # MESSAGE(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") 47 | 48 | IF(MINGW_INCLUDE_DIR AND MINGW_LIBRARY) 49 | SET(MINGW_FOUND 1) 50 | SET(MINGW_LIBRARIES ${MINGW_LIBRARY}) 51 | SET(MINGW_INCLUDE_DIRS ${MINGW_INCLUDE_DIR}) 52 | ELSE(MINGW_INCLUDE_DIR AND MINGW_LIBRARY) 53 | SET(MINGW_FOUND 0) 54 | SET(MINGW_LIBRARIES) 55 | SET(MINGW_INCLUDE_DIRS) 56 | ENDIF(MINGW_INCLUDE_DIR AND MINGW_LIBRARY) 57 | 58 | # Report the results. 59 | IF(NOT MINGW_FOUND) 60 | SET(MINGW_DIR_MESSAGE 61 | "MINGW was not found. Set MINGW_INSTALL environment variable to help this. Make sure MINGW_LIBRARY and MINGW_INCLUDE_DIR are set.") 62 | IF(NOT MINGW_FIND_QUIETLY) 63 | MESSAGE(STATUS "${MINGW_DIR_MESSAGE}") 64 | ELSE(NOT MINGW_FIND_QUIETLY) 65 | IF(MINGW_FIND_REQUIRED) 66 | MESSAGE(FATAL_ERROR "MINGW was NOT found and is Required by this project") 67 | ENDIF(MINGW_FIND_REQUIRED) 68 | ENDIF(NOT MINGW_FIND_QUIETLY) 69 | ENDIF(NOT MINGW_FOUND) 70 | 71 | -------------------------------------------------------------------------------- /Code/MBIRLib/Reconstruction/ReconstructionInputs.h: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * Copyright (c) 2011 Michael A. Jackson (BlueQuartz Software) 3 | * Copyright (c) 2011 Singanallur Venkatakrishnan (Purdue University) 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without modification, 7 | * are permitted provided that the following conditions are met: 8 | * 9 | * Redistributions of source code must retain the above copyright notice, this 10 | * list of conditions and the following disclaimer. 11 | * 12 | * Redistributions in binary form must reproduce the above copyright notice, this 13 | * list of conditions and the following disclaimer in the documentation and/or 14 | * other materials provided with the distribution. 15 | * 16 | * Neither the name of Singanallur Venkatakrishnan, Michael A. Jackson, the Pudue 17 | * Univeristy, BlueQuartz Software nor the names of its contributors may be used 18 | * to endorse or promote products derived from this software without specific 19 | * prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 27 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 30 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * This code was written under United States Air Force Contract number 33 | * FA8650-07-D-5800 34 | * 35 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ 36 | 37 | #ifndef SOCINPUTS_H_ 38 | #define SOCINPUTS_H_ 39 | 40 | #include "MBIRLib/MBIRLib.h" 41 | 42 | /* 43 | * 44 | */ 45 | class MBIRLib_EXPORT ReconstructionInputs 46 | { 47 | public: 48 | ReconstructionInputs(); 49 | virtual ~ReconstructionInputs(); 50 | }; 51 | 52 | #endif /* SOCINPUTS_H_ */ 53 | -------------------------------------------------------------------------------- /Code/MXA/MXADLLExport.h: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // Copyright (c) 2007, 2010 Michael A. Jackson for BlueQuartz Software 4 | // All rights reserved. 5 | // BSD License: http://www.opensource.org/licenses/bsd-license.html 6 | // 7 | // This code was written under United States Air Force Contract number 8 | // FA8650-04-C-5229 9 | // 10 | 11 | #ifndef _MXA_DLL_EXPORT_H_ 12 | #define _MXA_DLL_EXPORT_H_ 13 | 14 | 15 | #if defined (_MSC_VER) 16 | #pragma warning(disable: 4251) 17 | #pragma warning(disable: 4710) 18 | #pragma warning(disable: 4820) 19 | #pragma warning(disable: 4668) 20 | #pragma warning(disable: 4265) 21 | #pragma warning(disable: 4189) 22 | #pragma warning(disable: 4640) 23 | #pragma warning(disable: 4996) 24 | #pragma warning(disable: 4548) 25 | #endif 26 | 27 | /* Cmake will define MXA_EXPORTS on Windows when it 28 | configures to build a shared library. If you are going to use 29 | another build system on windows or create the visual studio 30 | projects by hand you need to define MXA_EXPORTS when 31 | building the MXADatModel DLL on windows. 32 | */ 33 | 34 | #if defined (MXA_BUILT_AS_DYNAMIC_LIB) 35 | 36 | #if defined (MXA_EXPORTS) /* Compiling the MXA DLL/Dylib */ 37 | #if defined (_MSC_VER) /* MSVC Compiler Case */ 38 | #define MXA_EXPORT __declspec(dllexport) 39 | #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */ 40 | #define MXA_EXPORT __attribute__ ((visibility("default"))) 41 | #endif 42 | #else /* Importing the DLL into another project */ 43 | #if defined (_MSC_VER) /* MSVC Compiler Case */ 44 | #define MXA_EXPORT __declspec(dllimport) 45 | #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */ 46 | #define MXA_EXPORT __attribute__ ((visibility("default"))) 47 | #endif 48 | #endif 49 | #endif 50 | 51 | /* If MXA_EXPORT was never defined, define it here */ 52 | #ifndef MXA_EXPORT 53 | #define MXA_EXPORT 54 | #endif 55 | 56 | #if 0 57 | #if defined (_WIN32) || defined __CYGWIN__ 58 | 59 | #if defined (MXA_BUILT_AS_DYNAMIC_LIB) 60 | #if defined(MXA_EXPORTS) 61 | #define MXA_EXPORT __declspec(dllexport) 62 | #else 63 | #define MXA_EXPORT __declspec(dllimport) 64 | #endif /* MXA_EXPORTS */ 65 | #else 66 | #define MXA_EXPORT 67 | #endif 68 | #elif __GNUC__ >= 4 69 | #define FLOW_DLL __attribute__ ((visibility("default"))) 70 | #define DLL_LOCAL __attribute__ ((visibility("hidden") 71 | #else /* defined (_WIN32) && defined (MXA_BUILD_SHARED_LIBS) */ 72 | #define MXA_EXPORT 73 | #endif 74 | #endif 75 | 76 | #endif /* _MXA_DLL_EXPORT_H_ */ 77 | -------------------------------------------------------------------------------- /Code/MBIRLib/Common/MSVCDefines.h: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * Copyright (c) 2010, Michael A. Jackson (BlueQuartz Software) 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 11 | * Redistributions in binary form must reproduce the above copyright notice, this 12 | * list of conditions and the following disclaimer in the documentation and/or 13 | * other materials provided with the distribution. 14 | * 15 | * Neither the name of Michael A. Jackson nor the names of its contributors may 16 | * be used to endorse or promote products derived from this software without 17 | * specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 28 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ 30 | #ifndef _MSVCDEFINES_H_ 31 | #define _MSVCDEFINES_H_ 32 | 33 | #ifdef _MSC_VER 34 | 35 | #include 36 | /* 37 | "It's a known, long-standing bug in the compiler system's headers. For 38 | some reason the manufacturer, in its infinite wisdom, chose to #define 39 | macros min() and max() in violation of the upper-case convention and so 40 | break any legitimate functions with those names, including those in the 41 | standard C++ library." 42 | */ 43 | 44 | #ifndef NOMINMAX 45 | #define NOMINMAX 46 | #endif 47 | 48 | #define WINDOWS_LARGE_FILE_SUPPORT 49 | #if _MSC_VER < 1400 50 | #define snprintf _snprintf 51 | #else 52 | #define snprintf sprintf_s 53 | #endif 54 | #endif 55 | 56 | 57 | 58 | #endif /* _MSVCDEFINES_H_ */ 59 | -------------------------------------------------------------------------------- /Code/QtSupport/ImageOpenDialog.h: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * Copyright (c) 2011, Michael A. Jackson (BlueQuartz Software) 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 11 | * Redistributions in binary form must reproduce the above copyright notice, this 12 | * list of conditions and the following disclaimer in the documentation and/or 13 | * other materials provided with the distribution. 14 | * 15 | * Neither the name of Michael A. Jackson nor the names of its contributors may 16 | * be used to endorse or promote products derived from this software without 17 | * specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 28 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ 30 | #ifndef IMAGEOPENDIALOG_H_ 31 | #define IMAGEOPENDIALOG_H_ 32 | //-- Qt Includes 33 | #include 34 | #include 35 | 36 | #include 37 | 38 | /* 39 | * 40 | */ 41 | class ImageOpenDialog : public QDialog, private Ui::ImageOpenDialog 42 | { 43 | 44 | Q_OBJECT; 45 | 46 | 47 | public: 48 | ImageOpenDialog(QWidget* parent = 0); 49 | virtual ~ImageOpenDialog(); 50 | 51 | void setStatus(QString s); 52 | 53 | 54 | public slots: 55 | void setProgress(int p); 56 | 57 | private: 58 | ImageOpenDialog(const ImageOpenDialog&); // Copy Constructor Not Implemented 59 | void operator=(const ImageOpenDialog&); // Operator '=' Not Implemented 60 | }; 61 | 62 | #endif /* IMAGEOPENDIALOG_H_ */ 63 | -------------------------------------------------------------------------------- /Code/MXA/Common/IO/Private/MXAPrivateWindowsFileReader.cpp: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // Copyright (c) 2009, Michael A. Jackson. BlueQuartz Software 4 | // All rights reserved. 5 | // BSD License: http://www.opensource.org/licenses/bsd-license.html 6 | // 7 | // 8 | 9 | #include "MXAPrivateWindowsFileReader.h" 10 | #include 11 | #include 12 | 13 | 14 | 15 | // ----------------------------------------------------------------------------- 16 | // 17 | // ----------------------------------------------------------------------------- 18 | MXAFILEREADER_CLASS_NAME::MXAFILEREADER_CLASS_NAME(const std::string& filename) : 19 | _filename(filename) 20 | { 21 | 22 | } 23 | 24 | // ----------------------------------------------------------------------------- 25 | // 26 | // ----------------------------------------------------------------------------- 27 | MXAFILEREADER_CLASS_NAME::~MXAFILEREADER_CLASS_NAME() 28 | { 29 | #if defined (WINDOWS_LARGE_FILE_SUPPORT) 30 | int error = CloseHandle(_instream); //Close the file 31 | if (0 == error) 32 | { 33 | std::cout << "MXAFILEREADER_CLASS_NAME:: Error Closing File " << _filename << std::endl; 34 | } 35 | #endif 36 | } 37 | 38 | // ----------------------------------------------------------------------------- 39 | // 40 | // ----------------------------------------------------------------------------- 41 | bool MXAFILEREADER_CLASS_NAME::initReader() 42 | { 43 | #if defined (WINDOWS_LARGE_FILE_SUPPORT) 44 | 45 | _instream = CreateFile(TEXT(this->_filename.c_str()), // file to open 46 | GENERIC_READ, // open for reading 47 | FILE_SHARE_READ, // share for reading 48 | NULL, // default security 49 | OPEN_EXISTING, // existing file only 50 | FILE_FLAG_SEQUENTIAL_SCAN, // normal file 51 | NULL); // no attr. template 52 | if (_instream == INVALID_HANDLE_VALUE) 53 | { 54 | std::cout << "Error: Failed to open file: " + std::string(this->_filename) << " Error code:(" << GetLastError() << ")" << std::endl; 55 | return false; 56 | } 57 | #else 58 | // Open a stream with a large buffer. 59 | 60 | _buffer.resize(BUFF_SIZE, 0); 61 | _instream.rdbuf()->pubsetbuf ( &(_buffer.front()), BUFF_SIZE ); 62 | _instream.open ( _filename.c_str(), std::ifstream::in | std::ifstream::binary ); 63 | if ( !_instream.is_open() ) 64 | { 65 | std::cout << "Error: Failed to open file: " + _filename << std::endl; 66 | return false; 67 | } 68 | #endif 69 | return true; 70 | } 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /Code/MXA/Common/IO/Private/MXAPrivateWindowsFileWriter.cpp: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // Copyright (c) 2009, Michael A. Jackson. BlueQuartz Software 4 | // All rights reserved. 5 | // BSD License: http://www.opensource.org/licenses/bsd-license.html 6 | // 7 | // 8 | 9 | #include "MXAPrivateWindowsFileWriter.h" 10 | 11 | 12 | // ----------------------------------------------------------------------------- 13 | // 14 | // ----------------------------------------------------------------------------- 15 | MXAFILEWRITER_CLASS_NAME::MXAFILEWRITER_CLASS_NAME(const std::string& filename) : 16 | _filename(filename) 17 | { 18 | 19 | } 20 | 21 | // ----------------------------------------------------------------------------- 22 | // 23 | // ----------------------------------------------------------------------------- 24 | MXAFILEWRITER_CLASS_NAME::~MXAFILEWRITER_CLASS_NAME() 25 | { 26 | #if defined (WINDOWS_LARGE_FILE_SUPPORT) 27 | int error = CloseHandle(_outStream); //Close the file 28 | if (0 == error) 29 | { 30 | std::cout << "MXAFILEWRITER_CLASS_NAME:: Error Closing File " << _filename << std::endl; 31 | } 32 | #endif 33 | } 34 | 35 | // ----------------------------------------------------------------------------- 36 | // 37 | // ----------------------------------------------------------------------------- 38 | bool MXAFILEWRITER_CLASS_NAME::initWriter() 39 | { 40 | #if defined (WINDOWS_LARGE_FILE_SUPPORT) 41 | 42 | _outStream = CreateFile(TEXT(this->_filename.c_str()), // file to open 43 | GENERIC_WRITE, // open for writing 44 | FILE_SHARE_WRITE, // share for writing 45 | NULL, // default security 46 | CREATE_ALWAYS, // Always create a new file, regardless if the file exists or not 47 | FILE_ATTRIBUTE_NORMAL, // normal file 48 | NULL); // no attr. template 49 | if (_outStream == INVALID_HANDLE_VALUE) 50 | { 51 | std::cout << "Output File '" << this->_filename << "' could not be opened for writing. Please" << 52 | " check the path is correct and permissions are set correctly on the parent folder." << std::endl; 53 | return false; 54 | } 55 | #else 56 | _outStream.open(this->_filename.c_str(), std::ios::out | std::ios::binary); 57 | if ( _outStream.fail() ) 58 | { 59 | std::cout << "Output File '" << this->_filename << "' could not be opened for writing. Please" << 60 | " check the path is correct and permissions are set correctly on the parent folder." << std::endl; 61 | return false; 62 | } 63 | #endif 64 | return true; 65 | } 66 | 67 | -------------------------------------------------------------------------------- /Code/MBIRLib/Common/EIMTime.c: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) 2010, Michael A. Jackson. BlueQuartz Software 4 | // All rights reserved. 5 | // BSD License: http://www.opensource.org/licenses/bsd-license.html 6 | // 7 | /////////////////////////////////////////////////////////////////////////////// 8 | 9 | 10 | #include 11 | #include 12 | 13 | #include "MBIRLib/Common/EIMTime.h" 14 | #include "MBIRLib/Common/MSVCDefines.h" 15 | 16 | static char em_log_time[128]; 17 | static char em_tif_time[128]; 18 | 19 | // ----------------------------------------------------------------------------- 20 | // 21 | // ----------------------------------------------------------------------------- 22 | char* formattedTime(char* formatting, char* output) 23 | { 24 | struct tm* t; 25 | #ifdef _MSC_VER 26 | #if _MSC_VER >= 1400 27 | struct tm time; 28 | errno_t tError; 29 | #endif 30 | #endif 31 | TimeType long_time; 32 | TimeFunc(&long_time); 33 | t = NULL; 34 | #ifdef _MSC_VER 35 | #if _MSC_VER < 1400 36 | t = _localtime64(&long_time); 37 | #else 38 | t = &time; 39 | tError = _localtime64_s(&time, &long_time); 40 | #endif 41 | #else // Non windows platforms 42 | t = localtime(&long_time); 43 | #endif 44 | memset(output, 0, 128); 45 | snprintf(output, 128, formatting, t->tm_year + 1900, t->tm_mon + 1, 46 | t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec ); 47 | return output; 48 | } 49 | 50 | 51 | 52 | // ----------------------------------------------------------------------------- 53 | // 54 | // ----------------------------------------------------------------------------- 55 | char* EIMTOMO_LogTime() 56 | { 57 | return formattedTime("[%04d:%02d:%02d:%02d:%02d:%02d]", em_log_time); 58 | } 59 | 60 | // ----------------------------------------------------------------------------- 61 | // 62 | // ----------------------------------------------------------------------------- 63 | char* EIMTOMO_TiffDateTime() 64 | { 65 | return formattedTime("%04d:%02d:%02d %02d:%02d:%02d", em_tif_time); 66 | } 67 | 68 | // ----------------------------------------------------------------------------- 69 | // 70 | // ----------------------------------------------------------------------------- 71 | unsigned long long int EIMTOMO_getMilliSeconds() 72 | { 73 | #ifdef _MSC_VER 74 | return (unsigned long long int)(clock()); 75 | #else 76 | struct timeval t1; 77 | CMP_GET_TIME_OF_DAY(&t1, NULL); 78 | unsigned long long int seconds = t1.tv_sec ; 79 | unsigned long long int microSec = t1.tv_usec ; 80 | seconds *= 1000; 81 | microSec /= 1000; 82 | return seconds + microSec; // Both in milliseconds at this point. 83 | #endif 84 | } 85 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OpenMBIR-TEM # 2 | 3 | ## Introduction ## 4 | 5 | OpenMBIR-TEM is an open source project that develops model-based imaging algorithms for electron tomography. Model-based approaches to imaging combine the physics of data formation, the noise characteristics of the sensors and a probabilistic model for the object to formulate the image reconstruction problem. In several applications MBIR translates to minimizing a very high-dimensional cost-function which requires efficient algorithms. 6 | 7 | This package contains source codes to reconstruct STEM HAADF and BrightField tomographic data using the Model Based Iterative Reconstruction Method. Newer versions now available will also reconstruct tomography data stored in the [MRC](http://bio3d.colorado.edu/imod/doc/mrc_format.txt) file format. A number of output files are written including a new MRC file that is a regular grid of stacked data instead of a tilt series, a Uniform Coordinate file for ParaView in the form of a vtk file and also an Aviso .am file of Uniform Coordinate type. More information about the MBIR algorithm can be found at [OpenMBIR.org](http://www.openmbir.org) 8 | 9 | ## License ## 10 | 11 | The source codes are open source under a BSD License. See the License.txt file for more information. 12 | 13 | ## Dependencies ## 14 | The current set of dependencies are: 15 | 16 | + Compiler appropriate for your operating system 17 | + [CMake version 2.8.10 or newer](http://www.cmake.org/cmake/resources/software.html) 18 | + [Boost version 1.44 or newer](http://www.boost.org) 19 | + [Qt version 4.8.5 or newer but NOT Qt v5](http://qt-project.org) 20 | + [Threading Building Blocks](https://www.threadingbuildingblocks.org/download) 21 | 22 | ## Known Compilers ## 23 | 24 | | Operating System | Compiler | Notes | 25 | | ------------------------|--------------|---------| 26 | | OS X 10.7/8/9 | Xcode 4.6.x & Xcode 5.x | OS X 10.9 requires Qt 4.8.6 | 27 | | Windows x64 | VS 2010, VS2012,VS2013 |Static Libraries ONLY | 28 | | Linux x64 | GCC or Clang recent versions | Ubuntu 12.04 or above, CentOS 6.5 or greater | 29 | 30 | ## Known Issues ## 31 | 32 | ### OS X 10.9 "Mavericks" ### 33 | 34 | Due to some bugs in Qt 4.8.5 the codes will NOT compile on OS X 10.9 Mavericks. The developer will need to download version 4.8.6 (Not available as of APRIL 15 2014) or download Qt 4.8.x from the Qt git repository and self build Qt. 35 | 36 | Please see the web site [OpenMBIR WebSite](http://www.openmbir.org) for more information 37 | 38 | ## General Notes ## 39 | 40 | This software is under development and may or may not give you the results that you are expecting. If you suspect a bug in the code please post a new issue to the OpenMBIR issue tracker at github.com 41 | -------------------------------------------------------------------------------- /Code/MBIRLib/GenericFilters/BackgroundCalculation.h: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * Copyright (c) 2010, Michael A. Jackson (BlueQuartz Software) 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 11 | * Redistributions in binary form must reproduce the above copyright notice, this 12 | * list of conditions and the following disclaimer in the documentation and/or 13 | * other materials provided with the distribution. 14 | * 15 | * Neither the name of Michael A. Jackson nor the names of its contributors may 16 | * be used to endorse or promote products derived from this software without 17 | * specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 28 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ 30 | 31 | #ifndef _BACKGROUNDCALCULATION_H_ 32 | #define _BACKGROUNDCALCULATION_H_ 33 | 34 | #include 35 | #include 36 | 37 | #include "MBIRLib/IOFilters/MRCReader.h" 38 | 39 | enum Type 40 | { 41 | TYPE_BYTES, 42 | TYPE_SIGNED_SHORT_INT, 43 | TYPE_FLOAT, 44 | TYPE_SIGNED_BYTES = 50, // assigned to 50 so as not to confuse with other types 45 | TYPE_UNSIGNED_BYTES = 51 // assigned to 51 so as not to confuse with other types 46 | }; 47 | 48 | class BackgroundCalculation 49 | { 50 | 51 | public: 52 | virtual ~BackgroundCalculation(); 53 | 54 | static double getMeanValue(std::string filePath, int x, int y, int width, int height, int tiltNum); 55 | 56 | protected: 57 | BackgroundCalculation(); 58 | template static double computeMean(void* ptr, int numVoxels, Type type); 59 | }; 60 | 61 | 62 | #endif // _BACKGROUNDCALCULATION_H_ -------------------------------------------------------------------------------- /Support/cmp/ConfiguredFiles/cmpVersion.cpp.in: -------------------------------------------------------------------------------- 1 | /*-------------------------------------------------------------------------- 2 | * This file is autogenerated from @CMP_SOURCE_DIR@/ConfiguredFiles/cmpVersion.cpp.in during the cmake 3 | * configuration of your project. If you need to make changes, edit the 4 | * original file NOT THIS FILE. 5 | * --------------------------------------------------------------------------*//* Definition of version number for @VERSION_GEN_NAME@ */ 6 | #define @VERSION_GEN_NAME@_PACKAGE_NAME "@PROJECT_PREFIX@" 7 | #define @VERSION_GEN_NAME@_PACKAGE_COMPLETE "@PROJECT_PREFIX@ Version @VERSION_GEN_COMPLETE@" 8 | #define @VERSION_GEN_NAME@_COMPLETE "@VERSION_GEN_COMPLETE@" 9 | #define @VERSION_GEN_NAME@_VER_MAJOR "@VERSION_GEN_VER_MAJOR@" 10 | #define @VERSION_GEN_NAME@_VER_MINOR "@VERSION_GEN_VER_MINOR@" 11 | #define @VERSION_GEN_NAME@_VER_PATCH "@VERSION_GEN_VER_PATCH@" 12 | 13 | #include "@CMP_VERSION_HEADER_FILE_NAME@" 14 | 15 | // ----------------------------------------------------------------------------- 16 | // 17 | // ----------------------------------------------------------------------------- 18 | std::string @VERSION_GEN_NAMESPACE@::Version::Complete() 19 | { return std::string("@VERSION_GEN_COMPLETE@");} 20 | // ----------------------------------------------------------------------------- 21 | // 22 | // ----------------------------------------------------------------------------- 23 | std::string @VERSION_GEN_NAMESPACE@::Version::Major() 24 | { return std::string("@VERSION_GEN_VER_MAJOR@");} 25 | // ----------------------------------------------------------------------------- 26 | // 27 | // ----------------------------------------------------------------------------- 28 | std::string @VERSION_GEN_NAMESPACE@::Version::Minor() 29 | { return std::string("@VERSION_GEN_VER_MINOR@");} 30 | // ----------------------------------------------------------------------------- 31 | // 32 | // ----------------------------------------------------------------------------- 33 | std::string @VERSION_GEN_NAMESPACE@::Version::Patch() 34 | { return std::string("@VERSION_GEN_VER_PATCH@");} 35 | // ----------------------------------------------------------------------------- 36 | // 37 | // ----------------------------------------------------------------------------- 38 | std::string @VERSION_GEN_NAMESPACE@::Version::Package() 39 | { return std::string("@VERSION_GEN_VER_MAJOR@.@VERSION_GEN_VER_MINOR@");} 40 | // ----------------------------------------------------------------------------- 41 | // 42 | // ----------------------------------------------------------------------------- 43 | std::string @VERSION_GEN_NAMESPACE@::Version::PackageComplete() 44 | { return std::string("@PROJECT_PREFIX@ Version @VERSION_GEN_COMPLETE@");} 45 | -------------------------------------------------------------------------------- /Code/MBIRLib/Common/allocate.h: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * Copyright (c) 2011 Michael A. Jackson (BlueQuartz Software) 3 | * Copyright (c) 2011 Singanallur Venkatakrishnan (Purdue University) 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without modification, 7 | * are permitted provided that the following conditions are met: 8 | * 9 | * Redistributions of source code must retain the above copyright notice, this 10 | * list of conditions and the following disclaimer. 11 | * 12 | * Redistributions in binary form must reproduce the above copyright notice, this 13 | * list of conditions and the following disclaimer in the documentation and/or 14 | * other materials provided with the distribution. 15 | * 16 | * Neither the name of Singanallur Venkatakrishnan, Michael A. Jackson, the Pudue 17 | * Univeristy, BlueQuartz Software nor the names of its contributors may be used 18 | * to endorse or promote products derived from this software without specific 19 | * prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 27 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 30 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * This code was written under United States Air Force Contract number 33 | * FA8650-07-D-5800 34 | * 35 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ 36 | 37 | #ifndef _allocate_h_ 38 | #define _allocate_h_ 39 | 40 | 41 | 42 | #include "MBIRLib/MBIRLib.h" 43 | 44 | 45 | 46 | 47 | #ifdef __cplusplus 48 | extern "C" 49 | { 50 | #endif 51 | 52 | void* get_spc(int num, size_t size); 53 | void* mget_spc(int num, size_t size); 54 | void** get_img(int wd, int ht, size_t size); 55 | void free_img(void** pt); 56 | 57 | void*** get_3D(int wd, int ht, int dp, size_t size); 58 | void free_3D(void** *pt); 59 | 60 | void* multialloc(size_t s, int d, ...); 61 | void multifree(void* r, int d); 62 | 63 | #ifdef __cplusplus 64 | } 65 | #endif 66 | 67 | 68 | 69 | #endif /* _allocate_h_ */ 70 | -------------------------------------------------------------------------------- /Todo.txt: -------------------------------------------------------------------------------- 1 | * Make file should be defaulted to release 2 | * Enable saving the latest reconstruction at time of cancellation. 3 | *Change the Advanced parameter -> Noise_Model to Noise_Esimation 4 | * Streamline progress feedback to the GUI 5 | * Add more "Cancel" checks in the code 6 | * Turn doubles to floats to save memory. 7 | * Need to enable a quick load option to continue the reconstruction for a few 8 | more iterations. This will need reading the final rec, offset, gain and var. 9 | *Enable data sets in which max tilt is 90 degrees - there is a divide by cos(max angle) which will break if this occurs 10 | 11 | Stuff Completed 12 | 13 | * Memory calculate routines need to be dynamically computed 14 | * Display image with lowerleft as default and make the y go from 0 - ? from bottom to top 15 | * Allow user to define the XZ Plane that is shown during the reconstruction 16 | * Implement Target Gain estimation based on input data file.- Done. Venkat 6/14 17 | * Bug in name of the final sinogram file - Done.Venkat/Mike 6/13/2012 18 | * While choosing a region to recons. for multi-resolution need subvolume 19 | to be a proper multiple of xz size at all resolutions - Done. Venkat 6/14/2012 20 | * Parallelize the code - Done by Mike 6/12/2012 21 | * Enable Bright-Field .mrc input to GUI - Done. Venkat. 22 | * Implement reconstruction when Bright-Field is available - Done. Venkat 5/30 23 | * Do more tests of the automatic SigmaX calculation based on TargetGain - is it robust? - Done. Venkat 6/14/2012 24 | * Make a command line version of the code so that user can run multiple instances using script files if needed. - Done. Venkat 6/24/2012 25 | * The shape parameter can only take values from 1 to 2. Right now it goes right to zero. 26 | *Fix the smoothness and SigmaX calculation. SigmaX needs to be computed and multiplied by 1/smoothness internally. - Done. Venkat 27 | *Code fails if the extension .bin is not given in OutputReconstructionFile - Done Mike? 28 | * When in single slice mode we need to FORCE the num resolutions to 1 - Seems to be done by Mike. 29 | * Move : Target Gain, Stop Threshold, Outer, Inner Iterations, Default OFfset, Default variance, Default Initial Recon value, Num Resolutions to a Advanced Params Tab - done by Mike. 30 | * The check box for default offset is being placed near Stop threshold incorrectly - fixed. Venkat 31 | * Do we allow the user to set the SigmaX or do we always calculate it 32 | internally.- taken care of with smoothness. Venkat 33 | * Add an option to switch off #define for Joint_Estimation and #Noise estimation - done by Mike. 34 | I just noticed. In the data load section I think we should rename MRC File -> HAADF Data File. - Done 35 | 36 | Would it be possible to put a zoom capability on the single slice reconstruction? - Done. Mike. 37 | -------------------------------------------------------------------------------- /Code/QtSupport/MRCInfoWidget.h: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * Copyright (c) 2012 Michael A. Jackson (BlueQuartz Software) 3 | * Copyright (c) 2012 Singanallur Venkatakrishnan (Purdue University) 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without modification, 7 | * are permitted provided that the following conditions are met: 8 | * 9 | * Redistributions of source code must retain the above copyright notice, this 10 | * list of conditions and the following disclaimer. 11 | * 12 | * Redistributions in binary form must reproduce the above copyright notice, this 13 | * list of conditions and the following disclaimer in the documentation and/or 14 | * other materials provided with the distribution. 15 | * 16 | * Neither the name of Singanallur Venkatakrishnan, Michael A. Jackson, the Pudue 17 | * Univeristy, BlueQuartz Software nor the names of its contributors may be used 18 | * to endorse or promote products derived from this software without specific 19 | * prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 27 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 30 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * This code was written under United States Air Force Contract number 33 | * FA8650-07-D-5800 34 | * 35 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ 36 | 37 | 38 | 39 | #ifndef MRCINFOWIDGET_H_ 40 | #define MRCINFOWIDGET_H_ 41 | 42 | 43 | #include "ui_MRCInfoWidget.h" 44 | 45 | 46 | /* 47 | * 48 | */ 49 | class MRCInfoWidget : public QWidget, private Ui::MRCInfoWidget 50 | { 51 | Q_OBJECT; 52 | public: 53 | MRCInfoWidget(QWidget* parent = 0); 54 | virtual ~MRCInfoWidget(); 55 | 56 | void setInfo(QString mrcFilePath); 57 | 58 | 59 | 60 | private: 61 | MRCInfoWidget(const MRCInfoWidget&); // Copy Constructor Not Implemented 62 | void operator=(const MRCInfoWidget&); // Operator '=' Not Implemented 63 | 64 | }; 65 | 66 | #endif /* MRCINFOWIDGET_H_ */ 67 | -------------------------------------------------------------------------------- /Code/MBIRLib/HAADF/HAADFConstants.h: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * Copyright (c) 2014 Michael A. Jackson (BlueQuartz Software) 3 | * Copyright (c) 2014 Singanallur Venkatakrishnan (Purdue University) 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without modification, 7 | * are permitted provided that the following conditions are met: 8 | * 9 | * Redistributions of source code must retain the above copyright notice, this 10 | * list of conditions and the following disclaimer. 11 | * 12 | * Redistributions in binary form must reproduce the above copyright notice, this 13 | * list of conditions and the following disclaimer in the documentation and/or 14 | * other materials provided with the distribution. 15 | * 16 | * Neither the name of Singanallur Venkatakrishnan, Michael A. Jackson, the Purdue 17 | * Univeristy, BlueQuartz Software nor the names of its contributors may be used 18 | * to endorse or promote products derived from this software without specific 19 | * prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 27 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 30 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * This code was written under United States Air Force Contract number 33 | * FA8650-07-D-5800 34 | * 35 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ 36 | 37 | 38 | 39 | #ifndef _HAADFConstants_H_ 40 | #define _HAADFConstants_H_ 41 | 42 | #include 43 | 44 | //Region Of Interest for calculating the stopping criteria. Should be on with stopping threshold 45 | #define ROI 1 46 | #define EIMTOMO_USE_QGGMRF 1 //Was used earlier to switch priors 47 | #define POSITIVITY_CONSTRAINT 48 | 49 | #define BF_OFFSET 32768 //23696 - Bio data set 50 | #define BF_MAX 1865 //5689//42122 51 | 52 | #define SURROGATE_FUNCTION 53 | 54 | #define RANDOM_ORDER_UPDATES 55 | 56 | #define IDENTITY_NOISE_MODEL//May need to use this for negative valued data sets 57 | 58 | #endif /* _HAADFConstants_H_ */ 59 | -------------------------------------------------------------------------------- /Code/MXA/Common/SourceList.cmake: -------------------------------------------------------------------------------- 1 | 2 | set (install_files "0") 3 | 4 | 5 | if (MSVC) 6 | SET (MXA_WIN_Common_SRCS 7 | ${MXA_SOURCE_DIR}/Common/IO/Private/MXAPrivateWindowsFileReader.cpp 8 | ${MXA_SOURCE_DIR}/Common/IO/Private/MXAPrivateWindowsFileWriter.cpp 9 | ) 10 | SET (MXA_WIN_Common_HDRS 11 | ${MXA_SOURCE_DIR}/Common/IO/Private/MXAPrivateWindowsFileReader.h 12 | ${MXA_SOURCE_DIR}/Common/IO/Private/MXAPrivateWindowsFileWriter.h 13 | ) 14 | cmp_IDE_SOURCE_PROPERTIES( "MXA/Common/IO/Private" "${MXA_WIN_Common_HDRS}" "${MXA_WIN_Common_SRCS}" "${install_files}") 15 | else(MSVC) 16 | SET (MXA_UNIX_Common_SRCS 17 | ${MXA_SOURCE_DIR}/Common/IO/Private/MXAPrivateFileReader.cpp 18 | ${MXA_SOURCE_DIR}/Common/IO/Private/MXAPrivateFileWriter.cpp 19 | ) 20 | SET (MXA_UNIX_Common_HDRS 21 | ${MXA_SOURCE_DIR}/Common/IO/Private/MXAPrivateFileReader.h 22 | ${MXA_SOURCE_DIR}/Common/IO/Private/MXAPrivateFileWriter.h 23 | ) 24 | cmp_IDE_SOURCE_PROPERTIES( "MXA/Common/IO/Private" "${MXA_UNIX_Common_HDRS}" "${MXA_UNIX_Common_SRCS}" "${install_files}") 25 | endif() 26 | 27 | 28 | 29 | 30 | 31 | SET (MXA_Common_SOURCES 32 | 33 | ) 34 | 35 | SET (MXA_Common_HEADERS 36 | ${MXA_SOURCE_DIR}/Common/LogTime.h 37 | ${MXA_SOURCE_DIR}/Common/DLLExport.h 38 | ${MXA_SOURCE_DIR}/Common/MXAEndian.h 39 | ${MXA_SOURCE_DIR}/Common/MXATypeDefs.h 40 | ${MXA_SOURCE_DIR}/Common/MXAErrorDefinitions.h 41 | ${MXA_SOURCE_DIR}/Common/MXASetGetMacros.h 42 | ${MXA_SOURCE_DIR}/Common/IO/MXAFileReader64.h 43 | ${MXA_SOURCE_DIR}/Common/IO/MXAFileWriter64.h 44 | ${MXA_SOURCE_DIR}/Common/Cast/Cast.h 45 | ${MXA_SOURCE_DIR}/Common/Win32Defines.h 46 | ) 47 | 48 | 49 | cmp_IDE_SOURCE_PROPERTIES( "MXA/Common" "${MXA_Common_HEADERS}" "${MXA_Common_SOURCES}" "0") 50 | 51 | SET (MXA_Common_SRCS 52 | ${MXA_WIN_Common_SRCS} 53 | ${MXA_UNIX_Common_SRCS} 54 | ${MXA_Common_SOURCES} 55 | ) 56 | 57 | SET (MXA_Common_HDRS 58 | ${MXA_Common_HDRS} 59 | ${MXA_WIN_Common_HDRS} 60 | ${MXA_UNIX_Common_HDRS} 61 | ) 62 | 63 | if ( ${MXA_INSTALL_FILES} EQUAL 1 ) 64 | 65 | INSTALL (FILES ${MXA_SOURCE_DIR}/Common/IO/MXAFileReader64.h 66 | ${MXA_SOURCE_DIR}/Common/IO/MXAFileWriter64.h 67 | DESTINATION include/MXA/Common/IO 68 | COMPONENT Headers 69 | ) 70 | 71 | INSTALL (FILES ${MXA_WIN_Common_HDRS} 72 | ${MXA_UNIX_Common_HDRS} 73 | DESTINATION include/MXA/Common/IO/Private 74 | COMPONENT Headers 75 | ) 76 | 77 | INSTALL (FILES ${MXA_SOURCE_DIR}/Common/Cast/Cast.h 78 | DESTINATION include/MXA/Common/Cast 79 | COMPONENT Headers 80 | ) 81 | endif() 82 | 83 | -------------------------------------------------------------------------------- /Code/tclap/ArgTraits.h: -------------------------------------------------------------------------------- 1 | // -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*- 2 | 3 | /****************************************************************************** 4 | * 5 | * file: ArgTraits.h 6 | * 7 | * Copyright (c) 2007, Daniel Aarno, Michael E. Smoot . 8 | * All rights reverved. 9 | * 10 | * See the file COPYING in the top directory of this distribution for 11 | * more information. 12 | * 13 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 14 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 | * DEALINGS IN THE SOFTWARE. 20 | * 21 | *****************************************************************************/ 22 | 23 | // This is an internal tclap file, you should probably not have to 24 | // include this directly 25 | 26 | #ifndef TCLAP_ARGTRAITS_H 27 | #define TCLAP_ARGTRAITS_H 28 | 29 | namespace TCLAP { 30 | 31 | // We use two empty structs to get compile type specialization 32 | // function to work 33 | 34 | /** 35 | * A value like argument value type is a value that can be set using 36 | * operator>>. This is the default value type. 37 | */ 38 | struct ValueLike { 39 | typedef ValueLike ValueCategory; 40 | }; 41 | 42 | /** 43 | * A string like argument value type is a value that can be set using 44 | * operator=(string). Usefull if the value type contains spaces which 45 | * will be broken up into individual tokens by operator>>. 46 | */ 47 | struct StringLike {}; 48 | 49 | /** 50 | * A class can inherit from this object to make it have string like 51 | * traits. This is a compile time thing and does not add any overhead 52 | * to the inherenting class. 53 | */ 54 | struct StringLikeTrait { 55 | typedef StringLike ValueCategory; 56 | }; 57 | 58 | /** 59 | * A class can inherit from this object to make it have value like 60 | * traits. This is a compile time thing and does not add any overhead 61 | * to the inherenting class. 62 | */ 63 | struct ValueLikeTrait { 64 | typedef ValueLike ValueCategory; 65 | }; 66 | 67 | /** 68 | * Arg traits are used to get compile type specialization when parsing 69 | * argument values. Using an ArgTraits you can specify the way that 70 | * values gets assigned to any particular type during parsing. The two 71 | * supported types are string like and value like. 72 | */ 73 | template 74 | struct ArgTraits { 75 | typedef typename T::ValueCategory ValueCategory; 76 | //typedef ValueLike ValueCategory; 77 | }; 78 | 79 | #endif 80 | 81 | } // namespace 82 | -------------------------------------------------------------------------------- /Code/MBIRLib/BrightField/BFConstants.h: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * Copyright (c) 2014 Michael A. Jackson (BlueQuartz Software) 3 | * Copyright (c) 2014 Singanallur Venkatakrishnan (Purdue University) 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without modification, 7 | * are permitted provided that the following conditions are met: 8 | * 9 | * Redistributions of source code must retain the above copyright notice, this 10 | * list of conditions and the following disclaimer. 11 | * 12 | * Redistributions in binary form must reproduce the above copyright notice, this 13 | * list of conditions and the following disclaimer in the documentation and/or 14 | * other materials provided with the distribution. 15 | * 16 | * Neither the name of Singanallur Venkatakrishnan, Michael A. Jackson, the Purdue 17 | * Univeristy, BlueQuartz Software nor the names of its contributors may be used 18 | * to endorse or promote products derived from this software without specific 19 | * prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 27 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 30 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * This code was written under United States Air Force Contract number 33 | * FA8650-07-D-5800 34 | * 35 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ 36 | 37 | 38 | 39 | #ifndef _BFConstants_H_ 40 | #define _BFConstants_H_ 41 | 42 | 43 | //Region Of Interest for calculating the stopping criteria. Should be on with stopping threshold 44 | #define ROI 1 45 | #define EIMTOMO_USE_QGGMRF 1 //Was used earlier to switch priors 46 | #define BRAGG_CORRECTION //TODO : Get rid and make this the default case 47 | #define DefBraggThreshold 5e10 //Thresold in normalized uints. This value ensures at the start we do a "regular" BF recon 48 | #define BF_OFFSET 32768 //0//23696 //- Bio data set 49 | #define BF_MAX 1 //1865//30369//5689//42122//1865//32768// 50 | #define POSITIVITY_CONSTRAINT 51 | #define NHICD 52 | #define SUB_ITER 1 53 | 54 | 55 | #endif /* _BFConstants_H_ */ 56 | -------------------------------------------------------------------------------- /Code/MBIRLib/GenericFilters/CostData.h: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * Copyright (c) 2011, Michael A. Jackson (BlueQuartz Software) 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 11 | * Redistributions in binary form must reproduce the above copyright notice, this 12 | * list of conditions and the following disclaimer in the documentation and/or 13 | * other materials provided with the distribution. 14 | * 15 | * Neither the name of Michael A. Jackson nor the names of its contributors may 16 | * be used to endorse or promote products derived from this software without 17 | * specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 28 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ 30 | #ifndef COSTDATA_H_ 31 | #define COSTDATA_H_ 32 | 33 | 34 | #include 35 | 36 | #include 37 | 38 | #include "MXA/Common/MXASetGetMacros.h" 39 | #include "MBIRLib/MBIRLib.h" 40 | #include "MBIRLib/Reconstruction/ReconstructionStructures.h" 41 | 42 | 43 | /* 44 | * 45 | */ 46 | class MBIRLib_EXPORT CostData 47 | { 48 | public: 49 | MXA_SHARED_POINTERS(CostData); 50 | MXA_STATIC_NEW_MACRO(CostData); 51 | MXA_TYPE_MACRO(CostData); 52 | 53 | virtual ~CostData(); 54 | 55 | int initOutputFile(const std::string& filepath); 56 | 57 | int writeCostValue(Real_t value); 58 | 59 | int addCostValue(Real_t value); 60 | 61 | int numberOfCosts(); 62 | 63 | void printCosts(std::ostream& out); 64 | 65 | protected: 66 | CostData(); 67 | 68 | private: 69 | std::vector m_Cost; 70 | FILE* m_File; 71 | 72 | CostData(const CostData&); // Copy Constructor Not Implemented 73 | void operator=(const CostData&); // Operator '=' Not Implemented 74 | }; 75 | 76 | #endif /* COSTDATA_H_ */ 77 | -------------------------------------------------------------------------------- /Code/MXA/Common/MXAErrorDefinitions.h: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // Copyright (c) 2007, 2010 Michael A. Jackson for BlueQuartz Software 4 | // All rights reserved. 5 | // BSD License: http://www.opensource.org/licenses/bsd-license.html 6 | // 7 | // This code was written under United States Air Force Contract number 8 | // FA8650-04-C-5229 9 | // 10 | 11 | #ifndef MXAERRORDEFINITIONS_H_ 12 | #define MXAERRORDEFINITIONS_H_ 13 | 14 | 15 | /** 16 | * @file MXAErrorDefinitions.h 17 | * @brief This file contains the error codes for errors thrown only from XFORMAT 18 | * If the error came from HDF5, you have to use their error routines 19 | */ 20 | // ----------------------------------------------------------------------------- 21 | // File errors -50xx 22 | // ----------------------------------------------------------------------------- 23 | 24 | /** 25 | * @def MXA_ERROR_FILE_NOT_MXA 26 | * @brief Definition for MXA_ERROR_FILE_NOT_XMDA 27 | */ 28 | #define MXA_ERROR_FILE_NOT_MXA -5002 29 | 30 | /** 31 | * @def MXA_ERROR_FILE_NOT_FOUND 32 | * @brief Definition for MXA_ERROR_FILE_NOT_FOUND 33 | */ 34 | #define MXA_ERROR_FILE_NOT_FOUND -5003 35 | 36 | /** 37 | * @def MXA_ERROR_FILE_NOT_DEFINED 38 | * @brief Definition for MXA_ERROR_FILE_NOT_DEFINED 39 | */ 40 | #define MXA_ERROR_FILE_NOT_DEFINED -5004 41 | 42 | /** 43 | * @def MXA_ERROR_FILE_ZERO_SIZE 44 | * @brief Definition for MXA_ERROR_FILE_ZERO_SIZE 45 | */ 46 | #define MXA_ERROR_FILE_ZERO_SIZE -5005 47 | 48 | /** 49 | * @def MXA_ERROR_FILE_NOT_OPENED 50 | * @brief Error when the HDF file identifier is not valid 51 | */ 52 | #define MXA_ERROR_FILE_NOT_OPENED -5006 53 | 54 | /** 55 | * @def MXA_ERROR_IMAGE_FORMAT_NOT_SUPPORTED 56 | * @brief Error when importing an image format that is not supported 57 | */ 58 | #define MXA_ERROR_IMAGE_FORMAT_NOT_SUPPORTED -5007 59 | 60 | /** 61 | * @def MXA_ERROR_FILE_FORMAT_NOT_SUPPORTED 62 | * @brief General error when parsers or importers are trying to open a file that 63 | * the parser does not understand 64 | */ 65 | #define MXA_ERROR_FILE_FORMAT_NOT_SUPPORTED -5008 66 | 67 | /** 68 | * @def MXA_UNKNOWN_DATA_RECORD_TYPE 69 | * @brief Definition for MXA_UNKNOWN_DATA_RECORD_TYPE 70 | */ 71 | #define MXA_UNKNOWN_DATA_RECORD_TYPE -7000 72 | 73 | /* C++ style constants */ 74 | namespace MXA 75 | { 76 | const int32_t ErrorFileNotMXA = MXA_ERROR_FILE_NOT_MXA; 77 | const int32_t ErrorFileNotFound = MXA_ERROR_FILE_NOT_FOUND; 78 | const int32_t ErrorFileNotDefined = MXA_ERROR_FILE_NOT_DEFINED; 79 | const int32_t ErrorFileZeroSize = MXA_ERROR_FILE_ZERO_SIZE; 80 | const int32_t ErrorFileNotOpened = MXA_ERROR_FILE_NOT_OPENED; 81 | const int32_t ErrorImageFormatNotSupported = MXA_ERROR_IMAGE_FORMAT_NOT_SUPPORTED; 82 | const int32_t ErrorUnknownDataRecordType = MXA_UNKNOWN_DATA_RECORD_TYPE; 83 | const int32_t ErrorFileFormatNotSupported = MXA_ERROR_FILE_FORMAT_NOT_SUPPORTED; 84 | }; 85 | 86 | 87 | 88 | #endif /*MXAERRORDEFINITIONS_H_*/ 89 | -------------------------------------------------------------------------------- /Code/MBIRLib/Common/AbstractFilter.cpp: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * Copyright (c) 2011, Michael A. Jackson (BlueQuartz Software) 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 11 | * Redistributions in binary form must reproduce the above copyright notice, this 12 | * list of conditions and the following disclaimer in the documentation and/or 13 | * other materials provided with the distribution. 14 | * 15 | * Neither the name of Michael A. Jackson nor the names of its contributors may 16 | * be used to endorse or promote products derived from this software without 17 | * specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 28 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ 30 | 31 | #include "AbstractFilter.h" 32 | 33 | // ----------------------------------------------------------------------------- 34 | // 35 | // ----------------------------------------------------------------------------- 36 | AbstractFilter::AbstractFilter() : 37 | m_ErrorMessage(""), 38 | m_ErrorCondition(0), 39 | m_Cancel(false), 40 | m_Verbose(false), 41 | m_VeryVerbose(false) 42 | { 43 | 44 | } 45 | 46 | // ----------------------------------------------------------------------------- 47 | // 48 | // ----------------------------------------------------------------------------- 49 | AbstractFilter::~AbstractFilter() 50 | { 51 | 52 | } 53 | 54 | 55 | // ----------------------------------------------------------------------------- 56 | // 57 | // ----------------------------------------------------------------------------- 58 | void AbstractFilter::execute() 59 | { 60 | setErrorCondition(-1); 61 | setErrorMessage("AbstractFilter does not implement an execute method. Please use a subclass instead."); 62 | notify(getErrorMessage().c_str(), 0, Observable::UpdateErrorMessage); 63 | } 64 | 65 | -------------------------------------------------------------------------------- /Code/MBIRLib/IOFilters/RawGeometryWriter.h: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * Copyright (c) 2011, Michael A. Jackson (BlueQuartz Software) 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 11 | * Redistributions in binary form must reproduce the above copyright notice, this 12 | * list of conditions and the following disclaimer in the documentation and/or 13 | * other materials provided with the distribution. 14 | * 15 | * Neither the name of Michael A. Jackson nor the names of its contributors may 16 | * be used to endorse or promote products derived from this software without 17 | * specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 28 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ 30 | #ifndef RAWGEOMETRYWRITER_H_ 31 | #define RAWGEOMETRYWRITER_H_ 32 | 33 | 34 | #include "MXA/Common/MXASetGetMacros.h" 35 | #include "MBIRLib/MBIRLib.h" 36 | #include "MBIRLib/GenericFilters/TomoFilter.h" 37 | #include "MBIRLib/Reconstruction/ReconstructionStructures.h" 38 | 39 | /** 40 | * @class 41 | * @brief 42 | * @author 43 | * @date 44 | * @version 45 | */ 46 | class MBIRLib_EXPORT RawGeometryWriter : public TomoFilter 47 | { 48 | public: 49 | MXA_SHARED_POINTERS(RawGeometryWriter) 50 | MXA_STATIC_NEW_MACRO(RawGeometryWriter) 51 | MXA_STATIC_NEW_SUPERCLASS(TomoFilter, RawGeometryWriter) 52 | MXA_TYPE_MACRO_SUPER(RawGeometryWriter, TomoFilter) 53 | 54 | virtual ~RawGeometryWriter(); 55 | 56 | MXA_INSTANCE_STRING_PROPERTY(FilePath) 57 | 58 | void execute(); 59 | 60 | 61 | protected: 62 | RawGeometryWriter(); 63 | 64 | private: 65 | RawGeometryWriter(const RawGeometryWriter&); // Copy Constructor Not Implemented 66 | void operator=(const RawGeometryWriter&); // Operator '=' Not Implemented 67 | }; 68 | 69 | #endif /* RAWGEOMETRYWRITER_H_ */ 70 | -------------------------------------------------------------------------------- /Code/QtSupport/ImageOpenDialog.cpp: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * Copyright (c) 2011, Michael A. Jackson (BlueQuartz Software) 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 11 | * Redistributions in binary form must reproduce the above copyright notice, this 12 | * list of conditions and the following disclaimer in the documentation and/or 13 | * other materials provided with the distribution. 14 | * 15 | * Neither the name of Michael A. Jackson nor the names of its contributors may 16 | * be used to endorse or promote products derived from this software without 17 | * specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 28 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ 30 | #include "ImageOpenDialog.h" 31 | 32 | // ----------------------------------------------------------------------------- 33 | // 34 | // ----------------------------------------------------------------------------- 35 | ImageOpenDialog::ImageOpenDialog(QWidget* parent): 36 | QDialog(parent) 37 | { 38 | setupUi(this); 39 | } 40 | 41 | // ----------------------------------------------------------------------------- 42 | // 43 | // ----------------------------------------------------------------------------- 44 | ImageOpenDialog::~ImageOpenDialog() 45 | { 46 | } 47 | 48 | // ----------------------------------------------------------------------------- 49 | // 50 | // ----------------------------------------------------------------------------- 51 | void ImageOpenDialog::setStatus(QString s) 52 | { 53 | status->setText(s); 54 | this->update(); 55 | } 56 | 57 | 58 | // ----------------------------------------------------------------------------- 59 | // 60 | // ----------------------------------------------------------------------------- 61 | void ImageOpenDialog::setProgress(int p) 62 | { 63 | 64 | } 65 | -------------------------------------------------------------------------------- /Support/cmp/Modules/cmpAdjustLibVars.cmake: -------------------------------------------------------------------------------- 1 | ############################################ 2 | # 3 | # Check the existence of the libraries. 4 | # 5 | ############################################ 6 | # This macro was taken directly from the FindQt4.cmake file that is included 7 | # with the CMake distribution. This is NOT my work. All work was done by the 8 | # original authors of the FindQt4.cmake file. Only minor modifications were 9 | # made to remove references to Qt and make this file more generally applicable 10 | ######################################################################### 11 | 12 | MACRO (cmp_ADJUST_LIB_VARS basename) 13 | # message(STATUS "${basename}_INCLUDE_DIR: ${${basename}_INCLUDE_DIR}") 14 | 15 | if(${basename}_INCLUDE_DIR) 16 | 17 | # if only the release version was found, set the debug variable also to the release version 18 | if(${basename}_LIBRARY_RELEASE AND NOT ${basename}_LIBRARY_DEBUG) 19 | SET(${basename}_LIBRARY_DEBUG ${${basename}_LIBRARY_RELEASE}) 20 | SET(${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE}) 21 | SET(${basename}_LIBRARIES ${${basename}_LIBRARY_RELEASE}) 22 | endif(${basename}_LIBRARY_RELEASE AND NOT ${basename}_LIBRARY_DEBUG) 23 | 24 | # if only the debug version was found, set the release variable also to the debug version 25 | if(${basename}_LIBRARY_DEBUG AND NOT ${basename}_LIBRARY_RELEASE) 26 | SET(${basename}_LIBRARY_RELEASE ${${basename}_LIBRARY_DEBUG}) 27 | SET(${basename}_LIBRARY ${${basename}_LIBRARY_DEBUG}) 28 | SET(${basename}_LIBRARIES ${${basename}_LIBRARY_DEBUG}) 29 | endif(${basename}_LIBRARY_DEBUG AND NOT ${basename}_LIBRARY_RELEASE) 30 | if(${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE) 31 | # if the generator supports configuration types then set 32 | # optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value 33 | if(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) 34 | SET(${basename}_LIBRARY optimized ${${basename}_LIBRARY_RELEASE} debug ${${basename}_LIBRARY_DEBUG}) 35 | ELSE(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) 36 | # if there are no configuration types and CMAKE_BUILD_TYPE has no value 37 | # then just use the release libraries 38 | SET(${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE} ) 39 | ENDif(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) 40 | SET(${basename}_LIBRARIES optimized ${${basename}_LIBRARY_RELEASE} debug ${${basename}_LIBRARY_DEBUG}) 41 | endif(${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE) 42 | 43 | SET(${basename}_LIBRARY ${${basename}_LIBRARY} CACHE FILEPATH "The ${basename} library") 44 | 45 | if(${basename}_LIBRARY) 46 | SET(${basename}_FOUND 1) 47 | endif(${basename}_LIBRARY) 48 | 49 | endif(${basename}_INCLUDE_DIR ) 50 | 51 | # Make variables changeble to the advanced user 52 | MARK_AS_ADVANCED(${basename}_LIBRARY ${basename}_LIBRARY_RELEASE ${basename}_LIBRARY_DEBUG ${basename}_INCLUDE_DIR ) 53 | ENDMACRO (cmp_ADJUST_LIB_VARS) 54 | 55 | -------------------------------------------------------------------------------- /Code/MBIRLib/GenericFilters/TomoFilter.cpp: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * Copyright (c) 2011 Michael A. Jackson (BlueQuartz Software) 3 | * Copyright (c) 2011 Singanallur Venkatakrishnan (Purdue University) 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without modification, 7 | * are permitted provided that the following conditions are met: 8 | * 9 | * Redistributions of source code must retain the above copyright notice, this 10 | * list of conditions and the following disclaimer. 11 | * 12 | * Redistributions in binary form must reproduce the above copyright notice, this 13 | * list of conditions and the following disclaimer in the documentation and/or 14 | * other materials provided with the distribution. 15 | * 16 | * Neither the name of Singanallur Venkatakrishnan, Michael A. Jackson, the Pudue 17 | * Univeristy, BlueQuartz Software nor the names of its contributors may be used 18 | * to endorse or promote products derived from this software without specific 19 | * prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 27 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 30 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * This code was written under United States Air Force Contract number 33 | * FA8650-07-D-5800 34 | * 35 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ 36 | 37 | #include "TomoFilter.h" 38 | 39 | // ----------------------------------------------------------------------------- 40 | // 41 | // ----------------------------------------------------------------------------- 42 | TomoFilter::TomoFilter() 43 | { 44 | } 45 | 46 | // ----------------------------------------------------------------------------- 47 | // 48 | // ----------------------------------------------------------------------------- 49 | TomoFilter::~TomoFilter() 50 | { 51 | } 52 | 53 | // ----------------------------------------------------------------------------- 54 | // 55 | // ----------------------------------------------------------------------------- 56 | void TomoFilter::execute() 57 | { 58 | setErrorCondition(-1); 59 | setErrorMessage("TomoFilter must be subclassed to be usable"); 60 | notify(getErrorMessage().c_str(), 100, UpdateProgressMessage); 61 | } 62 | -------------------------------------------------------------------------------- /Code/Applications/BFReconstruction/BFReconstructionArgsParser.h: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * Copyright (c) 2011, Singanallur Venkatakrishnan 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 11 | * Redistributions in binary form must reproduce the above copyright notice, this 12 | * list of conditions and the following disclaimer in the documentation and/or 13 | * other materials provided with the distribution. 14 | * 15 | * Neither the name of Singanallur Venkatakrishnan , Purdue University nor the 16 | * names of its contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 28 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ 30 | #ifndef _SCALEOFFSET_CORRECTION_PARSER_H_ 31 | #define _SCALEOFFSET_CORRECTION_PARSER_H_ 32 | 33 | #include 34 | #include 35 | #include 36 | 37 | 38 | #include "MBIRLib/Reconstruction/ReconstructionStructures.h" 39 | #include "MBIRLib/BrightField/BFMultiResolutionReconstruction.h" 40 | 41 | 42 | /** 43 | * @class BFReconstructionArgsParser BFReconstructionArgsParser.h ScaleOffsetCorrectionAlgorithm/BFReconstructionArgsParser.h 44 | * @brief 45 | * @author 46 | * @date Nov 16, 2011 47 | * @version 1.0 48 | */ 49 | class BFReconstructionArgsParser 50 | { 51 | public: 52 | BFReconstructionArgsParser(); 53 | virtual ~BFReconstructionArgsParser(); 54 | 55 | int parseArguments(int argc, char** argv, BFMultiResolutionReconstruction::Pointer multiRes); 56 | 57 | void printInputs(TomoInputsPtr inputs, std::ostream& out); 58 | 59 | private: 60 | uint64_t startm; 61 | uint64_t stopm; 62 | 63 | BFReconstructionArgsParser(const BFReconstructionArgsParser&); // Copy Constructor Not Implemented 64 | void operator=(const BFReconstructionArgsParser&); // Operator '=' Not Implemented 65 | 66 | }; 67 | 68 | #endif //ComputationInputs 69 | -------------------------------------------------------------------------------- /Code/QtSupport/QFileCompleter.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // 3 | /* ============================================================================ 4 | * Copyright (c) 2010, Michael A. Jackson (BlueQuartz Software) 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without modification, 8 | * are permitted provided that the following conditions are met: 9 | * 10 | * Redistributions of source code must retain the above copyright notice, this 11 | * list of conditions and the following disclaimer. 12 | * 13 | * Redistributions in binary form must reproduce the above copyright notice, this 14 | * list of conditions and the following disclaimer in the documentation and/or 15 | * other materials provided with the distribution. 16 | * 17 | * Neither the name of Michael A. Jackson nor the names of its contributors may 18 | * be used to endorse or promote products derived from this software without 19 | * specific prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 27 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 30 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ 32 | // 33 | // This code was partly written under US Air Force Contract FA8650-07-D-5800 34 | // 35 | /////////////////////////////////////////////////////////////////////////////// 36 | #ifndef QFILECOMPLETER_H_ 37 | #define QFILECOMPLETER_H_ 38 | 39 | #include 40 | #include 41 | 42 | /** 43 | * @class QFileCompleter QFileCompleter.h QtSupport/QFileCompleter.h 44 | * @brief Class to extend to complete file paths in QLineEdits 45 | * @author Michael A. Jackson for BlueQuartz Software 46 | * @date Jul 26, 2010 47 | * @version 1.0 48 | */ 49 | class QFileCompleter : public QCompleter 50 | { 51 | Q_OBJECT; 52 | 53 | public: 54 | /** 55 | * @brief Contrstructor 56 | * @param o Parent QObject 57 | * @param dirs Should the completer ONLY show directories 58 | * @return 59 | */ 60 | QFileCompleter(QObject* o, bool dirs); 61 | 62 | /** 63 | * @brief Returns a file path from the given QModelIndex 64 | * @param idx The QModelIndex to look up a path 65 | * @return 66 | */ 67 | virtual QString pathFromIndex(const QModelIndex& idx) const; 68 | }; 69 | 70 | #endif /* QFILECOMPLETER_H_ */ 71 | -------------------------------------------------------------------------------- /Code/Applications/HAADFReconstruction/HAADFReconstructionArgsParser.h: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * Copyright (c) 2011, Singanallur Venkatakrishnan 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 11 | * Redistributions in binary form must reproduce the above copyright notice, this 12 | * list of conditions and the following disclaimer in the documentation and/or 13 | * other materials provided with the distribution. 14 | * 15 | * Neither the name of Singanallur Venkatakrishnan , Purdue University nor the 16 | * names of its contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 28 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ 30 | #ifndef _SCALEOFFSET_CORRECTION_PARSER_H_ 31 | #define _SCALEOFFSET_CORRECTION_PARSER_H_ 32 | 33 | #include 34 | #include 35 | #include 36 | 37 | 38 | #include "MBIRLib/Reconstruction/ReconstructionStructures.h" 39 | #include "MBIRLib/HAADF/HAADF_MultiResolutionReconstruction.h" 40 | 41 | 42 | /** 43 | * @class HAADFReconstructionArgsParser HAADFReconstructionArgsParser.h ScaleOffsetCorrectionAlgorithm/HAADFReconstructionArgsParser.h 44 | * @brief 45 | * @author 46 | * @date Nov 16, 2011 47 | * @version 1.0 48 | */ 49 | class HAADFReconstructionArgsParser 50 | { 51 | public: 52 | HAADFReconstructionArgsParser(); 53 | virtual ~HAADFReconstructionArgsParser(); 54 | 55 | int parseArguments(int argc, char** argv, HAADF_MultiResolutionReconstruction::Pointer multiRes); 56 | 57 | void printInputs(TomoInputsPtr inputs, std::ostream& out); 58 | 59 | private: 60 | uint64_t startm; 61 | uint64_t stopm; 62 | 63 | HAADFReconstructionArgsParser(const HAADFReconstructionArgsParser&); // Copy Constructor Not Implemented 64 | void operator=(const HAADFReconstructionArgsParser&); // Operator '=' Not Implemented 65 | 66 | }; 67 | 68 | #endif //ComputationInputs 69 | -------------------------------------------------------------------------------- /Code/MBIRLib/BrightField/BF_QGGMRFPriorModel.h: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * Copyright (c) 2012 Michael A. Jackson (BlueQuartz Software) 3 | * Copyright (c) 2012 Singanallur Venkatakrishnan (Purdue University) 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without modification, 7 | * are permitted provided that the following conditions are met: 8 | * 9 | * Redistributions of source code must retain the above copyright notice, this 10 | * list of conditions and the following disclaimer. 11 | * 12 | * Redistributions in binary form must reproduce the above copyright notice, this 13 | * list of conditions and the following disclaimer in the documentation and/or 14 | * other materials provided with the distribution. 15 | * 16 | * Neither the name of Singanallur Venkatakrishnan, Michael A. Jackson, the Pudue 17 | * Univeristy, BlueQuartz Software nor the names of its contributors may be used 18 | * to endorse or promote products derived from this software without specific 19 | * prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 27 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 30 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * This code was written under United States Air Force Contract number 33 | * FA8650-07-D-5800 34 | * 35 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ 36 | 37 | //q-GGMRF is of the form 38 | // \rho(\delta)= (|\deta/sigma|^p)/(c + |\deta/sigma|^(p-q)) 39 | // p=2; 1<=q<=2 40 | 41 | #ifndef _BF_QGGMRFPriorModel_H_ 42 | #define _BF_QGGMRFPriorModel_H_ 43 | 44 | #include "MBIRLib/MBIRLib.h" 45 | #include "MBIRLib/Reconstruction/QGGMRF_Functions.h" 46 | 47 | namespace QGGMRF 48 | { 49 | 50 | 51 | /** 52 | * @brief initializePriorModel 53 | * @param tomoInputs 54 | * @param qggmrf_values 55 | */ 56 | void initializePriorModel(TomoInputsPtr tomoInputs, QGGMRF::QGGMRF_Values* qggmrf_values, Real_t* filter); 57 | 58 | /** 59 | * @brief initializeFilter 60 | * @param filter 61 | */ 62 | void initializeFilter(Real_t* filter); 63 | 64 | /** 65 | * @brief PriorModelCost 66 | * @param geometry 67 | * @param qggmrf_values 68 | * @param filter 69 | * @return 70 | */ 71 | Real_t PriorModelCost(GeometryPtr geometry, QGGMRF::QGGMRF_Values* qggmrf_values, Real_t* filter); 72 | 73 | 74 | } /* end namespace BFQGGMRF */ 75 | 76 | #endif /* BFQGGMRF_FUNCTIONS_H_ */ 77 | -------------------------------------------------------------------------------- /Code/MBIRLib/GenericFilters/MRCSinogramInitializer.h: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * Copyright (c) 2011 Michael A. Jackson (BlueQuartz Software) 3 | * Copyright (c) 2011 Singanallur Venkatakrishnan (Purdue University) 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without modification, 7 | * are permitted provided that the following conditions are met: 8 | * 9 | * Redistributions of source code must retain the above copyright notice, this 10 | * list of conditions and the following disclaimer. 11 | * 12 | * Redistributions in binary form must reproduce the above copyright notice, this 13 | * list of conditions and the following disclaimer in the documentation and/or 14 | * other materials provided with the distribution. 15 | * 16 | * Neither the name of Singanallur Venkatakrishnan, Michael A. Jackson, the Pudue 17 | * Univeristy, BlueQuartz Software nor the names of its contributors may be used 18 | * to endorse or promote products derived from this software without specific 19 | * prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 27 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 30 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * This code was written under United States Air Force Contract number 33 | * FA8650-07-D-5800 34 | * 35 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ 36 | 37 | #ifndef MRCSINOGRAMINITIALIZER_H_ 38 | #define MRCSINOGRAMINITIALIZER_H_ 39 | 40 | #include "MXA/Common/MXASetGetMacros.h" 41 | 42 | #include "MBIRLib/MBIRLib.h" 43 | #include "MBIRLib/GenericFilters/TomoFilter.h" 44 | #include "MBIRLib/Reconstruction/ReconstructionStructures.h" 45 | 46 | 47 | /* 48 | * 49 | */ 50 | class MBIRLib_EXPORT MRCSinogramInitializer : public TomoFilter 51 | { 52 | public: 53 | MXA_SHARED_POINTERS(MRCSinogramInitializer) 54 | MXA_STATIC_NEW_MACRO(MRCSinogramInitializer) 55 | MXA_STATIC_NEW_SUPERCLASS(TomoFilter, MRCSinogramInitializer) 56 | MXA_TYPE_MACRO_SUPER(MRCSinogramInitializer, TomoFilter) 57 | 58 | virtual ~MRCSinogramInitializer(); 59 | 60 | virtual void execute(); 61 | 62 | protected: 63 | MRCSinogramInitializer(); 64 | 65 | private: 66 | MRCSinogramInitializer(const MRCSinogramInitializer&); // Copy Constructor Not Implemented 67 | void operator=(const MRCSinogramInitializer&); // Operator '=' Not Implemented 68 | }; 69 | 70 | #endif /* MRCSINOGRAMINITIALIZER_H_ */ 71 | -------------------------------------------------------------------------------- /Code/MBIRLib/GenericFilters/RawSinogramInitializer.h: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * Copyright (c) 2011 Michael A. Jackson (BlueQuartz Software) 3 | * Copyright (c) 2011 Singanallur Venkatakrishnan (Purdue University) 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without modification, 7 | * are permitted provided that the following conditions are met: 8 | * 9 | * Redistributions of source code must retain the above copyright notice, this 10 | * list of conditions and the following disclaimer. 11 | * 12 | * Redistributions in binary form must reproduce the above copyright notice, this 13 | * list of conditions and the following disclaimer in the documentation and/or 14 | * other materials provided with the distribution. 15 | * 16 | * Neither the name of Singanallur Venkatakrishnan, Michael A. Jackson, the Pudue 17 | * Univeristy, BlueQuartz Software nor the names of its contributors may be used 18 | * to endorse or promote products derived from this software without specific 19 | * prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 27 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 30 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * This code was written under United States Air Force Contract number 33 | * FA8650-07-D-5800 34 | * 35 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ 36 | #ifndef RAWSINOGRAMINITIALIZER_H_ 37 | #define RAWSINOGRAMINITIALIZER_H_ 38 | 39 | 40 | #include "MXA/Common/MXASetGetMacros.h" 41 | 42 | #include "MBIRLib/MBIRLib.h" 43 | #include "MBIRLib/GenericFilters/TomoFilter.h" 44 | #include "MBIRLib/Reconstruction/ReconstructionStructures.h" 45 | 46 | 47 | /* 48 | * 49 | */ 50 | class MBIRLib_EXPORT RawSinogramInitializer : public TomoFilter 51 | { 52 | public: 53 | MXA_SHARED_POINTERS(RawSinogramInitializer) 54 | MXA_STATIC_NEW_MACRO(RawSinogramInitializer); 55 | MXA_STATIC_NEW_SUPERCLASS(TomoFilter, RawSinogramInitializer); 56 | MXA_TYPE_MACRO_SUPER(RawSinogramInitializer, TomoFilter) 57 | 58 | virtual ~RawSinogramInitializer(); 59 | 60 | virtual void execute(); 61 | 62 | protected: 63 | RawSinogramInitializer(); 64 | 65 | private: 66 | RawSinogramInitializer(const RawSinogramInitializer&); // Copy Constructor Not Implemented 67 | void operator=(const RawSinogramInitializer&); // Operator '=' Not Implemented 68 | }; 69 | 70 | 71 | 72 | #endif /* RAWSINOGRAMINITIALIZER_H_ */ 73 | -------------------------------------------------------------------------------- /Code/MBIRLib/MBIRLibConfiguration.h.in: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * Copyright (c) 2011 Michael A. Jackson (BlueQuartz Software) 3 | * Copyright (c) 2011 Singanallur Venkatakrishnan (Purdue University) 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without modification, 7 | * are permitted provided that the following conditions are met: 8 | * 9 | * Redistributions of source code must retain the above copyright notice, this 10 | * list of conditions and the following disclaimer. 11 | * 12 | * Redistributions in binary form must reproduce the above copyright notice, this 13 | * list of conditions and the following disclaimer in the documentation and/or 14 | * other materials provided with the distribution. 15 | * 16 | * Neither the name of Singanallur Venkatakrishnan, Michael A. Jackson, the Pudue 17 | * Univeristy, BlueQuartz Software nor the names of its contributors may be used 18 | * to endorse or promote products derived from this software without specific 19 | * prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 27 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 30 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * This code was written under United States Air Force Contract number 33 | * FA8650-07-D-5800 34 | * 35 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ 36 | 37 | /* This file is auto generated. DO NOT EDIT THIS FILE. Edit the original template 38 | * file and then rerun CMake again to regenerate this file. 39 | */ 40 | 41 | #ifndef _MBIRLib_H_ 42 | #define _MBIRLib_H_ 43 | 44 | 45 | /* Define to 1 if TomoLibLib was built as a dynamic library */ 46 | #cmakedefine MBIRLib_BUILT_AS_DYNAMIC_LIB @MBIRLib_BUILT_AS_DYNAMIC_LIB@ 47 | 48 | /* Did we compile with HDF5 support */ 49 | // #define MBIRLib_HDF5_SUPPORT @MBIRLib_HDF5_SUPPORT@ 50 | 51 | /* Are we compiling Tiff support using an external libTiff */ 52 | // #define MBIRLib_TIFF_SUPPORT @MBIRLib_TIFF_SUPPORT@ 53 | 54 | /* define to 1 if we are using parallel algorithms */ 55 | #cmakedefine OpenMBIR_USE_PARALLEL_ALGORITHMS @OpenMBIR_USE_PARALLEL_ALGORITHMS@ 56 | 57 | /* Include the Overall Configuration header file */ 58 | #include "@PROJECT_NAME@/@CMP_CONFIGURATION_FILE_NAME@" 59 | 60 | /* Include the Typedefs Header */ 61 | #include "@PROJECT_NAME@/@CMP_TYPES_FILE_NAME@" 62 | 63 | /* Include the DLL export preprocessor defines */ 64 | #include "MBIRLib/Common/MBIRLibDLLExport.h" 65 | 66 | 67 | #endif 68 | -------------------------------------------------------------------------------- /Code/MBIRLib/GenericFilters/RawSinogramInitializer.cpp: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * Copyright (c) 2011 Michael A. Jackson (BlueQuartz Software) 3 | * Copyright (c) 2011 Singanallur Venkatakrishnan (Purdue University) 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without modification, 7 | * are permitted provided that the following conditions are met: 8 | * 9 | * Redistributions of source code must retain the above copyright notice, this 10 | * list of conditions and the following disclaimer. 11 | * 12 | * Redistributions in binary form must reproduce the above copyright notice, this 13 | * list of conditions and the following disclaimer in the documentation and/or 14 | * other materials provided with the distribution. 15 | * 16 | * Neither the name of Singanallur Venkatakrishnan, Michael A. Jackson, the Pudue 17 | * Univeristy, BlueQuartz Software nor the names of its contributors may be used 18 | * to endorse or promote products derived from this software without specific 19 | * prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 27 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 30 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * This code was written under United States Air Force Contract number 33 | * FA8650-07-D-5800 34 | * 35 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ 36 | 37 | #include "RawSinogramInitializer.h" 38 | 39 | // ----------------------------------------------------------------------------- 40 | // 41 | // ----------------------------------------------------------------------------- 42 | RawSinogramInitializer::RawSinogramInitializer() 43 | { 44 | 45 | } 46 | 47 | 48 | // ----------------------------------------------------------------------------- 49 | // 50 | // ----------------------------------------------------------------------------- 51 | RawSinogramInitializer::~RawSinogramInitializer() 52 | { 53 | } 54 | 55 | // ----------------------------------------------------------------------------- 56 | // 57 | // ----------------------------------------------------------------------------- 58 | void RawSinogramInitializer::execute() 59 | { 60 | // If an error occurs, clean up any memory, call "setErrorCondition(-1)" and 61 | // also setErrorMessage("Something went wrong"); and then return 62 | 63 | 64 | 65 | 66 | 67 | setErrorCondition(0); 68 | setErrorMessage(""); 69 | notify("Done Reading the Raw Input file", 0, UpdateProgressMessage); 70 | 71 | } 72 | -------------------------------------------------------------------------------- /Code/MBIRLib/Common/AbstractFilter.h: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * Copyright (c) 2011, Michael A. Jackson (BlueQuartz Software) 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * Redistributions of source code must retain the above copyright notice, this 9 | * list of conditions and the following disclaimer. 10 | * 11 | * Redistributions in binary form must reproduce the above copyright notice, this 12 | * list of conditions and the following disclaimer in the documentation and/or 13 | * other materials provided with the distribution. 14 | * 15 | * Neither the name of Michael A. Jackson nor the names of its contributors may 16 | * be used to endorse or promote products derived from this software without 17 | * specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 28 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ 30 | #ifndef _AbstractFilter_H_ 31 | #define _AbstractFilter_H_ 32 | 33 | #include 34 | #include 35 | 36 | #include "MXA/Common/MXASetGetMacros.h" 37 | 38 | 39 | #include "MBIRLib/MBIRLib.h" 40 | 41 | #include "MBIRLib/Common/Observable.h" 42 | 43 | 44 | 45 | 46 | class MBIRLib_EXPORT AbstractFilter : public Observable 47 | { 48 | public: 49 | MXA_SHARED_POINTERS(AbstractFilter) 50 | MXA_STATIC_NEW_MACRO(AbstractFilter) 51 | MXA_TYPE_MACRO_SUPER(AbstractFilter, Observable) 52 | 53 | virtual ~AbstractFilter(); 54 | 55 | // These should be implemented by the subclass 56 | MXA_INSTANCE_STRING_PROPERTY(ErrorMessage); 57 | MXA_INSTANCE_PROPERTY(int, ErrorCondition); 58 | /** 59 | * @brief Cancel the operation 60 | */ 61 | MXA_INSTANCE_PROPERTY(bool, Cancel); 62 | 63 | MXA_INSTANCE_PROPERTY(bool, Verbose); 64 | MXA_INSTANCE_PROPERTY(bool, VeryVerbose); 65 | 66 | virtual void printValues(std::ostream& out) {} 67 | 68 | 69 | /** 70 | * @brief This method should be fully implemented in subclasses. 71 | */ 72 | virtual void execute(); 73 | 74 | protected: 75 | AbstractFilter(); 76 | 77 | 78 | 79 | private: 80 | AbstractFilter(const AbstractFilter&); // Copy Constructor Not Implemented 81 | void operator=(const AbstractFilter&); // Operator '=' Not Implemented 82 | }; 83 | 84 | 85 | 86 | 87 | #endif /* _AbstractFilter_H_ */ 88 | -------------------------------------------------------------------------------- /Code/MBIRLib/GenericFilters/TomoFilter.h: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * Copyright (c) 2011 Michael A. Jackson (BlueQuartz Software) 3 | * Copyright (c) 2011 Singanallur Venkatakrishnan (Purdue University) 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without modification, 7 | * are permitted provided that the following conditions are met: 8 | * 9 | * Redistributions of source code must retain the above copyright notice, this 10 | * list of conditions and the following disclaimer. 11 | * 12 | * Redistributions in binary form must reproduce the above copyright notice, this 13 | * list of conditions and the following disclaimer in the documentation and/or 14 | * other materials provided with the distribution. 15 | * 16 | * Neither the name of Singanallur Venkatakrishnan, Michael A. Jackson, the Pudue 17 | * Univeristy, BlueQuartz Software nor the names of its contributors may be used 18 | * to endorse or promote products derived from this software without specific 19 | * prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 27 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 30 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | * This code was written under United States Air Force Contract number 33 | * FA8650-07-D-5800 34 | * 35 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ 36 | 37 | #ifndef TOMOFILTER_H_ 38 | #define TOMOFILTER_H_ 39 | 40 | #include "MXA/Common/MXASetGetMacros.h" 41 | 42 | #include "MBIRLib/MBIRLib.h" 43 | #include "MBIRLib/Common/AbstractFilter.h" 44 | #include "MBIRLib/Reconstruction/ReconstructionStructures.h" 45 | 46 | 47 | /* 48 | * 49 | */ 50 | class MBIRLib_EXPORT TomoFilter : public AbstractFilter 51 | { 52 | public: 53 | MXA_SHARED_POINTERS(TomoFilter) 54 | MXA_STATIC_NEW_MACRO(TomoFilter); 55 | MXA_STATIC_NEW_SUPERCLASS(AbstractFilter, TomoFilter); 56 | MXA_TYPE_MACRO_SUPER(TomoFilter, AbstractFilter) 57 | 58 | virtual ~TomoFilter(); 59 | 60 | MXA_INSTANCE_PROPERTY(TomoInputsPtr, TomoInputs) 61 | MXA_INSTANCE_PROPERTY(SinogramPtr, Sinogram) 62 | MXA_INSTANCE_PROPERTY(GeometryPtr, Geometry) 63 | MXA_INSTANCE_PROPERTY(AdvancedParametersPtr, AdvParams) 64 | 65 | virtual void execute(); 66 | 67 | protected: 68 | TomoFilter(); 69 | 70 | private: 71 | TomoFilter(const TomoFilter&); // Copy Constructor Not Implemented 72 | void operator=(const TomoFilter&); // Operator '=' Not Implemented 73 | }; 74 | 75 | 76 | #endif /* TOMOFILTER_H_ */ 77 | --------------------------------------------------------------------------------