http://code.google.com/p/casacore/source/detail?r=21239
Modified:
/trunk/images/Images/ImageProxy.cc
/trunk/images/Images/ImageProxy.h
=======================================
--- /trunk/images/Images/ImageProxy.cc Tue Apr 3 05:53:02 2012
+++ /trunk/images/Images/ImageProxy.cc Thu Apr 5 07:35:49 2012
@@ -213,7 +213,7 @@
itsImageDComplex (0)
{
if (! itsLattice.null()) {
- setup (itsLattice.operator->());
+ setup();
}
}
@@ -226,7 +226,7 @@
itsImageComplex = 0;
itsImageDComplex = 0;
if (! itsLattice.null()) {
- setup (itsLattice.operator->());
+ setup();
}
}
return *this;
@@ -443,6 +443,13 @@
void ImageProxy::setup (LatticeBase* lattice)
{
itsLattice = lattice;
+ setup();
+ }
+
+ void ImageProxy::setup()
+ {
+ // Get raw pointer from the CountedPtr.
+ LatticeBase* lattice = &(*itsLattice);
switch (lattice->dataType()) {
case TpFloat:
itsImageFloat = dynamic_cast<ImageInterface<Float>*>(lattice);
@@ -734,6 +741,7 @@
adjustTrc(trc, shp),
adjustInc(inc, shp),
Slicer::endIsLast);
+ cout << "make subimage "<<blc<<trc<<endl;
if (itsImageFloat) {
return ImageProxy(new SubImage<Float>(*itsImageFloat, slicer,
True, axesSpec));
=======================================
--- /trunk/images/Images/ImageProxy.h Tue Apr 3 05:53:02 2012
+++ /trunk/images/Images/ImageProxy.h Thu Apr 5 07:35:49 2012
@@ -357,6 +357,10 @@
// </group>
// Setup the pointers for the various image data types.
+ void setup();
+
+ // Setup the pointers for the various image data types.
+ // It takes over the lattice pointer.
void setup (LatticeBase* lattice);
// Centre all axes except the Stokes one.