├── PluginSDK
├── PythonRecon
│ ├── Python
│ │ ├── ExtractFeatures.py
│ │ ├── my_utility
│ │ │ ├── __init__.py
│ │ │ ├── classTree.py
│ │ │ ├── reloadall.py
│ │ │ ├── AttrDisplay.py
│ │ │ └── AttrDisplay1.py
│ │ ├── ReadNiiPathFiles.py
│ │ ├── Radiomics_assist.py
│ │ ├── TransferListDimensionOrder.py
│ │ ├── excel_helper.py
│ │ ├── demo_test.py
│ │ └── Radiomics_ExtractFeatures.py
│ ├── NiiReader.cpp
│ ├── FileIterator.cpp
│ ├── FolderIterator.cpp
│ ├── ExtractFeatures.cpp
│ ├── RFeaturesCollector.cpp
│ ├── PythonRecon.cpp
│ ├── packages.config
│ ├── stdafx.cpp
│ ├── targetver.h
│ ├── stdafx.h
│ ├── FolderCollector.h
│ ├── FileIterator.h
│ ├── RFeaturesCollector.h
│ ├── PyClassification.h
│ ├── FolderIterator.h
│ ├── ExtractFeatures.h
│ ├── dllmain.cpp
│ ├── FolderCollector.cpp
│ └── ReadMe.txt
├── BasicRecon
│ ├── Fft2D.cpp
│ ├── IcePeFt.h
│ ├── FineCF.cpp
│ ├── IcePeFt.cpp
│ ├── SimpleGrid.cpp
│ ├── DeOversampling.cpp
│ ├── DrawlineOnImage.cpp
│ ├── RadialSampling.cpp
│ ├── SliceSelector.cpp
│ ├── SampleDataProtocol.cpp
│ ├── ChanneIImageDataCollector.cpp
│ ├── BasicRecon.cpp
│ ├── packages.config
│ ├── stdafx.cpp
│ ├── targetver.h
│ ├── SliceMerger.cpp.rej
│ ├── ChannelIterator.h
│ ├── Flip.h
│ ├── stdafx.h
│ ├── FineCF.h
│ ├── imageProcessing.h
│ ├── CalcuArea.h
│ ├── LinesSelector.h
│ ├── SliceIterator.h
│ ├── Difference.h
│ ├── SliceSelector.h
│ ├── ModulePhase.h
│ ├── SliceMerger.h
│ ├── ChannelSelector.h
│ ├── GrayScaleUnifier.h
│ ├── NiumagPFFTConjugator.h
│ ├── PhaseCorrector.h
│ ├── SubSampling.h
│ ├── NiumagFidWriter.h
│ ├── JpegExporter.h
│ ├── NiuMriImageWriter.h
│ ├── DeOversampling.h
│ ├── NLM.h
│ ├── SimpleGrid.h
│ ├── ZeroFilling.h
│ ├── NiumagFidReader.h
│ ├── NiumagImgReader.h
│ ├── NiuMriImageReader.h
│ ├── ComplexSplitter.h
│ ├── RadialSampling.h
│ ├── ChannelDataCollector.h
│ ├── DataTypeConvertor.h
│ ├── Fft2D.h
│ ├── Fft3D.h
│ ├── CalcuArea.cpp
│ ├── ChannelMerger.h
│ ├── ChannelImageDataCollector.h
│ ├── Nlmeans.h
│ ├── Fft1D.h
│ ├── CmrDataReader.h
│ ├── DrawlineOnImage.h
│ ├── GrayScaleUnifier.cpp
│ ├── ChannelIterator.cpp
│ ├── SubSampling.cpp
│ ├── SliceMerger.cpp
│ ├── Flip.cpp
│ ├── LinesSelector.cpp
│ └── ChannelSelector.cpp
└── PluginSDK.sln
├── API
├── PipelineTest
│ ├── daub2.flt
│ ├── Pipelines
│ │ ├── NiumagFidWriter.pipeline
│ │ ├── NiumagImgReader.pipeline
│ │ ├── NiuMriImageReader.pipeline
│ │ ├── NiumagImgWriterReader.pipeline
│ │ ├── FineCF.pipeline
│ │ ├── ImgPythonShow.pipeline
│ │ ├── demoNiiReader.pipeline
│ │ ├── demoRadiomics.pipeline
│ │ ├── NiumagFidWriterReader.pipeline
│ │ ├── NiumagFidReader.pipeline
│ │ ├── Test_niumag_recon_yaplocal.pipeline
│ │ ├── NiuMriImageWriter.pipeline
│ │ ├── niumag_recon.pipeline
│ │ ├── test_niumag_recon.pipeline
│ │ ├── grappa.pipeline
│ │ ├── Test0.pipeline
│ │ ├── CompressedSensing.pipeline
│ │ ├── FFT3DTest.pipeline
│ │ ├── Radiomics_test2.pipeline
│ │ ├── Test1b.pipeline
│ │ ├── Test0_FFT3D.pipeline
│ │ ├── Test1-pjf.pipeline
│ │ ├── Radiomics_test.pipeline
│ │ ├── Test0b.pipeline
│ │ ├── Test.pipeline
│ │ ├── Test0_simple.pipeline
│ │ ├── PartialFFT.pipeline
│ │ ├── Test0_RadialSampling.pipeline
│ │ ├── demo.pipeline
│ │ ├── CompressedSensing2.pipeline
│ │ ├── CompressedSensing2test.pipeline
│ │ └── Test0_qt.pipeline
│ ├── packages.config
│ ├── stdafx.cpp
│ ├── targetver.h
│ ├── ProcessorDebugger.h
│ ├── stdafx.h
│ ├── YapDebugger.h
│ ├── ReadMe.txt
│ └── PipelineTest.vcxproj.filters
├── Yap
│ ├── ScanFileParser.cpp
│ ├── packages.config
│ ├── ModuleAgent.h
│ ├── PipelineCompiler.h
│ ├── ProcessorAgent.h
│ ├── ScanFileParser.h
│ ├── VdfParser.h
│ ├── ModuleAgent.cpp
│ ├── YapClient.pro
│ └── Yap.vcxproj.filters
└── UnitTests
│ ├── VdfUnitTests.cpp
│ ├── ScanFileParserUnitTest.cpp
│ ├── packages.config
│ ├── stdafx.cpp
│ ├── targetver.h
│ ├── stdafx.h
│ ├── PipelineUnitTests.vcxproj.filters
│ └── ReadMe.txt
├── Pipelines - 快捷方式.lnk
├── GrappaRecon
├── Grappa.cpp
├── stdafx.cpp
├── targetver.h
├── stdafx.h
├── dllmain.cpp
├── Grappa.h
└── GrappaRecon.vcxproj.filters
├── Shared
├── Interface
│ ├── IData.h
│ ├── packages.config
│ ├── Interfaces.h
│ ├── IPython.h
│ ├── ILog.h
│ ├── IPythonUser.h
│ ├── IContainer.h
│ ├── Interface.vcxproj.filters
│ └── IProcessor.h
├── Utilities
│ ├── stdafx.h
│ ├── xml.cpp
│ ├── FileSystem.h
│ ├── FileSystem.cpp
│ ├── CommonMethod.cpp
│ ├── packages.config
│ ├── Clipboard.h
│ ├── stdafx.cpp
│ ├── targetver.h
│ ├── CommonMethod.h
│ ├── Clipboard.cpp
│ ├── macros.h
│ ├── StringHelper.h
│ └── Utilities.vcxproj.filters
├── Client
│ ├── DataHelper.cpp
│ ├── packages.config
│ ├── stdafx.cpp
│ ├── targetver.h
│ ├── stdafx.h
│ ├── Client.vcxproj.filters
│ └── DataHelper.h
├── Implement
│ ├── Implement.rc
│ ├── README.md
│ ├── ProcessorImpl.cpp
│ ├── packages.config
│ ├── resource.h
│ ├── TypeManager.h
│ ├── LogImpl.h
│ ├── details
│ │ └── variableShared.h
│ ├── YapImplement.h
│ ├── CompositeProcessor.h
│ ├── VariableSpace.h
│ ├── PythonUserImpl.cpp
│ ├── LogUserImpl.h
│ ├── PythonUserImpl.h
│ └── LogUserImpl.cpp
└── PythonImplement
│ ├── PythonImpl.cpp
│ ├── packages.config
│ ├── PythonImpl.h
│ ├── dllmain.cpp
│ ├── PythonImplement.vcxproj.filters
│ └── ReadMe.txt
├── README.md
├── BasicRecon_GPU
├── BasicRecon_GPU.cpp
├── stdafx.cpp
├── targetver.h
├── cuFft2D.h
├── stdafx.h
├── dllmain.cpp
├── cuFft2D.cpp
├── BasicRecon_GPU.vcxproj.filters
└── ReadMe.txt
├── PluginSdk
└── BasicRecon
│ ├── DcRemover.h
│ └── SamplingMaskCreator.h
└── LICENSE
/PluginSDK/PythonRecon/Python/ExtractFeatures.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/API/PipelineTest/daub2.flt:
--------------------------------------------------------------------------------
1 | 0.482962913145 0.836516303738 0.224143868042 -0.129409522551
--------------------------------------------------------------------------------
/Pipelines - 快捷方式.lnk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MR-algorithms/YAP/HEAD/Pipelines - 快捷方式.lnk
--------------------------------------------------------------------------------
/GrappaRecon/Grappa.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MR-algorithms/YAP/HEAD/GrappaRecon/Grappa.cpp
--------------------------------------------------------------------------------
/Shared/Interface/IData.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MR-algorithms/YAP/HEAD/Shared/Interface/IData.h
--------------------------------------------------------------------------------
/Shared/Utilities/stdafx.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MR-algorithms/YAP/HEAD/Shared/Utilities/stdafx.h
--------------------------------------------------------------------------------
/Shared/Utilities/xml.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MR-algorithms/YAP/HEAD/Shared/Utilities/xml.cpp
--------------------------------------------------------------------------------
/API/Yap/ScanFileParser.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MR-algorithms/YAP/HEAD/API/Yap/ScanFileParser.cpp
--------------------------------------------------------------------------------
/API/UnitTests/VdfUnitTests.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MR-algorithms/YAP/HEAD/API/UnitTests/VdfUnitTests.cpp
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/Fft2D.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MR-algorithms/YAP/HEAD/PluginSDK/BasicRecon/Fft2D.cpp
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/IcePeFt.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MR-algorithms/YAP/HEAD/PluginSDK/BasicRecon/IcePeFt.h
--------------------------------------------------------------------------------
/Shared/Client/DataHelper.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MR-algorithms/YAP/HEAD/Shared/Client/DataHelper.cpp
--------------------------------------------------------------------------------
/Shared/Implement/Implement.rc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MR-algorithms/YAP/HEAD/Shared/Implement/Implement.rc
--------------------------------------------------------------------------------
/Shared/Implement/README.md:
--------------------------------------------------------------------------------
1 | # YAP
2 | Yet Another Pipeline for medical image reconstruction and processing.
3 |
--------------------------------------------------------------------------------
/Shared/Utilities/FileSystem.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MR-algorithms/YAP/HEAD/Shared/Utilities/FileSystem.h
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/FineCF.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MR-algorithms/YAP/HEAD/PluginSDK/BasicRecon/FineCF.cpp
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/IcePeFt.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MR-algorithms/YAP/HEAD/PluginSDK/BasicRecon/IcePeFt.cpp
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # YAP
2 | Yet Another Pipeline for medical image reconstruction and processing.
3 | 本项目为Yap主代码,路径名为Yap2.
4 |
--------------------------------------------------------------------------------
/Shared/Utilities/FileSystem.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MR-algorithms/YAP/HEAD/Shared/Utilities/FileSystem.cpp
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/SimpleGrid.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MR-algorithms/YAP/HEAD/PluginSDK/BasicRecon/SimpleGrid.cpp
--------------------------------------------------------------------------------
/PluginSDK/PythonRecon/NiiReader.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MR-algorithms/YAP/HEAD/PluginSDK/PythonRecon/NiiReader.cpp
--------------------------------------------------------------------------------
/Shared/Implement/ProcessorImpl.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MR-algorithms/YAP/HEAD/Shared/Implement/ProcessorImpl.cpp
--------------------------------------------------------------------------------
/Shared/Utilities/CommonMethod.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MR-algorithms/YAP/HEAD/Shared/Utilities/CommonMethod.cpp
--------------------------------------------------------------------------------
/Shared/PythonImplement/PythonImpl.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MR-algorithms/YAP/HEAD/Shared/PythonImplement/PythonImpl.cpp
--------------------------------------------------------------------------------
/API/UnitTests/ScanFileParserUnitTest.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MR-algorithms/YAP/HEAD/API/UnitTests/ScanFileParserUnitTest.cpp
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/DeOversampling.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MR-algorithms/YAP/HEAD/PluginSDK/BasicRecon/DeOversampling.cpp
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/DrawlineOnImage.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MR-algorithms/YAP/HEAD/PluginSDK/BasicRecon/DrawlineOnImage.cpp
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/RadialSampling.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MR-algorithms/YAP/HEAD/PluginSDK/BasicRecon/RadialSampling.cpp
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/SliceSelector.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MR-algorithms/YAP/HEAD/PluginSDK/BasicRecon/SliceSelector.cpp
--------------------------------------------------------------------------------
/PluginSDK/PythonRecon/FileIterator.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MR-algorithms/YAP/HEAD/PluginSDK/PythonRecon/FileIterator.cpp
--------------------------------------------------------------------------------
/PluginSDK/PythonRecon/FolderIterator.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MR-algorithms/YAP/HEAD/PluginSDK/PythonRecon/FolderIterator.cpp
--------------------------------------------------------------------------------
/PluginSDK/PythonRecon/ExtractFeatures.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MR-algorithms/YAP/HEAD/PluginSDK/PythonRecon/ExtractFeatures.cpp
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/SampleDataProtocol.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MR-algorithms/YAP/HEAD/PluginSDK/BasicRecon/SampleDataProtocol.cpp
--------------------------------------------------------------------------------
/PluginSDK/PythonRecon/RFeaturesCollector.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MR-algorithms/YAP/HEAD/PluginSDK/PythonRecon/RFeaturesCollector.cpp
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/ChanneIImageDataCollector.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MR-algorithms/YAP/HEAD/PluginSDK/BasicRecon/ChanneIImageDataCollector.cpp
--------------------------------------------------------------------------------
/BasicRecon_GPU/BasicRecon_GPU.cpp:
--------------------------------------------------------------------------------
1 | // BasicRecon_GPU.cpp : Defines the entry point for the console application.
2 | //
3 |
4 | #include "stdafx.h"
5 |
6 |
7 |
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/BasicRecon.cpp:
--------------------------------------------------------------------------------
1 | // BasicRecon.cpp : Defines the exported functions for the DLL application.
2 | //
3 |
4 | #include "stdafx.h"
5 |
6 |
7 |
--------------------------------------------------------------------------------
/PluginSDK/PythonRecon/PythonRecon.cpp:
--------------------------------------------------------------------------------
1 | // PythonRecon.cpp : Defines the exported functions for the DLL application.
2 | //
3 |
4 | #include "stdafx.h"
5 |
6 |
7 |
--------------------------------------------------------------------------------
/PluginSDK/PythonRecon/Python/my_utility/__init__.py:
--------------------------------------------------------------------------------
1 | # init start utility
2 | print('my_utility starting...')
3 |
4 |
5 | # end
6 | print('my_utility start success!')
7 |
--------------------------------------------------------------------------------
/API/Yap/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/API/PipelineTest/Pipelines/NiumagFidWriter.pipeline:
--------------------------------------------------------------------------------
1 | import "BasicRecon.dll";
2 |
3 | NiumagFidWriter writer(ExportFolder = "d:\\Output");
4 | NiumagFidReader reader(DataPath = "D:\\test_data\\UU.img.fid");
5 |
6 | reader->writer;
7 |
8 | self.Input->reader.Input;
9 |
--------------------------------------------------------------------------------
/API/UnitTests/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Shared/Client/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/API/PipelineTest/Pipelines/NiumagImgReader.pipeline:
--------------------------------------------------------------------------------
1 | import "BasicRecon.dll";
2 |
3 | NiumagImgReader reader(DataPath = "D:\\test_data\\1.img");
4 | JpegExporter jpeg_exporter(ExportFolder = "d:\\Output");
5 |
6 | reader->jpeg_exporter;
7 |
8 | self.Input->reader.Input;
9 |
--------------------------------------------------------------------------------
/API/PipelineTest/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Shared/Implement/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Shared/Interface/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Shared/Utilities/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/API/PipelineTest/Pipelines/NiuMriImageReader.pipeline:
--------------------------------------------------------------------------------
1 | import "BasicRecon.dll";
2 |
3 | NiuMriImageReader reader(DataPath = "D:\\Output\\2.niuimg");
4 | JpegExporter jpeg_exporter(ExportFolder = "d:\\Output");
5 |
6 | reader->jpeg_exporter;
7 |
8 | self.Input->reader.Input;
9 |
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/PluginSDK/PythonRecon/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Shared/PythonImplement/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Shared/PythonImplement/PythonImpl.h:
--------------------------------------------------------------------------------
1 | #ifndef PythonImpl_H_20171020
2 | #define PythonImpl_H_20171020
3 |
4 | #pragma once
5 | #include "Interface\IPython.h"
6 |
7 | // struct IPython;
8 |
9 | namespace Yap
10 | {
11 | class PythonFactory
12 | {
13 | public:
14 | static IPython* GetPython();
15 | };
16 | }
17 | #endif
--------------------------------------------------------------------------------
/GrappaRecon/stdafx.cpp:
--------------------------------------------------------------------------------
1 | // stdafx.cpp : source file that includes just the standard includes
2 | // BasicRecon.pch will be the pre-compiled header
3 | // stdafx.obj will contain the pre-compiled type information
4 |
5 | #include "stdafx.h"
6 |
7 | // TODO: reference any additional headers you need in STDAFX.H
8 | // and not in this file
9 |
--------------------------------------------------------------------------------
/Shared/Client/stdafx.cpp:
--------------------------------------------------------------------------------
1 | // stdafx.cpp : source file that includes just the standard includes
2 | // Client.pch will be the pre-compiled header
3 | // stdafx.obj will contain the pre-compiled type information
4 |
5 | #include "stdafx.h"
6 |
7 | // TODO: reference any additional headers you need in STDAFX.H
8 | // and not in this file
9 |
--------------------------------------------------------------------------------
/Shared/Interface/Interfaces.h:
--------------------------------------------------------------------------------
1 | #ifndef Interface_h__20160825
2 | #define Interface_h__20160825
3 |
4 | #include "idata.h"
5 | #include "IVariable.h"
6 | #include "smartptr.h"
7 | #include "IProcessor.h"
8 | #include "ILog.h"
9 | #include "IPythonUser.h"
10 | #include "IPython.h"
11 |
12 | #endif // Interface_h__20160825
13 |
--------------------------------------------------------------------------------
/API/PipelineTest/stdafx.cpp:
--------------------------------------------------------------------------------
1 | // stdafx.cpp : source file that includes just the standard includes
2 | // PipelineTest.pch will be the pre-compiled header
3 | // stdafx.obj will contain the pre-compiled type information
4 |
5 | #include "stdafx.h"
6 |
7 | // TODO: reference any additional headers you need in STDAFX.H
8 | // and not in this file
9 |
--------------------------------------------------------------------------------
/API/UnitTests/stdafx.cpp:
--------------------------------------------------------------------------------
1 | // stdafx.cpp : source file that includes just the standard includes
2 | // PipelineUnitTests.pch will be the pre-compiled header
3 | // stdafx.obj will contain the pre-compiled type information
4 |
5 | #include "stdafx.h"
6 |
7 | // TODO: reference any additional headers you need in STDAFX.H
8 | // and not in this file
9 |
--------------------------------------------------------------------------------
/BasicRecon_GPU/stdafx.cpp:
--------------------------------------------------------------------------------
1 | // stdafx.cpp : source file that includes just the standard includes
2 | // BasicRecon_GPU.pch will be the pre-compiled header
3 | // stdafx.obj will contain the pre-compiled type information
4 |
5 | #include "stdafx.h"
6 |
7 | // TODO: reference any additional headers you need in STDAFX.H
8 | // and not in this file
9 |
--------------------------------------------------------------------------------
/PluginSDK/PythonRecon/stdafx.cpp:
--------------------------------------------------------------------------------
1 | // stdafx.cpp : source file that includes just the standard includes
2 | // BasicRecon.pch will be the pre-compiled header
3 | // stdafx.obj will contain the pre-compiled type information
4 |
5 | #include "stdafx.h"
6 |
7 | // TODO: reference any additional headers you need in STDAFX.H
8 | // and not in this file
9 |
--------------------------------------------------------------------------------
/API/PipelineTest/Pipelines/NiumagImgWriterReader.pipeline:
--------------------------------------------------------------------------------
1 | import "BasicRecon.dll";
2 |
3 | NiumagImgReader reader(DataPath = "D:\\Output\\1.img");
4 | JpegExporter jpeg_exporter(ExportFolder = "d:\\Output");
5 | SliceIterator slice_iterator;
6 |
7 | reader->slice_iterator;
8 | slice_iterator->jpeg_exporter;
9 |
10 | self.Input->reader.Input;
11 |
--------------------------------------------------------------------------------
/API/UnitTests/targetver.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | // Including SDKDDKVer.h defines the highest available Windows platform.
4 |
5 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
6 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
7 |
8 | #include
9 |
--------------------------------------------------------------------------------
/GrappaRecon/targetver.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | // Including SDKDDKVer.h defines the highest available Windows platform.
4 |
5 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
6 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
7 |
8 | #include
9 |
--------------------------------------------------------------------------------
/Shared/Client/targetver.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | // Including SDKDDKVer.h defines the highest available Windows platform.
4 |
5 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
6 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
7 |
8 | #include
9 |
--------------------------------------------------------------------------------
/API/PipelineTest/targetver.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | // Including SDKDDKVer.h defines the highest available Windows platform.
4 |
5 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
6 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
7 |
8 | #include
9 |
--------------------------------------------------------------------------------
/BasicRecon_GPU/targetver.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | // Including SDKDDKVer.h defines the highest available Windows platform.
4 |
5 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
6 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
7 |
8 | #include
9 |
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/stdafx.cpp:
--------------------------------------------------------------------------------
1 | // stdafx.cpp : source file that includes just the standard includes
2 | // BasicRecon.pch will be the pre-compiled header
3 | // stdafx.obj will contain the pre-compiled type information
4 |
5 | #include "stdafx.h"
6 |
7 |
8 | // TODO: reference any additional headers you need in STDAFX.H
9 | // and not in this file
10 |
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/targetver.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | // Including SDKDDKVer.h defines the highest available Windows platform.
4 |
5 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
6 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
7 |
8 | #include
9 |
--------------------------------------------------------------------------------
/PluginSDK/PythonRecon/targetver.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | // Including SDKDDKVer.h defines the highest available Windows platform.
4 |
5 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
6 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
7 |
8 | #include
9 |
10 |
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/SliceMerger.cpp.rej:
--------------------------------------------------------------------------------
1 | diff a/PluginSDK/BasicRecon/SliceMerger.cpp b/PluginSDK/BasicRecon/SliceMerger.cpp (rejected hunks)
2 | @@ -0,6 +0,7 @@
3 | AddInput(L"Input", 2, DataTypeAll);
4 | AddOutput(L"Output", 3, DataTypeAll);
5 |
6 | + AddProperty(PropertyInt, L"SliceCount", L"Slice count.");
7 | }
8 |
9 | SliceMerger::SliceMerger(const SliceMerger& rhs)
10 |
--------------------------------------------------------------------------------
/API/UnitTests/stdafx.h:
--------------------------------------------------------------------------------
1 | // stdafx.h : include file for standard system include files,
2 | // or project specific include files that are used frequently, but
3 | // are changed infrequently
4 | //
5 |
6 | #pragma once
7 |
8 | #include "targetver.h"
9 |
10 | #include
11 | #include
12 |
13 |
14 |
15 | // TODO: reference additional headers your program requires here
16 |
--------------------------------------------------------------------------------
/API/PipelineTest/Pipelines/FineCF.pipeline:
--------------------------------------------------------------------------------
1 | import "BasicRecon.dll";
2 |
3 | NiumagFidReader reader(DataPath = "D:\\Projects\\Data\\FineCF_fid\\lwj.fid");
4 | Fft1D fft;
5 | ModulePhase module_phase;
6 | FineCF fine_cf(O1 = 21290, SW = 100);
7 |
8 | fine_cf.CF ==> SFO1;
9 |
10 | reader->fft;
11 | fft->module_phase;
12 | module_phase.Module->fine_cf;
13 |
14 | self.Input->reader.Input;
15 |
16 |
--------------------------------------------------------------------------------
/API/PipelineTest/ProcessorDebugger.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Interface/Interfaces.h"
4 |
5 | namespace Yap
6 | {
7 | class YapDebugger
8 | {
9 | public:
10 | void DebugPort(IPortIter& ports);
11 |
12 | void DebugOutput(IProcessor& processor);
13 |
14 | bool DebugProperties(IVariableIter& properties);
15 |
16 | bool DebugPlugin(const wchar_t * path);
17 |
18 | };
19 | }
20 |
21 |
--------------------------------------------------------------------------------
/API/PipelineTest/stdafx.h:
--------------------------------------------------------------------------------
1 | // stdafx.h : include file for standard system include files,
2 | // or project specific include files that are used frequently, but
3 | // are changed infrequently
4 | //
5 |
6 | #pragma once
7 |
8 | #include "targetver.h"
9 |
10 | #include
11 | #include
12 |
13 | #include
14 |
15 | // TODO: reference additional headers your program requires here
16 |
--------------------------------------------------------------------------------
/BasicRecon_GPU/cuFft2D.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "Implement\ProcessorImpl.h"
3 |
4 | namespace Yap
5 | {
6 | class cuFft2D :
7 | public ProcessorImpl
8 | {
9 | IMPLEMENT_SHARED(cuFft2D)
10 | public:
11 | cuFft2D();
12 | virtual ~cuFft2D();
13 |
14 | //virtual IProcessor * Clone() override;
15 |
16 | virtual bool Input(const wchar_t * name, IData * data) override;
17 |
18 | };
19 | }
20 |
21 |
22 |
--------------------------------------------------------------------------------
/API/PipelineTest/Pipelines/ImgPythonShow.pipeline:
--------------------------------------------------------------------------------
1 | import "BasicRecon.dll";
2 |
3 | NiumagImgReader reader(DataPath = "D:\\Output\\1.img");
4 | Python2DUSUS pyUSimshow(ScriptPath =
5 | "D:\\Projects\\YAP\\PluginSDK\\BasicRecon\\Python\\example.py",
6 | MethodName = "ShowImage");
7 | SliceIterator slice_iterator;
8 |
9 | reader->slice_iterator;
10 | slice_iterator->pyUSimshow;
11 |
12 | self.Input->reader.Input;
13 |
--------------------------------------------------------------------------------
/Shared/Client/stdafx.h:
--------------------------------------------------------------------------------
1 | // stdafx.h : include file for standard system include files,
2 | // or project specific include files that are used frequently, but
3 | // are changed infrequently
4 | //
5 |
6 | #pragma once
7 |
8 | #include "targetver.h"
9 |
10 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
11 |
12 |
13 |
14 | // TODO: reference additional headers your program requires here
15 |
--------------------------------------------------------------------------------
/API/PipelineTest/Pipelines/demoNiiReader.pipeline:
--------------------------------------------------------------------------------
1 | import "BasicRecon.dll";
2 |
3 | NiiReader ref_reader(FilePath = "D:\\data\\test_data\\Brats17_2013_11_1_t1ce.nii");
4 | SliceSelector selector(SliceIndex = 40);
5 | DataTypeConvertor convertor;
6 | JpegExporter jpeg_exporter(ExportFolder = "d:\\Output");
7 |
8 | ref_reader->selector;
9 | selector->convertor;
10 | convertor.UnsignedShort->jpeg_exporter;
11 |
12 | self.Input->ref_reader.Input;
--------------------------------------------------------------------------------
/API/PipelineTest/YapDebugger.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Interface/IProperty.h"
4 | #include "Interface/IProcessor.h"
5 |
6 | namespace Yap
7 | {
8 | class CProcessorDebugger
9 | {
10 | public:
11 | void DebugPort(IPortIter& ports);
12 |
13 | void DebugOutput(IProcessor& processor);
14 |
15 | bool DebugProperties(IPropertyIter& properties);
16 |
17 | bool DebugPlugin(const wchar_t * path);
18 |
19 | };
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/ChannelIterator.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "Implement/ProcessorImpl.h"
3 | namespace Yap
4 | {
5 | class ChannelIterator :
6 | public ProcessorImpl
7 | {
8 | IMPLEMENT_SHARED(ChannelIterator)
9 | public:
10 | ChannelIterator();
11 | ChannelIterator(const ChannelIterator& rhs);
12 |
13 | protected:
14 | ~ChannelIterator();
15 |
16 | virtual bool Input(const wchar_t * name, IData * data) override;
17 | };
18 | }
19 |
20 |
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/Flip.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #ifndef Flip_h__20160814
4 | #define Flip_h__20160814
5 |
6 | #include "Implement/ProcessorImpl.h"
7 |
8 | namespace Yap
9 | {
10 | class Flip :
11 | public ProcessorImpl
12 | {
13 | IMPLEMENT_SHARED(Flip)
14 | public:
15 | Flip();
16 | Flip(const Flip& rhs);
17 |
18 | protected:
19 | ~Flip();
20 | virtual bool Input(const wchar_t * port, IData * data) override;
21 |
22 | };
23 | }
24 | #endif // Flip_h__
25 |
--------------------------------------------------------------------------------
/Shared/Implement/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by Implement.rc
4 |
5 | // Next default values for new objects
6 | //
7 | #ifdef APSTUDIO_INVOKED
8 | #ifndef APSTUDIO_READONLY_SYMBOLS
9 | #define _APS_NEXT_RESOURCE_VALUE 101
10 | #define _APS_NEXT_COMMAND_VALUE 40001
11 | #define _APS_NEXT_CONTROL_VALUE 1001
12 | #define _APS_NEXT_SYMED_VALUE 101
13 | #endif
14 | #endif
15 |
--------------------------------------------------------------------------------
/GrappaRecon/stdafx.h:
--------------------------------------------------------------------------------
1 | // stdafx.h : include file for standard system include files,
2 | // or project specific include files that are used frequently, but
3 | // are changed infrequently
4 | //
5 |
6 | #pragma once
7 | #define NOMINMAX
8 | #include "targetver.h"
9 |
10 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
11 | // Windows Header Files:
12 |
13 |
14 | #include
15 |
16 | // TODO: reference additional headers your program requires here
17 |
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/stdafx.h:
--------------------------------------------------------------------------------
1 | // stdafx.h : include file for standard system include files,
2 | // or project specific include files that are used frequently, but
3 | // are changed infrequently
4 | //
5 |
6 | #pragma once
7 | #define NOMINMAX
8 | #include "targetver.h"
9 |
10 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
11 | // Windows Header Files:
12 |
13 |
14 | #include
15 |
16 | // TODO: reference additional headers your program requires here
17 |
--------------------------------------------------------------------------------
/BasicRecon_GPU/stdafx.h:
--------------------------------------------------------------------------------
1 | // stdafx.h : include file for standard system include files,
2 | // or project specific include files that are used frequently, but
3 | // are changed infrequently
4 | //
5 |
6 | #pragma once
7 |
8 | #define NOMINMAX
9 | #include "targetver.h"
10 |
11 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
12 | // Windows Header Files:
13 |
14 |
15 | #include
16 |
17 | // TODO: reference additional headers your program requires here
18 |
19 |
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/FineCF.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "Implement\ProcessorImpl.h"
3 | #include "Interface\smartptr.h"
4 |
5 | namespace Yap
6 | {
7 | class FineCF :
8 | public ProcessorImpl
9 | {
10 | IMPLEMENT_SHARED(FineCF)
11 | public:
12 | FineCF();
13 | FineCF(const FineCF& rhs);
14 |
15 | protected:
16 | ~FineCF();
17 |
18 | virtual bool Input(const wchar_t * port, IData * data) override;
19 |
20 | // property input O1, SW
21 | // property output CF;
22 | private:
23 | };
24 |
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/PluginSDK/PythonRecon/stdafx.h:
--------------------------------------------------------------------------------
1 | // stdafx.h : include file for standard system include files,
2 | // or project specific include files that are used frequently, but
3 | // are changed infrequently
4 | //
5 |
6 | #pragma once
7 | #define NOMINMAX
8 |
9 | #include "targetver.h"
10 |
11 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
12 | // Windows Header Files:
13 |
14 |
15 |
16 | #include
17 |
18 | // TODO: reference additional headers your program requires here
19 |
--------------------------------------------------------------------------------
/PluginSdk/BasicRecon/DcRemover.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #ifndef RemoveDC_h__20160814
4 | #define RemoveDC_h__20160814
5 |
6 | #include "Implement/ProcessorImpl.h"
7 |
8 | namespace Yap
9 | {
10 | class DcRemover :
11 | public ProcessorImpl
12 | {
13 | IMPLEMENT_SHARED(DcRemover)
14 | public:
15 | DcRemover();
16 | DcRemover(const DcRemover& rhs);
17 |
18 | protected:
19 | ~DcRemover();
20 |
21 | virtual bool Input(const wchar_t * port, IData * data) override;
22 | };
23 | }
24 |
25 | #endif // RemoveDC_h__
26 |
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/imageProcessing.h:
--------------------------------------------------------------------------------
1 | #ifndef imageProcessing_h__20160814
2 | #define imageProcessing_h__20160814
3 |
4 | #pragma once
5 |
6 | template
7 | void hflip(T * image, size_t width, size_t height)
8 | {
9 | T temp;
10 | for (size_t row = 0; row < height; ++row)
11 | {
12 | T * begin = image + width * row;
13 | T * end = image + width * (row + 1) - 1;
14 | while (begin < end)
15 | {
16 | temp = *begin;
17 | *begin++ = *end;
18 | *end-- = temp;
19 | }
20 | }
21 | }
22 | #endif // imageProcessing_h__
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/CalcuArea.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef CALCEAREA_h__20170526
3 | #define CALCEAREA_h__20170526
4 |
5 | #include "Implement\ProcessorImpl.h"
6 |
7 | namespace Yap
8 | {
9 | class CalcuArea :
10 | public ProcessorImpl
11 | {
12 | IMPLEMENT_SHARED(CalcuArea)
13 | public:
14 | CalcuArea();
15 | CalcuArea(const CalcuArea& rhs);
16 |
17 | private:
18 | virtual ~CalcuArea();
19 |
20 | virtual bool Input(const wchar_t * name, IData * data) override;
21 | };
22 |
23 | }
24 | #endif CALCEAREA_h__
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/LinesSelector.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #ifndef LINESSELECTOR_H_20171031
4 | #define LINESSELECTOR_H_20171031
5 |
6 | #include "Implement\ProcessorImpl.h"
7 |
8 | namespace Yap
9 | {
10 | class LinesSelector :
11 | public ProcessorImpl
12 | {
13 | IMPLEMENT_SHARED(LinesSelector)
14 | public:
15 | LinesSelector();
16 | LinesSelector(const LinesSelector& rhs);
17 |
18 | protected:
19 | virtual ~LinesSelector();
20 | virtual bool Input(const wchar_t * name, IData * data) override;
21 | };
22 | }
23 |
24 |
25 | #endif // !LINESSELECTOR_H_
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/SliceIterator.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef SliceIterator_h__20160814
3 | #define SliceIterator_h__20160814
4 |
5 | #include "Implement/ProcessorImpl.h"
6 |
7 | namespace Yap
8 | {
9 | class SliceIterator :
10 | public ProcessorImpl
11 | {
12 | IMPLEMENT_SHARED(SliceIterator)
13 | public:
14 | SliceIterator(void);
15 | SliceIterator(const SliceIterator& rhs);
16 |
17 | protected:
18 | ~SliceIterator(void);
19 |
20 | virtual bool Input(const wchar_t * name, IData * data) override;
21 |
22 | };
23 | }
24 | #endif // SliceIterator_h__
25 |
--------------------------------------------------------------------------------
/API/PipelineTest/Pipelines/demoRadiomics.pipeline:
--------------------------------------------------------------------------------
1 | import "BasicRecon.dll";
2 |
3 | NiiReader img_reader(FilePath = "D:\\test_data\\Brats17_2013_11_1_t1ce.nii");
4 | Radiomics radiomicshandle(ScriptPath =
5 | "D:\\Projects\\Demo_Cplus_extend_python\\PythonScripts\\Py2C.py",
6 | MethodName = "test2d", ReturnDataType = 8);
7 | SliceSelector selector(SliceIndex = 40);
8 | JpegExporter jpeg_exporter(ExportFolder = "d:\\Output");
9 |
10 | img_reader->selector;
11 | selector->radiomicshandle.Input;
12 | radiomicshandle->jpeg_exporter;
13 |
14 | self.Input->img_reader.Input;
15 |
16 |
17 |
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/Difference.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #ifndef Difference_h__20160816
4 | #define Difference_h__20160816
5 |
6 | #include "Implement/ProcessorImpl.h"
7 |
8 | namespace Yap
9 | {
10 | class Difference :
11 | public ProcessorImpl
12 | {
13 | IMPLEMENT_SHARED(Difference)
14 | public:
15 | Difference();
16 | Difference(const Difference& rhs);
17 |
18 | protected:
19 | ~Difference();
20 |
21 | virtual bool Input(const wchar_t * port, IData * data) override;
22 |
23 | SmartPtr _reference_data;
24 | };
25 | }
26 |
27 | #endif // Difference_h__
28 |
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/SliceSelector.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #ifndef SliceSelector_h__20160814
4 | #define SliceSelector_h__20160814
5 |
6 | #include "Implement/ProcessorImpl.h"
7 |
8 | namespace Yap
9 | {
10 | class SliceSelector :
11 | public ProcessorImpl
12 | {
13 | IMPLEMENT_SHARED(SliceSelector)
14 | public:
15 | SliceSelector(void);
16 | SliceSelector(const SliceSelector& rhs);
17 |
18 | protected:
19 | ~SliceSelector();
20 |
21 | virtual bool Input(const wchar_t * name, IData * data) override;
22 |
23 |
24 | };
25 | }
26 | #endif // SliceSelector_h__
27 |
28 |
29 |
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/ModulePhase.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #ifndef ModulePhase_h__20160814
4 | #define ModulePhase_h__20160814
5 |
6 | #include "Implement/ProcessorImpl.h"
7 |
8 | namespace Yap
9 | {
10 | class ModulePhase :
11 | public ProcessorImpl
12 | {
13 | IMPLEMENT_SHARED(ModulePhase)
14 | public:
15 | ModulePhase(void);
16 | ModulePhase(const ModulePhase& rhs);
17 |
18 | protected:
19 | ~ModulePhase();
20 |
21 | virtual bool Input(const wchar_t * port, IData * data) override;
22 | void TestChannelOnSlice(IData *output);
23 | };
24 | }
25 | #endif // ModulePhase_h__
26 |
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/SliceMerger.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #ifndef SliceMerger_h__20161221
4 | #define SliceMerger_h__20161221
5 |
6 | #include "Implement/ProcessorImpl.h"
7 | namespace Yap
8 | {
9 | class SliceMerger:
10 | public ProcessorImpl
11 | {
12 | IMPLEMENT_SHARED(SliceMerger)
13 | public:
14 | SliceMerger(void);
15 | SliceMerger(const SliceMerger& rhs);
16 |
17 | protected:
18 | ~SliceMerger();
19 |
20 | virtual bool Input(const wchar_t * port, IData * data) override;
21 |
22 | SmartPtr _data;
23 | };
24 | }
25 | #endif // SliceMerger_h__
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/ChannelSelector.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #ifndef ChannelSelector_h__20160814
4 | #define ChannelSelector_h__20160814
5 |
6 | #include "Implement/ProcessorImpl.h"
7 |
8 | namespace Yap
9 | {
10 | class ChannelSelector :
11 | public ProcessorImpl
12 | {
13 | IMPLEMENT_SHARED(ChannelSelector)
14 | public:
15 | ChannelSelector(void);
16 | ChannelSelector(const ChannelSelector& rhs);
17 |
18 | protected:
19 | ~ChannelSelector();
20 |
21 | virtual bool Input(const wchar_t * name, IData * data) override;
22 |
23 |
24 | };
25 | }
26 | #endif // ChannelSelector_h__
27 |
28 |
29 |
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/GrayScaleUnifier.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #ifndef GRAYSCALEUNIFIER_H_20171102
4 | #define GRAYSCALEUNIFIER_H_20171102
5 |
6 | #include "Implement\ProcessorImpl.h"
7 |
8 | namespace Yap
9 | {
10 | class GrayScaleUnifier :
11 | public ProcessorImpl
12 | {
13 | IMPLEMENT_SHARED(GrayScaleUnifier)
14 | public:
15 | GrayScaleUnifier();
16 | GrayScaleUnifier(const GrayScaleUnifier& rhs);
17 |
18 | protected:
19 | ~GrayScaleUnifier();
20 | virtual bool Input(const wchar_t * name, IData * data) override;
21 |
22 | };
23 | }
24 | #endif // !GRAYSCALEUNIFIER_H_
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/NiumagPFFTConjugator.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #ifndef CONJUGATOR_H_20171101
4 | #define CONJUGATOR_H_20171101
5 |
6 | #include "Implement\ProcessorImpl.h"
7 |
8 | namespace Yap
9 | {
10 | class NiumagPFFTConjugator :
11 | public ProcessorImpl
12 | {
13 | IMPLEMENT_SHARED(NiumagPFFTConjugator)
14 | public:
15 | NiumagPFFTConjugator();
16 | NiumagPFFTConjugator(const NiumagPFFTConjugator& rhs);
17 |
18 | protected:
19 | ~NiumagPFFTConjugator();
20 | virtual bool Input(const wchar_t * name, IData * data) override;
21 | };
22 | }
23 | #endif // !CONJUGATOR_H_
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/API/PipelineTest/Pipelines/NiumagFidWriterReader.pipeline:
--------------------------------------------------------------------------------
1 | import "BasicRecon.dll";
2 |
3 | NiumagFidReader reader(DataPath = "D:\\Output\\1.img.fid");
4 | JpegExporter jpeg_exporter(ExportFolder = "d:\\Output");
5 | SliceIterator slice_iterator;
6 | ModulePhase module_phase;
7 | Fft2D fft;
8 | RemoveDC dc_remover;
9 | ZeroFilling zero_filling(DestWidth = 1024, DestHeight = 1024);
10 | HFlipFloat hflip;
11 |
12 | reader->slice_iterator;
13 | slice_iterator->dc_remover;
14 | dc_remover->zero_filling;
15 | zero_filling->fft;
16 | fft->module_phase;
17 | module_phase.Module->jpeg_exporter;
18 |
19 | self.Input->reader.Input;
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/PhaseCorrector.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #ifndef PHASECORRECTOR_H_20171101
4 | #define PHASECORRECTOR_H_20171101
5 |
6 | #include "Implement\ProcessorImpl.h"
7 |
8 | namespace Yap
9 | {
10 | class PhaseCorrector :
11 | public ProcessorImpl
12 | {
13 | IMPLEMENT_SHARED(PhaseCorrector)
14 | public:
15 | PhaseCorrector();
16 | PhaseCorrector(const PhaseCorrector& rhs);
17 |
18 | protected:
19 | ~PhaseCorrector();
20 | virtual bool Input(const wchar_t * name, IData * data) override;
21 |
22 | SmartPtr _phase;
23 | };
24 |
25 | }
26 | #endif // !PHASECORRECTOR_H_
27 |
28 |
29 |
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/SubSampling.h:
--------------------------------------------------------------------------------
1 |
2 | #include "Implement/ProcessorImpl.h"
3 |
4 | namespace Yap
5 | {
6 | class SubSampling :
7 | public ProcessorImpl
8 | {
9 | IMPLEMENT_SHARED(SubSampling)
10 | public:
11 | SubSampling();
12 | SubSampling(const SubSampling& rhs);
13 |
14 | protected:
15 | ~SubSampling();
16 |
17 | virtual bool Input(const wchar_t * port, IData * data) override;
18 |
19 | void GetSubSampledData(std::complex * input_data, float * mask, std::complex * output_data, unsigned int width, unsigned int height);
20 |
21 | private:
22 | SmartPtr _mask;
23 |
24 | };
25 | }
--------------------------------------------------------------------------------
/API/PipelineTest/Pipelines/NiumagFidReader.pipeline:
--------------------------------------------------------------------------------
1 | import "BasicRecon.dll";
2 |
3 | NiumagFidReader reader(DataPath = "D:\\test_data\\UU.img.fid");
4 | JpegExporter jpeg_exporter(ExportFolder = "d:\\Output");
5 | SliceIterator slice_iterator;
6 | ModulePhase module_phase;
7 | Fft2D fft;
8 | RemoveDC dc_remover;
9 | ZeroFilling zero_filling(DestWidth = 1024, DestHeight = 1024);
10 | HFlipFloat hflip;
11 |
12 | reader->slice_iterator;
13 | slice_iterator->dc_remover;
14 | dc_remover->zero_filling;
15 | zero_filling->fft;
16 | fft->module_phase;
17 | module_phase.Module->jpeg_exporter;
18 |
19 | self.Input->reader.Input;
20 |
21 |
--------------------------------------------------------------------------------
/GrappaRecon/dllmain.cpp:
--------------------------------------------------------------------------------
1 | #include "stdafx.h"
2 | #include "Interface/Implement/ContainerImpl.h"
3 | #include "Interface\Implement\YapImplement.h"
4 | #include "Grappa.h"
5 |
6 |
7 | using namespace Yap;
8 |
9 | BEGIN_DECL_PROCESSORS
10 | ADD_PROCESSOR(Grappa)
11 | END_DECL_PROCESSORS
12 |
13 | BOOL APIENTRY DllMain(HMODULE hModule,
14 | DWORD ul_reason_for_call,
15 | LPVOID lpReserved
16 | )
17 | {
18 | switch (ul_reason_for_call)
19 | {
20 | case DLL_PROCESS_ATTACH:
21 |
22 | break;
23 | case DLL_THREAD_ATTACH:
24 | case DLL_THREAD_DETACH:
25 | case DLL_PROCESS_DETACH:
26 | break;
27 | }
28 | return TRUE;
29 | }
30 |
--------------------------------------------------------------------------------
/PluginSDK/PythonRecon/Python/ReadNiiPathFiles.py:
--------------------------------------------------------------------------------
1 | """
2 | return the names of path included files and the
3 | included-dir files' name.
4 |
5 | """
6 |
7 | import os
8 |
9 |
10 | def walk_dir(paths,topdown=True):
11 | files_name = []
12 | for root, dirs, files in os.walk(paths, topdown):
13 | for name in files:
14 | files_name.append(os.path.join(root,name))
15 | return files_name
16 |
17 |
18 | if __name__ == "__main__":
19 | dir = input('please input the path:')
20 | dir = r'D:\数据\MICCAI_BraTS17_Data_Training_for_TGuo_2017modified\Brats17TrainingData\HGG'
21 | files = walk_dir(dir)
22 |
--------------------------------------------------------------------------------
/BasicRecon_GPU/dllmain.cpp:
--------------------------------------------------------------------------------
1 | #include "stdafx.h"
2 | #include "Interface/Implement/ContainerImpl.h"
3 | #include "Interface\Implement\YapImplement.h"
4 | #include "cuFft2D.h"
5 |
6 |
7 | using namespace Yap;
8 |
9 | BEGIN_DECL_PROCESSORS
10 | ADD_PROCESSOR(cuFft2D)
11 | END_DECL_PROCESSORS
12 |
13 | BOOL APIENTRY DllMain(HMODULE hModule,
14 | DWORD ul_reason_for_call,
15 | LPVOID lpReserved
16 | )
17 | {
18 | switch (ul_reason_for_call)
19 | {
20 | case DLL_PROCESS_ATTACH:
21 |
22 | break;
23 | case DLL_THREAD_ATTACH:
24 | case DLL_THREAD_DETACH:
25 | case DLL_PROCESS_DETACH:
26 | break;
27 | }
28 | return TRUE;
29 | }
30 |
--------------------------------------------------------------------------------
/API/PipelineTest/Pipelines/Test_niumag_recon_yaplocal.pipeline:
--------------------------------------------------------------------------------
1 | import "BasicRecon.dll";
2 |
3 | NiumagFidReader reader(DataPath = "D:\\Projects\\Yap2\\API\\ReconDemo\\data\\UU.img.fid");
4 | SliceIterator slice_iterator;
5 | DcRemover dc_remover;
6 | ZeroFilling zero_filling(DestWidth = 512, DestHeight = 512);
7 | Fft2D fft;
8 | ModulePhase module_phase;
9 | JpegExporter jpeg_exporter(ExportFolder = "D:\\Output\\test_Niuimg\\1");
10 |
11 | reader->slice_iterator;
12 | slice_iterator->dc_remover;
13 | dc_remover->zero_filling;
14 | zero_filling->fft;
15 | fft->module_phase;
16 | module_phase.Module->jpeg_exporter;
17 |
18 |
19 | self.Input->reader.Input;
20 |
--------------------------------------------------------------------------------
/API/PipelineTest/Pipelines/NiuMriImageWriter.pipeline:
--------------------------------------------------------------------------------
1 | import "BasicRecon.dll";
2 |
3 | NiumagFidReader reader(DataPath = "D:\\test_data\\UU.img.fid");
4 | SliceIterator slice_iterator;
5 | RemoveDC dc_remover;
6 | ZeroFilling zero_filling(DestWidth = 1024, DestHeight = 1024);
7 | Fft2D fft;
8 | ModulePhase module_phase;
9 | DataTypeConvertor convertor;
10 | NiuMriImageWriter writer(ExportFolder = "d:\\Output");
11 |
12 | reader->slice_iterator;
13 | slice_iterator->dc_remover;
14 | dc_remover->zero_filling;
15 | zero_filling->fft;
16 | fft->module_phase;
17 | module_phase.Module->convertor;
18 | convertor.UnsignedShort->writer;
19 |
20 | self.Input->reader.Input;
21 |
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/NiumagFidWriter.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef NiumagFidWriter_h__
3 | #define NiumagFidWriter_h__
4 |
5 | #include "Implement/processorImpl.h"
6 |
7 | namespace Yap
8 | {
9 | class NiumagFidWriter :
10 | public ProcessorImpl
11 | {
12 | IMPLEMENT_SHARED(NiumagFidWriter)
13 | public:
14 | NiumagFidWriter(void);
15 | NiumagFidWriter(const NiumagFidWriter& rhs);
16 |
17 | private:
18 | ~NiumagFidWriter();
19 |
20 | virtual bool Input(const wchar_t * name, IData * data) override;
21 | std::wstring GetFilePath(const wchar_t * output_folder, const wchar_t * ouput_name);
22 | };
23 | }
24 |
25 | #endif // NiumagFidWriter_h__
26 |
27 |
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/JpegExporter.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #ifndef JpegExporter_h__20160814
4 | #define JpegExporter_h__20160814
5 |
6 | #include "Implement/ProcessorImpl.h"
7 |
8 | namespace Yap
9 | {
10 | namespace details { class JpegExporterImp; }
11 |
12 | class JpegExporter :
13 | public ProcessorImpl
14 | {
15 | IMPLEMENT_SHARED(JpegExporter)
16 | public:
17 | JpegExporter();
18 | JpegExporter(const JpegExporter& rhs);
19 |
20 | protected:
21 | ~JpegExporter();
22 |
23 | virtual bool Input(const wchar_t * name, IData * data) override;
24 |
25 | std::shared_ptr _impl;
26 | };
27 | }
28 |
29 | #endif // JpegExporter_h__
30 |
--------------------------------------------------------------------------------
/PluginSDK/PythonRecon/FolderCollector.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef FolderCollector_h__20180117
3 | #define FolderCollector_h__20180117
4 |
5 | #include "Implement\ProcessorImpl.h"
6 |
7 | namespace Yap
8 | {
9 | class FolderCollector : public ProcessorImpl
10 | {
11 | IMPLEMENT_SHARED(FolderCollector)
12 | public:
13 | FolderCollector();
14 | FolderCollector(const FolderCollector&);
15 |
16 | virtual bool Input(const wchar_t * name, IData * data) override;
17 |
18 | private:
19 | ~FolderCollector();
20 |
21 | std::map> _collector;
22 | unsigned int _count = 0;
23 |
24 | };
25 | }
26 | #endif // !FolderCollector_h__20180117
27 |
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/NiuMriImageWriter.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef NiuMriImageWriter_h__
3 | #define NiuMriImageWriter_h__
4 |
5 | #include "Implement/processorImpl.h"
6 |
7 | namespace Yap
8 | {
9 | class NiuMriImageWriter :
10 | public ProcessorImpl
11 | {
12 | IMPLEMENT_SHARED(NiuMriImageWriter)
13 | public:
14 | NiuMriImageWriter(void);
15 | NiuMriImageWriter(const NiuMriImageWriter& rhs);
16 |
17 | private:
18 | ~NiuMriImageWriter();
19 |
20 | virtual bool Input(const wchar_t * name, IData * data) override;
21 |
22 | std::wstring GetFilePath(const wchar_t * output_folder, const wchar_t * ouput_name);
23 | };
24 | }
25 |
26 | #endif // NiuMriImageWriter_h__
27 |
--------------------------------------------------------------------------------
/API/PipelineTest/Pipelines/niumag_recon.pipeline:
--------------------------------------------------------------------------------
1 | import "BasicRecon.dll";
2 |
3 | NiumagFidReader reader;
4 | SliceIterator slice_iterator;
5 | DcRemover dc_remover;
6 | ZeroFilling zero_filling(DestWidth = 512, DestHeight = 512);
7 | Fft2D fft;
8 | ModulePhase module_phase;
9 | //JpegExporter jpeg_exporter(ExportFolder = "D:\\Output\\2");
10 | DataTypeConvertor convertor;
11 | Display2D display2d;
12 |
13 | reader->slice_iterator;
14 | slice_iterator->dc_remover;
15 | dc_remover->zero_filling;
16 | zero_filling->fft;
17 | fft->module_phase;
18 | //module_phase.Module->jpeg_exporter;
19 | module_phase.Module->convertor;
20 | convertor.UnsignedShort->display2d;
21 |
22 | self.Input->reader.Input;
23 |
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/DeOversampling.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #ifndef DeOversampling_h__20160814
4 | #define DeOversampling_h__20160814
5 |
6 | #include "Implement/ProcessorImpl.h"
7 |
8 | namespace Yap
9 | {
10 | class DeOversampling :
11 | public ProcessorImpl
12 | {
13 | IMPLEMENT_SHARED(DeOversampling)
14 | public:
15 | DeOversampling();
16 | DeOversampling(const DeOversampling& rhs);
17 |
18 | protected:
19 | ~DeOversampling();
20 | virtual bool Input(const wchar_t * port, IData * data) override;
21 | bool FreqInput(const wchar_t * port, IData * data);
22 | bool ProcessOverSampling(const wchar_t * port, IData * data);
23 |
24 | };
25 | }
26 | #endif // DeOversampling_h__
27 |
--------------------------------------------------------------------------------
/Shared/Interface/IPython.h:
--------------------------------------------------------------------------------
1 | #ifndef _IPython_h__
2 | #define _IPython_h__
3 | #pragma once
4 |
5 | #ifndef OUT
6 | #define OUT
7 | #endif
8 |
9 | namespace Yap {
10 |
11 | struct IPython
12 | {
13 | virtual void* Process(const wchar_t* module_name, const wchar_t* method_name, int data_type, int out_data_type,
14 | size_t input_dimensions, void * data, OUT size_t &output_dimensions, size_t input_size[],
15 | OUT size_t output_size[], bool is_need_ref_data = 0) = 0;
16 |
17 | virtual void SetRefData(void * roi_data, int data_type, size_t dimension_count, size_t size[]) = 0;
18 |
19 | virtual void DeleteRefData() = 0;
20 | virtual ~IPython() = 0 {};
21 | };
22 |
23 | };
24 |
25 | #endif
--------------------------------------------------------------------------------
/Shared/PythonImplement/dllmain.cpp:
--------------------------------------------------------------------------------
1 | #include "PythonImpl.h"
2 | #include
3 |
4 | // dllmain.cpp : Defines the entry point for the DLL application.
5 |
6 | using namespace Yap;
7 |
8 | extern "C" {
9 | _declspec(dllexport) IPython * GetPython()
10 | {
11 | return PythonFactory::GetPython();
12 | }
13 | };
14 |
15 | BOOL APIENTRY DllMain(HMODULE hModule,
16 | DWORD ul_reason_for_call,
17 | LPVOID lpReserved
18 | )
19 | {
20 | switch (ul_reason_for_call)
21 | {
22 | case DLL_PROCESS_ATTACH:
23 |
24 | break;
25 | case DLL_THREAD_ATTACH:
26 | break;
27 | case DLL_THREAD_DETACH:
28 | break;
29 | case DLL_PROCESS_DETACH:
30 | break;
31 | }
32 | return TRUE;
33 | }
34 |
--------------------------------------------------------------------------------
/Shared/Interface/ILog.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef ILog_h__
3 | #define ILog_h__
4 |
5 | namespace Yap
6 | {
7 | enum LogLevel
8 | {
9 | LevelTrace,
10 | LevelDebug,
11 | LevelInfo,
12 | LevelWarn,
13 | LevelError,
14 | LevelFatal,
15 | };
16 |
17 | struct ILogUser;
18 | struct ILog
19 | {
20 | virtual void Log(const wchar_t * module, const wchar_t * info, LogLevel level, const wchar_t * log_name = L"", bool flush = false) = 0;
21 | virtual void AddUser(ILogUser * user) = 0;
22 | virtual void RemoveUser(ILogUser * user) = 0;
23 | };
24 |
25 | struct ILogUser
26 | {
27 | virtual void SetLog(ILog * log) = 0;
28 | };
29 | }
30 |
31 | #endif // ILog_h__
--------------------------------------------------------------------------------
/PluginSDK/PythonRecon/FileIterator.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #ifndef FileIterator_h__20171228
4 | #define FileIterator_h__20171228
5 |
6 | #include "Implement\ProcessorImpl.h"
7 |
8 | namespace Yap
9 | {
10 | class FileIterator : public ProcessorImpl
11 | {
12 | IMPLEMENT_SHARED(FileIterator)
13 | public:
14 | FileIterator();
15 |
16 | FileIterator(const FileIterator &);
17 |
18 | bool Input(const wchar_t * name, IData * data);
19 |
20 | private:
21 | ~FileIterator();
22 |
23 | void NotifyIterationFinished(IData * data);
24 |
25 | void GetFiles(std::vector& folders, std::wstring path, bool is_subfolder, std::wstring regular_exp);
26 |
27 | };
28 | }
29 |
30 | #endif // !FileIterator_h__20171228
31 |
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/NLM.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "Implement\ProcessorImpl.h"
3 | #include "Client/DataHelper.h"
4 | #include
5 |
6 | namespace Yap
7 | {
8 | class NLM :
9 | public ProcessorImpl
10 | {
11 | IMPLEMENT_SHARED(NLM)
12 | public:
13 | NLM(void);
14 | NLM(const NLM& rhs);
15 |
16 | protected:
17 | ~NLM();
18 |
19 | virtual bool Input(const wchar_t * name, IData * data) override;
20 |
21 | void nlmeans(float * input_img, float * output_img, unsigned int pl_r,
22 | unsigned int sw_r, float sigma, float h, unsigned int width, unsigned int height);
23 | arma::fmat GetGaussianKernel(int pl, float sigma);
24 |
25 | float GetSigma(float * input_img, unsigned int width, unsigned int height);
26 | };
27 | }
28 |
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/SimpleGrid.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #ifndef SimpleGrid_h__20160814
4 | #define SimpleGrid_h__20160814
5 |
6 | #include "Implement/ProcessorImpl.h"
7 |
8 | namespace Yap
9 | {
10 | class SimpleGrid :
11 | public ProcessorImpl
12 | {
13 | IMPLEMENT_SHARED(SimpleGrid)
14 | public:
15 | SimpleGrid();
16 | SimpleGrid(const SimpleGrid& rhs);
17 |
18 | protected:
19 | ~SimpleGrid();
20 | virtual bool Input(const wchar_t * port, IData * data) override;
21 | void TestSetup(IData *data);
22 | void FillKSpace(std::complex * slice, int width, int height,
23 | std::complex * radial, int columns, float angle, float center, float delta_k, bool OnlykPosition);
24 |
25 | };
26 | }
27 | #endif // SimpleGrid_h__
28 |
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/ZeroFilling.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #ifndef ZeroFilling_h__20160814
4 | #define ZeroFilling_h__20160814
5 |
6 | #include "Implement/ProcessorImpl.h"
7 |
8 | namespace Yap
9 | {
10 | class ZeroFilling :
11 | public ProcessorImpl
12 | {
13 | IMPLEMENT_SHARED(ZeroFilling)
14 | public:
15 | ZeroFilling();
16 | ZeroFilling(const ZeroFilling& rhs);
17 |
18 | protected:
19 | ~ZeroFilling();
20 |
21 | virtual bool Input(const wchar_t * port, IData * data) override;
22 | unsigned int GetFillingCount(IData* data, int dest_width, int dest_height, int dest_depth);
23 | void UpdateStartLength(const int input_length, int &dest_start, int &dest_length, bool same = false);
24 |
25 | };
26 | }
27 | #endif // ZeroFilling_h__
28 |
--------------------------------------------------------------------------------
/Shared/Interface/IPythonUser.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef _IPythonUser_h__
3 | #define _IPythonUser_h__
4 |
5 | #include "IPython.h"
6 |
7 | namespace Yap {
8 |
9 | struct IPythonUser
10 | {
11 | virtual void SetPython(IPython& python) = 0;
12 |
13 | virtual void SetReferenceData(void * data, int data_type, int input_dimensions, size_t * input_size) = 0;
14 |
15 | virtual void * PythonProcess(const wchar_t* module, const wchar_t* method,
16 | int data_type, int out_data_type, size_t input_dimensions,
17 | void * data, OUT size_t& output_dimensions,
18 | size_t input_size[], OUT size_t output_size[],
19 | bool is_need_ref_data) = 0;
20 |
21 | virtual void DeleteRefData() = 0;
22 | };
23 | }
24 |
25 | #endif // !_IPythonUser_h__
26 |
27 |
--------------------------------------------------------------------------------
/PluginSDK/PythonRecon/Python/my_utility/classTree.py:
--------------------------------------------------------------------------------
1 | """
2 | Check Class or object class-tree and show in screen
3 | """
4 |
5 | import types
6 |
7 |
8 | def subtree(classes, tab):
9 | print('.' * tab + classes.__name__)
10 | for super in classes.__bases__:
11 | subtree(super,tab + 3)
12 |
13 | def tree(object):
14 | if type(object) == type(int): # check is not class type
15 | object = object()
16 |
17 | print('Tree of %s' % object)
18 | subtree(object.__class__,3)
19 |
20 |
21 | if __name__ == '__main__':
22 | class A: pass
23 | class B(A): pass
24 | class C(A): pass
25 | class D(B,C): pass
26 | class E: pass
27 | class F(D,E): pass
28 | tree(B())
29 | tree(F())
30 |
--------------------------------------------------------------------------------
/API/PipelineTest/Pipelines/test_niumag_recon.pipeline:
--------------------------------------------------------------------------------
1 | import "BasicRecon.dll";
2 |
3 | NiumagFidReader reader(DataPath = "D:\\Projects\\Niumag\\data\\UU.img.fid");
4 | SliceIterator slice_iterator;
5 | DcRemover dc_remover;
6 | ZeroFilling zero_filling(DestWidth = 512, DestHeight = 512);
7 | Fft2D fft;
8 | ModulePhase module_phase;
9 | DataTypeConvertor convertor;
10 | JpegExporter jpeg_exporter(ExportFolder = "d:\\Output\\test_niuman");
11 | //NiuMriDisplay2D display2d;
12 |
13 | reader->slice_iterator;
14 | slice_iterator->dc_remover;
15 | dc_remover->zero_filling;
16 | zero_filling->fft;
17 | fft->module_phase;
18 | module_phase.Module->convertor;
19 | //convertor.UnsignedShort->display2d;
20 | convertor.UnsignedShort->jpeg_exporter;
21 |
22 | self.Input->reader.Input;
23 |
--------------------------------------------------------------------------------
/PluginSDK/PythonRecon/RFeaturesCollector.h:
--------------------------------------------------------------------------------
1 | /* Radiomics Features Collector */
2 | #pragma once
3 |
4 | #ifndef RadiomicsFeaturesCollector_h__20171229
5 | #define RadiomicsFeaturesCollector_h__20171229
6 |
7 | #include "Implement\ProcessorImpl.h"
8 |
9 | namespace Yap
10 | {
11 | class RFeaturesCollector : public ProcessorImpl
12 | {
13 | IMPLEMENT_SHARED(RFeaturesCollector)
14 | public:
15 | RFeaturesCollector();
16 | RFeaturesCollector(const RFeaturesCollector&);
17 |
18 | virtual bool Input(const wchar_t * name, IData * data) override;
19 |
20 | private:
21 | ~RFeaturesCollector();
22 |
23 | std::map> _collector;
24 | unsigned int _count = 0;
25 |
26 | };
27 | }
28 | #endif // !ExtractFeaturesFeaturesCollector_h__20171229
29 |
--------------------------------------------------------------------------------
/Shared/Utilities/Clipboard.h:
--------------------------------------------------------------------------------
1 | /********************************************************************
2 | Filename: Clipboard.h
3 | Created: 2011/02/14
4 | Author: Yang Guang, gyang@phy.ecnu.edu.cn
5 | Purpose:
6 |
7 | All right reserved. 2009 -
8 |
9 | Shanghai Key Laboratory of Magnetic Resonance,
10 | East China Normal University
11 | *********************************************************************/
12 |
13 | #ifndef Clipboard_h__20110214
14 | #define Clipboard_h__20110214
15 |
16 | #include
17 |
18 | #pragma once
19 | namespace Utilities
20 | {
21 | class CClipboard
22 | {
23 | public:
24 | static CString GetClipboardText();
25 | static bool SetClipboardText(const TCHAR * text);
26 | };
27 |
28 | }
29 |
30 |
31 | #endif // Clipboard_h__20110214
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/NiumagFidReader.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef NiumagFidReader_h__
3 | #define NiumagFidReader_h__
4 |
5 | #include "Implement/processorImpl.h"
6 |
7 | namespace Yap
8 | {
9 | /// Class used to read fid data file created by Niumag.
10 | /**
11 | Feel nullptr to the "Input" port to trigger file reading.
12 | "Output" data will be of type Unsigned Int.
13 | */
14 | class NiumagFidReader :
15 | public ProcessorImpl
16 | {
17 | IMPLEMENT_SHARED(NiumagFidReader)
18 | public:
19 | NiumagFidReader(void);
20 | NiumagFidReader(const NiumagFidReader& rhs);
21 |
22 | private:
23 | ~NiumagFidReader();
24 |
25 | virtual bool Input(const wchar_t * name, IData * data) override;
26 |
27 | bool ReadNiumagFidData();
28 | };
29 | }
30 |
31 | #endif // NiumagFidReader_h__
--------------------------------------------------------------------------------
/API/PipelineTest/Pipelines/grappa.pipeline:
--------------------------------------------------------------------------------
1 | import "BasicRecon.dll";
2 | import "GrappaRecon.dll";
3 |
4 | CmrRawDataReader reader(DataPath = "D:\\test_data\\RawData_256\\RawData",
5 | ChannelCount = 4, ChannelSwitch = 15);
6 | SliceSelector slice_selector;
7 | Fft2D fft;
8 | ModulePhase module_phase;
9 | Grappa grappa;
10 | ChannelDataCollector data_collector;
11 | ChannelMerger channel_merger;
12 | ChannelIterator channel_iterator;
13 |
14 | JpegExporter jpeg_exporter(ExportFolder = "d:\\Output");
15 |
16 | reader->slice_selector;
17 |
18 | slice_selector->data_collector;
19 | data_collector->grappa;
20 | grappa->channel_iterator;
21 | channel_iterator->fft;
22 | fft->module_phase;
23 | module_phase.Module->channel_merger;
24 | channel_merger->jpeg_exporter;
25 |
26 | self.Input->reader.Input;
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/NiumagImgReader.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef NiumagImgReader_h__
3 | #define NiumagImgReader_h__
4 |
5 | #include "Implement/processorImpl.h"
6 |
7 | namespace Yap
8 | {
9 | /// Class used to read img data file created by Niumag.
10 | /**
11 | Feel nullptr to the "Input" port to trigger file reading.
12 | "Output" data will be of type Unsigned Int.
13 | */
14 | class NiumagImgReader :
15 | public ProcessorImpl
16 | {
17 | IMPLEMENT_SHARED(NiumagImgReader)
18 | public:
19 | NiumagImgReader(void);
20 | NiumagImgReader(const NiumagImgReader& rhs);
21 |
22 | private:
23 | ~NiumagImgReader();
24 |
25 | virtual bool Input(const wchar_t * name, IData * data) override;
26 |
27 | bool ReadNiumagImgData();
28 | };
29 | }
30 |
31 |
32 | #endif // NiumagImgReader_h__
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/NiuMriImageReader.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef NiuMriImageReader_h__
3 | #define NiuMriImageReader_h__
4 |
5 | #include "Implement/processorImpl.h"
6 |
7 | namespace Yap
8 | {
9 | /// Class used to read .niuimg data file created by Niumag.
10 | /**
11 | Feel nullptr to the "Input" port to trigger file reading.
12 | "Output" data will be of type Unsigned Int.
13 | */
14 | class NiuMriImageReader :
15 | public ProcessorImpl
16 | {
17 | IMPLEMENT_SHARED(NiuMriImageReader)
18 | public:
19 | NiuMriImageReader(void);
20 | NiuMriImageReader(const NiuMriImageReader& rhs);
21 |
22 | private:
23 | ~NiuMriImageReader();
24 |
25 | virtual bool Input(const wchar_t * name, IData * data) override;
26 |
27 | bool ReadNiuMriImageData();
28 | };
29 | }
30 |
31 |
32 | #endif // NiuMriImageReader_h__
--------------------------------------------------------------------------------
/API/PipelineTest/Pipelines/Test0.pipeline:
--------------------------------------------------------------------------------
1 | import "BasicRecon.dll";
2 |
3 | CmrDataReader reader(DataPath = "D:\\Data\\cmr_data\\RawData_256\\RawData",
4 | ChannelCount = 4, ChannelSwitch = 15);
5 |
6 | //SliceIterator slice_iterator;
7 | SliceSelector slice_selector(SliceIndex = 3);
8 | DcRemover dc_remover;
9 | ZeroFilling zero_filling(DestWidth = 512, DestHeight = 512);
10 |
11 | Fft2D fft;
12 | ModulePhase module_phase;
13 | ChannelMerger channel_merge(ChannelCount = 4 );
14 | JpegExporter jpeg_exporter(ExportFolder = "D:\\output\\test_cmr");
15 |
16 | reader->slice_selector;
17 | slice_selector->dc_remover;
18 | dc_remover->zero_filling;
19 | zero_filling->fft;
20 | fft->module_phase;
21 | //module_phase.Module->jpeg_exporter;
22 | module_phase.Module->channel_merge;
23 | channel_merge->jpeg_exporter;
24 |
25 |
26 | self.Input->reader.Input;
27 |
--------------------------------------------------------------------------------
/PluginSDK/PythonRecon/Python/my_utility/reloadall.py:
--------------------------------------------------------------------------------
1 | """
2 | reloadall.py: reload all modules in the load line
3 | """
4 |
5 | import types
6 | from imp import reload
7 |
8 |
9 | def status(module):
10 | print('reloading ' + module.__name__)
11 |
12 |
13 | def transitive_reload(module,visited):
14 | if not module in visited:
15 | status(module)
16 | reload(module)
17 | visited[module] = None
18 | for attrobj in module.__dict__.values():
19 | if type(attrobj) == types.ModuleType :
20 | transitive_reload(attrobj, visited)
21 |
22 |
23 | def reload_all(*args):
24 | visited = {}
25 | for arg in args:
26 | if type(arg) == types.ModuleType:
27 | transitive_reload(arg, visited)
28 |
29 |
30 | if __name__ == '__main__':
31 | import reloadall
32 | reload_all(reloadall)
33 |
--------------------------------------------------------------------------------
/Shared/Utilities/stdafx.cpp:
--------------------------------------------------------------------------------
1 | // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
2 | // (the "Fluent UI") and is provided only as referential material to supplement the
3 | // Microsoft Foundation Classes Reference and related electronic documentation
4 | // included with the MFC C++ library software.
5 | // License terms to copy, use or distribute the Fluent UI are available separately.
6 | // To learn more about our Fluent UI licensing program, please visit
7 | // http://go.microsoft.com/fwlink/?LinkId=238214.
8 | //
9 | // Copyright (C) Microsoft Corporation
10 | // All rights reserved.
11 |
12 | // stdafx.cpp : source file that includes just the standard includes
13 | // Painter.pch will be the pre-compiled header
14 | // stdafx.obj will contain the pre-compiled type information
15 |
16 | #include "stdafx.h"
17 |
18 |
19 |
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/ComplexSplitter.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #ifndef ComplexSplitter_h__20160813
4 | #define ComplexSplitter_h__20160813
5 |
6 | #include "Implement/ProcessorImpl.h"
7 | #include "Client/DataHelper.h"
8 |
9 | namespace Yap
10 | {
11 | class ComplexSplitter :public ProcessorImpl
12 | {
13 | IMPLEMENT_SHARED(ComplexSplitter)
14 | public:
15 | ComplexSplitter();
16 | ComplexSplitter(const ComplexSplitter& rhs);
17 |
18 | protected:
19 | ~ComplexSplitter();
20 |
21 | virtual bool Input(const wchar_t * port, IData * data) override;
22 |
23 | void Split(std::complex * data, double * real, double * imaginary, size_t size);
24 | void ExtractReal(std::complex * data, double * real, size_t size);
25 | void ExtractImaginary(std::complex * data, double * imaginary, size_t size);
26 | };
27 | }
28 | #endif // ComplexSplitter_h__
29 |
--------------------------------------------------------------------------------
/PluginSDK/BasicRecon/RadialSampling.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef RadiaolSampling_h__20160814
3 | #define RadiaolSampling_h__20160814
4 |
5 | #include "Implement/ProcessorImpl.h"
6 | #include
7 | #include
8 |
9 | namespace Yap
10 | {
11 | class RadialSampling :
12 | public ProcessorImpl
13 | {
14 | IMPLEMENT_SHARED(RadialSampling)
15 | public:
16 | RadialSampling();
17 | RadialSampling(const RadialSampling& rhs);
18 |
19 | protected:
20 | ~RadialSampling();
21 |
22 | virtual bool Input(const wchar_t * port, IData * data) override;
23 |
24 | boost::shared_array>
25 | GetRadialLine(std::complex * input_data2D,
26 | unsigned int width, unsigned int height,
27 | int columns, float angle, int center, float delta_k);
28 |
29 | private:
30 | //SmartPtr _mask;
31 |
32 | };
33 | }
34 |
35 | #endif //RadiaolSampling_h__
--------------------------------------------------------------------------------
/API/PipelineTest/Pipelines/CompressedSensing.pipeline:
--------------------------------------------------------------------------------
1 | import "BasicRecon.dll";
2 | import "CompressedSensing.dll";
3 |
4 | CmrRawDataReader reader(DataPath = "D:\\test_data\\RawData_256\\RawData",
5 | ChannelCount = 4, ChannelSwitch = 15);
6 | SliceSelector slice_selector1;
7 | SliceSelector slice_selector2;
8 |
9 |
10 | Fft2D fft;
11 | SamplingMaskCreator mask_creator;
12 | SubSampling sub_sampling;
13 | ModulePhase module_phase;
14 | CompressedSensing compressed_sensing;
15 | JpegExporter jpeg_exporter(ExportFolder = "d:\\Output");
16 |
17 | reader->slice_selector1;
18 | reader->slice_selector2;
19 |
20 | slice_selector1->mask_creator;
21 | mask_creator->sub_sampling.Mask;
22 | mask_creator->compressed_sensing.Mask;
23 | slice_selector2->sub_sampling.Input;
24 | sub_sampling->compressed_sensing.Input;
25 |
26 | compressed_sensing->fft;
27 | fft->module_phase;
28 | module_phase.Module->jpeg_exporter;
29 |
30 | self.Input->reader.Input;
--------------------------------------------------------------------------------
/API/PipelineTest/Pipelines/FFT3DTest.pipeline:
--------------------------------------------------------------------------------
1 | import "BasicRecon.dll";
2 |
3 | NiumagFidReader reader(DataPath = "D:\\TestData\\3DSE\\rat.fid");
4 | ZeroFilling zero_filling(DestWidth = 256, DestHeight = 256, DestDepth = 20);
5 | SliceIterator slice_iterator;
6 | Fft3D fft;
7 | ModulePhase module_phase;
8 | GrayScaleUnifier gray_scale_unifier;
9 | DataTypeConvertor data_type_convertor;
10 | JpegExporter jpeg_exporter(ExportFolder = "D:\\Output\\3DRecon", StretchPixelData = false);
11 | //NiuMriImageWriter img_writer(ExportFolder = "d:\\Output");
12 |
13 | reader->zero_filling;
14 | zero_filling->fft;
15 | fft->module_phase;
16 | module_phase.Module->gray_scale_unifier;
17 | gray_scale_unifier->data_type_convertor;
18 | //module_phase.Module->data_type_convertor;
19 | data_type_convertor.UnsignedShort->slice_iterator;
20 | slice_iterator->jpeg_exporter;
21 | //data_type_convertor.UnsignedShort->img_writer;
22 |
23 | self.Input->reader.Input;
--------------------------------------------------------------------------------
/Shared/Implement/TypeManager.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef TypeManager_h__20180129
3 | #define TypeManager_h__20180129
4 |
5 | #include