Commits

Darrell Schiebel authored 43433f07420 Merge
Merge pull request #1077 in CASA/casa from CAS-12600 to master

* commit '831f05a3be29553807fae2de5020defb13368f08': make parallel cube tclean to use ia.imageconcat instead of stand alone imageconcat update docs, fix warning CAS-12600 add mode feature to allow user to specify the output format Just committing brokeness for now so I don't lose it while I go CAS-12600 ImageFactory::fromFile() specializations

code/imageanalysis/ImageAnalysis/ImageConcatenator.h

Modified
31 31 #include <imageanalysis/ImageAnalysis/ImageTask.h>
32 32 #include <casa/namespace.h>
33 33
34 34 namespace casacore{
35 35
36 36 template <class T> class ImageConcat;
37 37 }
38 38
39 39 namespace casa {
40 40
41 -template <class T> class ImageConcatenator : public ImageTask<T> {
41 +template <class T> class ImageConcatenator /*: public ImageTask<T>*/ {
42 42 // <summary>
43 43 // Top level interface for concatenating images
44 44 // </summary>
45 45
46 46 // <reviewed reviewer="" date="" tests="" demos="">
47 47 // </reviewed>
48 48
49 49 // <prerequisite>
50 50 // </prerequisite>
51 51
52 52 // <etymology>
53 53 // Concatenate an image
54 54 // </etymology>
55 55
56 56 // <synopsis>
57 57 // High level interface for concatenating images.
58 58 // </synopsis>
59 59
60 60 public:
61 61
62 - // <src>image</src> should be the first image in
62 + ImageConcatenator() = delete;
63 +
64 + // <src>image</src> should be the first image in
63 65 // the list of images to be concatenated.
66 + /*
64 67 ImageConcatenator(
65 - SPCIIT image, const casacore::String& outname, casacore::Bool overwrite
68 + SPIIT image, const casacore::String& outname, casacore::Bool overwrite
66 69 );
70 + */
71 +
72 + ImageConcatenator(
73 + std::vector<casacore::String>& images,
74 + const casacore::String& outname, casacore::Bool overwrite
75 + );
76 +
77 +
67 78
68 79 // destructor
69 80 ~ImageConcatenator();
70 81
71 82 // Perform the concatenation.
72 - SPIIT concatenate(const std::vector<casacore::String>& imageNames);
83 + // SPIIT concatenate(const std::vector<casacore::String>& imageNames);
84 + SPIIT concatenate();
73 85
74 86 // Set the axis along which to do the concatenation. A negative value
75 87 // of <src>axis</src> means use the spectral axis. An exception is thrown
76 88 // if <src>axis</src> is negative and the image has no spectral axis.
77 89 void setAxis(casacore::Int axis);
78 90
79 91 void setTempClose(casacore::Bool b) { _tempClose = b; }
80 92
93 + void setMode(const casacore::String& mymode);
94 +
81 95 void setRelax(casacore::Bool b) { _relax = b; }
82 96
83 97 void setReorder(casacore::Bool b) { _reorder = b; }
84 98
85 99 casacore::String getClass() const;
86 100
87 101 protected:
88 - inline CasacRegionManager::StokesControl _getStokesControl() const {
89 - return CasacRegionManager::USE_ALL_STOKES;
90 - }
91 -
92 - inline std::vector<casacore::Coordinate::Type> _getNecessaryCoordinates() const {
93 - return std::vector<casacore::Coordinate::Type>(0);
94 - }
102 + enum MODE{
103 + COPYVIRTUAL,
104 + MOVEVIRTUAL,
105 + NOMOVEVIRTUAL,
106 + PAGED
107 + };
95 108
96 109 private:
97 - casacore::Int _axis;
98 - casacore::Bool _tempClose, _relax, _reorder;
99 - static const casacore::String _class;
100 -
101 - // disallow default constructor
102 - ImageConcatenator();
103 -
104 - // returns true if world coordinate values increase
105 - // with pixel coordinate values
106 - casacore::Bool _minMaxAxisValues(
107 - casacore::Double& min, casacore::Double& max, casacore::uInt ndim,
108 - const casacore::CoordinateSystem& csys, const casacore::IPosition& shape
109 - ) const;
110 -
111 - void _addImage(
112 - std::unique_ptr<casacore::ImageConcat<T> >& pConcat,
113 - const casacore::String& name
110 + std::vector<casacore::String> _imageNames;
111 + casacore::String _outname;
112 + casacore::Bool _overwrite;
113 + casacore::Int _axis = -1;
114 + casacore::Bool _tempClose = false;
115 + casacore::Bool _relax = false;
116 + casacore::Bool _reorder = false;
117 + MODE _mode = PAGED;
118 + static const casacore::String _class;
119 +
120 + // returns true if world coordinate values increase
121 + // with pixel coordinate values
122 + casacore::Bool _minAxisValues(
123 + casacore::Double& min, const casacore::CoordinateSystem& csys,
124 + const casacore::IPosition& shape
125 + ) const;
126 +
127 + void _addImage(
128 + std::shared_ptr<casacore::ImageConcat<T>> pConcat,
129 + const casacore::String& name, casacore::Bool first
114 130 ) const;
115 131
116 132 };
117 133 }
118 134
119 135 #ifndef AIPS_NO_TEMPLATE_SRC
120 136 #include <imageanalysis/ImageAnalysis/ImageConcatenator.tcc>
121 137 #endif //# AIPS_NO_TEMPLATE_SRC
122 138
123 139 #endif

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut