]> Creatis software - clitk.git/commitdiff
remove debug
authordsarrut <dsarrut>
Wed, 15 Dec 2010 08:50:49 +0000 (08:50 +0000)
committerdsarrut <dsarrut>
Wed, 15 Dec 2010 08:50:49 +0000 (08:50 +0000)
vv/vvImageReader.txx
vv/vvLandmarks.cxx
vv/vvMaximumIntensityProjection.cxx
vv/vvMaximumIntensityProjection.h
vv/vvSlicer.cxx

index 2ebec0e44579193b53521b18bcad0827aa2b5056..e2e98bb2d125f5bdf76e23281c00e95a0856a116 100644 (file)
@@ -68,14 +68,12 @@ void vvImageReader::UpdateWithDim(std::string InputPixelType)
 template<class InputPixelType, unsigned int VImageDimension>
 void vvImageReader::UpdateWithDimAndInputPixelType()
 {
-
-  //  DD(mType);
-
   if (mType == MERGEDWITHTIME)   // In this case we can load the images
     // one at the time to avoid excessive
     // memory use
   {
     mImage=vvImage::New();
+
     for (std::vector<std::string>::const_iterator i=mInputFilenames.begin(); i!=mInputFilenames.end(); i++) {
       typedef itk::Image< InputPixelType, VImageDimension-1 > InputImageType;
       typedef itk::ImageFileReader<InputImageType> ReaderType;
index b0e228cdc8bd83889efbe76848656875f3e2f204..f092729606f6b9a88d22d7caac6232b7c6f45818 100644 (file)
@@ -14,7 +14,7 @@
 
   - BSD        See included LICENSE.txt file
   - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
-======================================================================-====*/
+  ======================================================================-====*/
 #include "vvLandmarks.h"
 
 #include <ios>
@@ -68,11 +68,11 @@ void vvLandmarks::AddLandmark(float x,float y,float z,float t,double value)
   mPoints[int(t)]->InsertNextPoint(x,y,z);
 
   /*std::stringstream numberVal;
-  numberVal << (mLandmarks.size()-1);
-  vvLandmarksGlyph *number = vvLandmarksGlyph::New();
-  number->SetText(numberVal.str().c_str());
-  number->BackingOff();
-  mText.push_back(number);*/
+    numberVal << (mLandmarks.size()-1);
+    vvLandmarksGlyph *number = vvLandmarksGlyph::New();
+    number->SetText(numberVal.str().c_str());
+    number->BackingOff();
+    mText.push_back(number);*/
   mIds->InsertNextTuple1(0.55);
   //mIds->InsertTuple1(mLandmarks.size(),mLandmarks.size());
   SetTime(int(t));
@@ -81,7 +81,7 @@ void vvLandmarks::AddLandmark(float x,float y,float z,float t,double value)
 void vvLandmarks::RemoveLastLandmark()
 {
   mPoints[mLandmarks.back().coordinates[3]]->SetNumberOfPoints(
-    mPoints[mLandmarks.back().coordinates[3]]->GetNumberOfPoints()-1);
+                                                               mPoints[mLandmarks.back().coordinates[3]]->GetNumberOfPoints()-1);
   mPolyData->Modified();
   //mText.pop_back();
   mLandmarks.pop_back();
@@ -133,7 +133,6 @@ void vvLandmarks::LoadFile(std::string filename)
       } else
         mFormatVersion=0;
     }
-    DD(mFormatVersion);
     if (stringline.size() > 1) {
       vvLandmark point;
       int previousSpace = 0;
@@ -193,7 +192,7 @@ void vvLandmarks::LoadFile(std::string filename)
       mLandmarks.push_back(point);
       mIds->InsertNextTuple1(0.55);
       mPoints[int(point.coordinates[3])]->InsertNextPoint(
-        point.coordinates[0],point.coordinates[1],point.coordinates[2]);
+                                                          point.coordinates[0],point.coordinates[1],point.coordinates[2]);
     }
   }
   SetTime(0);
index 4eb84f7dfe8c2f252100cb33360201f100df4828..c7ffb52d0078e1fda50e8f11a528acb23f6c9167 100644 (file)
@@ -29,6 +29,7 @@
 
 void vvMaximumIntensityProjection::Compute(vvSlicerManager * slicer_manager)
 {
+  mCurrentSlicerManager = slicer_manager;
   mDimension = QInputDialog::getInteger(0, "MIP Axis","Choose the axis along which to perform the MIP",0,0,\
                                      slicer_manager->GetImage()->GetNumberOfDimensions()-1,1);
 #define TRY_TYPE(TYPE)                                                 \
@@ -77,4 +78,7 @@ void vvMaximumIntensityProjection::Update_WithDimAndPixelType(vvImage::Pointer i
   filter->SetInput(input);
   filter->Update();
   mOutputImage=vvImageFromITK<Dim-1,PixelType>(filter->GetOutput());
+  // std::ostringstream osstream;
+  // osstream << "MIP_" << mCurrentSlicerManager->GetSlicer(0)->GetFileName() << ".mhd";  
+  // AddImage(mOutputImage,osstream.str());
 }
index 9d1516483978a52fbdb27fc715557545f6a013cb..8f3770123d18816d8d180485d43efc3a9347d3d7 100644 (file)
@@ -35,6 +35,7 @@ protected:
     vvImage::Pointer mOutputImage;
     //Dimension along which to compute the MIP
     unsigned int mDimension;
+  vvSlicerManager * mCurrentSlicerManager;
 };
 
 #endif
index 564dcf2042ee967d7bffb8dcb61af40094d99240..d1f084cd5b21a68d32d37c2e9c316e9222484b0b 100644 (file)
@@ -648,6 +648,11 @@ void vvSlicer::SetSliceOrientation(int orientation)
   if (range)
     this->Slice = static_cast<int>((range[0] + range[1]) * 0.5);
 
+  // Go to current cursor position
+  // double* cursorPos = GetCursorPosition();
+  // DDV(cursorPos, 3);
+  // SetCurrentPosition(cursorPos[0],cursorPos[1],cursorPos[2],cursorPos[3]);
+
   this->UpdateOrientation();
   this->UpdateDisplayExtent();