Skip to content

Instantly share code, notes, and snippets.

View iMichka's full-sized avatar

Michka Popoff iMichka

View GitHub Profile
diff --git a/Modules/Core/ImageFunction/include/itkLinearInterpolateImageFunction.h b/Modules/Core/ImageFunction/include/itkLinearInterpolateImageFunction.h
index 7cfedf9..f7ce7e4 100644
--- a/Modules/Core/ImageFunction/include/itkLinearInterpolateImageFunction.h
+++ b/Modules/Core/ImageFunction/include/itkLinearInterpolateImageFunction.h
@@ -510,7 +510,7 @@ class LinearInterpolateImageFunction:
const typename TInputImage::PixelType & tempPixel = inputImagePtr->GetPixel(idx);
const unsigned int sizeOfVarLengthVector = tempPixel.GetSize();
tempZeros.SetSize(sizeOfVarLengthVector);
- tempZeros.Fill(NumericTraits< RealTypeScalarRealType >::Zero);
+ tempZeros.Fill(NumericTraits< RealTypeScalarRealType >::ZeroValue());
From b54ec1eaeff29eb7775cb586062d53524db5455a Mon Sep 17 00:00:00 2001
From: Michka Popoff <[email protected]>
Date: Sun, 26 Jan 2014 15:51:02 +0100
Subject: [PATCH] Fix 10.8.5 python for 4.5.0 release
---
.../ImageGrid/include/itkConstantPadImageFilter.hxx | 2 +-
.../Filtering/ImageIntensity/include/itkMaskImageFilter.h | 6 +++---
.../ImageIntensity/include/itkMaskNegatedImageFilter.h | 2 +-
.../include/itkConnectedComponentFunctorImageFilter.hxx | 14 +++++++-------
Last login: Thu Feb 6 09:55:22 on ttys001
mcpi-macpro:~ Administrateur$ HOMEBREW_MAKE_JOBS=1 brew install -v scipy 2>&1
/usr/bin/env python -c import nose
/usr/bin/env python -c import nose
==> Using Homebrew-provided fortran compiler.
This may be changed by setting the FC environment variable.
==> Building with an alternative Fortran compiler
This is unsupported.
==> Downloading http://downloads.sourceforge.net/project/scipy/scipy/0.13.1/scipy-0.13.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/scipy-0.13.1.tar.gz
@iMichka
iMichka / gist:9131352
Created February 21, 2014 09:33
Hide ITK wrapping warnings
class FetchStderr(object):
def write(self, err):
display = False
if display:
# Display the warnings
sys.stdout.write(err)
else:
# Do not display the warnings
import sys
import vtk
from PyQt4 import QtCore, QtGui
from vtk.qt4.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor
class MainWindow(QtGui.QMainWindow):
def __init__(self, parent = None):
QtGui.QMainWindow.__init__(self, parent)
@iMichka
iMichka / MPL_blitting.py
Created March 31, 2014 20:20
MPL blitting problem
#!/usr/bin/env python
import sys
import numpy
from PyQt4 import QtGui
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg
from matplotlib.collections import PolyCollection
from matplotlib.figure import Figure
@iMichka
iMichka / scipy
Created April 2, 2014 15:58
scipy install fail
mcpi-macpro:~ Administrateur$ brew install scipy -v
/usr/bin/env python -c import nose
/usr/bin/env python -c import nose
==> Using Homebrew-provided fortran compiler.
This may be changed by setting the FC environment variable.
==> Building with an alternative Fortran compiler
This is unsupported.
==> Downloading https://downloads.sourceforge.net/project/scipy/scipy/0.13.3/scipy-0.13.3.tar.gz
Already downloaded: /Library/Caches/Homebrew/scipy-0.13.3.tar.gz
==> Verifying scipy-0.13.3.tar.gz checksum
@iMichka
iMichka / scipy test
Created April 8, 2014 15:52
scipy Test
mcpi-macpro:Desktop Administrateur$ brew test -v scipy
Testing scipy
==> python -c import scipy; scipy.test()
/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/lib/utils.py:134: DeprecationWarning: `scipy.lib.blas` is deprecated, use `scipy.linalg.blas` instead!
warnings.warn(depdoc, DeprecationWarning)
/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/lib/utils.py:134: DeprecationWarning: `scipy.lib.lapack` is deprecated, use `scipy.linalg.lapack` instead!
warnings.warn(depdoc, DeprecationWarning)
..............................................................................................................................................................................................................................K..................................................................................................................K..................................................................
@iMichka
iMichka / qthead
Created April 20, 2014 09:34
QT 4.8.6 head fail
MacBook-Pro-de-Michka:~ michkapopoff$ brew install qt --HEAD -v
==> Cloning git://gitorious.org/qt/qt.git
git --git-dir /Library/Caches/Homebrew/qt--git/.git status -s
Updating /Library/Caches/Homebrew/qt--git
git config remote.origin.url git://gitorious.org/qt/qt.git
git config remote.origin.fetch +refs/heads/4.8:refs/remotes/origin/4.8
git fetch origin
git checkout -f 4.8
Already on '4.8'
Your branch is up-to-date with 'origin/4.8'.
[ 50%] Building CXX object Wrapping/Modules/ITKOptimizers/CMakeFiles/ITKOptimizersPython.dir/ITKCostFunctionsPython.cpp.o
cd /tmp/imichka-insighttoolkit-uoSk/itk-build/Wrapping/Modules/ITKOptimizers && /usr/local/Library/ENV/4.3/clang++ -DITKOptimizersPython_EXPORTS -DITK_IO_FACTORY_REGISTER_MANAGER -DSWIG_GLOBAL -DvtkRenderingCore_AUTOINIT="4(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingFreeTypeOpenGL,vtkRenderingOpenGL)" -DvtkRenderingFreeType_AUTOINIT="1(vtkRenderingFreeTypeFontConfig)" -DvtkRenderingVolume_AUTOINIT="1(vtkRenderingVolumeOpenGL)" -Wall -Wno-long-double -Wcast-align -Wdisabled-optimization -Wextra -Wformat=2 -Winvalid-pch -Wno-format-nonliteral -Wpointer-arith -Wshadow -Wunused -Wwrite-strings -funit-at-a-time -Wno-strict-overflow -Wno-unused-local-typedefs -Wno-deprecated -Wno-invalid-offsetof -Woverloaded-virtual -Wstrict-null-sentinel -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -fPIC -I/tmp/imichka-insighttoolki