Commits
Darrell Schiebel authored 79a3f6cf1e6 Merge
62 62 | } |
63 63 | |
64 64 | String ImageInputProcessor::_stokesFromRecord( |
65 65 | const Record& region, const CoordinateSystem& csys |
66 66 | ) const { |
67 67 | // FIXME This implementation is incorrect for complex, recursive records |
68 68 | String stokes = ""; |
69 69 | if(csys.hasPolarizationCoordinate()) { |
70 70 | Int polAxis = csys.polarizationAxisNumber(); |
71 71 | uInt stokesBegin, stokesEnd; |
72 - | ImageRegion *imreg = ImageRegion::fromRecord(region, ""); |
72 + | std::unique_ptr<ImageRegion> imreg(ImageRegion::fromRecord(region, "")); |
73 73 | Array<Float> blc, trc; |
74 74 | Bool oneRelAccountedFor = false; |
75 75 | if (imreg->isLCSlicer()) { |
76 76 | blc = imreg->asLCSlicer().blc(); |
77 77 | trc = imreg->asLCSlicer().trc(); |
78 78 | stokesBegin = (uInt)((Vector<Float>)blc)[polAxis]; |
79 79 | stokesEnd = (uInt)((Vector<Float>)trc)[polAxis]; |
80 80 | oneRelAccountedFor = true; |
81 81 | } |
82 82 | else if (RegionManager::isPixelRegion(*(ImageRegion::fromRecord(region, "")))) { |