Michael Wienke | 1 Apr 2008 09:59
Picon
Picon

combine matlab and ITK

Hello,

I would like to combine MATLAB and the ITK. For this reason I can compile mex-files and include them in my
matlab program. The C++ functions are available then and I can use the user-friendly matlab environment.
But when I try to compile the code into a *.mexw32 (mex file for windows 32) there is an error message:

fatal error C1073: Internal error in connection with the incremental compilation (Compiler-File
'.\p0io.c', line 337)

And now I don't know what to do.
Is it in general possible to use Matlab in combination with the ITK or are there restrictions that make it
impossible to use Matlab ??

Best regards and thanks for your help

Michael Wienke
--

-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
Paul Richards | 1 Apr 2008 11:41
Picon

Re: Compiling WrapITK with many types on under VS.net 8.0 and above

I had to manually add this flag when building "ImageCalculator" from
InsightApplications.  I'd suggest adding /bigobj to all of these
projects.

On 15/10/2007, Ali - <saveez@...> wrote:
>
> Hi,
>
> When compiling WrapITK with more than a certain number of types on, one
> encounters 'Fatal Error C1128' which is due to the fact that the compiled
> object exceeds the maximum allowable number of sections [1, 2, 3].
>
> Since VS.net 8.0, it is possible to avoid this problem by the command
> /bigobj, however, it may not be trivial to 'programatically' find which
> object exceeds the limit and assign the /bigobj command dynamically in this
> way. There are at least 2 rather static solutions:
>
> (a) To include /bigobj for all the projects. It is not known to me if this
> would affect the compilation, or even runtime, performance or not.
>
> (b) To use /bigobj as we go. For ITK 3.4, the only project that I needed to
> include the command was IntensityFiltersPython.
>
> It would be good if option (b) could be included in the CVS. The only
> condition is that the VS.net version number must be >= 8.0.
>
>
>
> [1]
> http://msdn2.microsoft.com/en-us/library/8578y171(VS.80).aspx
(Continue reading)

Louis MAYAUD | 1 Apr 2008 11:39
Picon
Favicon

Visualizing or Saving SpatialObjects Volume

Hi everybody,

I doing internship at GE Healthcare and I would like to try RGC on
vessel tree segmentation. By now, I 'played' with ITK in order to see
how far I can go with (mean I not very familiar with it)

I realized a vessel tree segmentation and used the Vesseltube
SpatialObject to roughly represent it.
In order to visualized that result, I tried to export it as a *.meta
file through SpatialObjectWriter (I think I don't have any other way to
export that structure)
Then I tried to convert that *.meta file into an other file format with
the following code:
	
=====================================
// Image reader
typedef itk::Image< unsigned short , 3 > ImageType ;
typedef itk::ImageFileReader< ImageType > ImageReaderType ;
ImageReaderType::Pointer imageReader = ImageReaderType::New() ;
imageReader->SetFileName("ellipse.meta") ;

// META type def
typedef itk::MetaImageIO MetaIOType ;
MetaIOType::Pointer metaIO = MetaIOType::New() ;
metaIO->SetFileTypeToASCII() ;
imageReader->SetImageIO( metaIO ) ;

// Image Writer
typedef itk::ImageFileWriter< ImageType > ImageFileWriterType ;
ImageFileWriterType::Pointer imageFileWriter =
(Continue reading)

Ignacio García Fenoll | 1 Apr 2008 12:16
Picon

Adaptive Histogram Equalization Filter


Good morning, itk-users!!

I want to filter a serie of gray scale images (CT)  with the Adaptive Histogram Equalization Filter. Are there any examples of this?

Thank you very much!!
--
Ignacio García Fenoll
Grupo de Imágenes Médicas
Departamento de Teoría de la Señal y Comunicaciones
Universidad de Sevilla
e-mail: igfenoll-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Tlf.: 666053047
_______________________________________________
Insight-users mailing list
Insight-users@...
http://www.itk.org/mailman/listinfo/insight-users
polys_poly | 1 Apr 2008 14:34
Picon
Favicon

Reading a Dicom Series and visualizing the volume in VTK

Hello,
 
I have combined the code found in itkReadITKImageShowVTK.cpp file (InsightApplications\Auxiliary\vtk) and the code found in DicomSeriesReadImageWrite2.cpp (InsightToolkit\Examples\IO) to read a DICOM series and visualize it in VTK. My problem is that the volume is not visualized. I understand that the example in itkReadITKImageShowVTK.cpp is about visualizing an image and not a volume. But i believe i have made the necessary changes needed in order to visualize the volume i want. Here is my code.

template

<typename ITK_Exporter, typename VTK_Importer>

void

ConnectPipelines(ITK_Exporter exporter, VTK_Importer* importer)

{

importer->SetUpdateInformationCallback(exporter->GetUpdateInformationCallback());

importer->SetPipelineModifiedCallback(exporter->GetPipelineModifiedCallback());

importer->SetWholeExtentCallback(exporter->GetWholeExtentCallback());

importer->SetSpacingCallback(exporter->GetSpacingCallback());

importer->SetOriginCallback(exporter->GetOriginCallback());

importer->SetScalarTypeCallback(exporter->GetScalarTypeCallback());

importer->SetNumberOfComponentsCallback(exporter->GetNumberOfComponentsCallback());

importer->SetPropagateUpdateExtentCallback(exporter->GetPropagateUpdateExtentCallback());

importer->SetUpdateDataCallback(exporter->GetUpdateDataCallback());

importer->SetDataExtentCallback(exporter->GetDataExtentCallback());

importer->SetBufferPointerCallback(exporter->GetBufferPointerCallback());

importer->SetCallbackUserData(exporter->GetCallbackUserData());

}

int

itkReadDicomSeries (std::string directoryPath)

{

typedef signed short PixelType;

const unsigned int Dimension = 3;

typedef itk::OrientedImage< PixelType, Dimension > ImageType;

typedef itk::ImageSeriesReader< ImageType > ReaderType;

ReaderType::Pointer reader = ReaderType::New();

typedef itk::GDCMImageIO ImageIOType;

ImageIOType::Pointer dicomIO = ImageIOType::New();

reader->SetImageIO( dicomIO );

typedef itk::GDCMSeriesFileNames NamesGeneratorType;

NamesGeneratorType::Pointer nameGenerator = NamesGeneratorType::New();

nameGenerator->SetUseSeriesDetails(

true );

nameGenerator->AddSeriesRestriction(

"0008|0021" );

nameGenerator->SetDirectory(directoryPath);

std::cout << std::endl <<

"The directory: " << std::endl;

std::cout << std::endl << directoryPath << std::endl << std::endl;

std::cout <<

"Contains the following DICOM Series: ";

std::cout << std::endl << std::endl;

typedef std::vector< std::string > SeriesIdContainer;

const SeriesIdContainer & seriesUID = nameGenerator->GetSeriesUIDs();

SeriesIdContainer::const_iterator seriesItr = seriesUID.begin();

SeriesIdContainer::const_iterator seriesEnd = seriesUID.end();

while( seriesItr != seriesEnd ) {

std::cout << seriesItr->c_str() << std::endl;

seriesItr++;

}

std::string seriesIdentifier;

seriesIdentifier = seriesUID.begin()->c_str();

std::cout << std::endl << std::endl;

std::cout <<

"Now reading series: " << std::endl << std::endl;

std::cout << seriesIdentifier << std::endl;

std::cout << std::endl << std::endl;

typedef std::vector< std::string > FileNamesContainer;

FileNamesContainer fileNames;

fileNames = nameGenerator->GetFileNames( seriesIdentifier );

reader->SetFileNames( fileNames );

reader->Update();

typedef itk::VTKImageExport< ImageType > ExportFilterType;

ExportFilterType::Pointer itkExporter = ExportFilterType::New();

itkExporter->SetInput( reader->GetOutput() );

// Create the vtkImageImport and connect it to the itk::VTKImageExport instance.

vtkImageImport* vtkImporter = vtkImageImport::New();

ConnectPipelines(itkExporter, vtkImporter);

 

vtkPiecewiseFunction* opacityTransferFunction = vtkPiecewiseFunction::New();

vtkVolume* volume = vtkVolume::New();

vtkVolumeProperty* volumeProperty = vtkVolumeProperty::New();

vtkVolumeTextureMapper3D* volumeMapper = vtkVolumeTextureMapper3D::New();

vtkFixedPointVolumeRayCastMapper* volumeMapperSoftware = vtkFixedPointVolumeRayCastMapper::New();

 

volumeProperty->SetScalarOpacity(opacityTransferFunction);

volumeProperty->SetInterpolationTypeToLinear();

volumeProperty->ShadeOff();

volume->SetProperty(volumeProperty);

volumeMapperSoftware->SetInput(vtkImporter->GetOutput());

volumeMapperSoftware->SetSampleDistance(1.0);

volumeMapperSoftware->SetBlendModeToMaximumIntensity();

volume->SetMapper(volumeMapperSoftware);

vtkInteractorStyleTrackballCamera * interactorStyle = vtkInteractorStyleTrackballCamera::New();

// Create a renderer, render window, and render window interactor to display the results.

vtkRenderer* renderer = vtkRenderer::New();

vtkRenderWindow* renWin = vtkRenderWindow::New();

vtkRenderWindowInteractor* iren = vtkRenderWindowInteractor::New();

renWin->SetSize(500, 500);

renWin->AddRenderer(renderer);

iren->SetRenderWindow(renWin);

iren->SetInteractorStyle(interactorStyle);

 

// Add the vtkImageActor to the renderer for display.

renderer->AddVolume(volume);

renderer->SetBackground(0.4392, 0.5020, 0.5647);

 

// Bring up the render window and begin interaction.

renWin->Render();

iren->Start();

}

I would really appreciate any help. Thanks in advance.

_______________________________________________
Insight-users mailing list
Insight-users@...
http://www.itk.org/mailman/listinfo/insight-users
Fab_83 | 1 Apr 2008 16:30
Picon
Picon

mean square metric


hi everybody,

I have used itk::MeanSquaresImageToImageMetric as a metric for my
registration. Then I wanted to evaluate the calculated values and wrote my
own routine to calculate the MS. I simply created two images with noise,
made an translation and calculated the differenceimages. From these
differenceimages I calculated the MS with the same equation than itk but I
get different values than itk. The strangest thing is, that I get values
which get bigger while itk gets values which stay almost the same. 

Perhabs sombody has an idea and can help..

Thanks a lot,
Fab

--

-- 
View this message in context: http://www.nabble.com/mean-square-metric-tp16418466p16418466.html
Sent from the ITK - Users mailing list archive at Nabble.com.
Michael Baltaxe | 1 Apr 2008 21:07
Picon

Morphology - pattern matching

Hi all,

I want to perform a morphological operation in which I want to remove all the pixels that match a pattern in a kernel.

For example, if my image is

0 0 0 0 0 0
0 1 1 1 1 0
0 1 1 1 1 0
0 1 1 1 1 0
0 0 1 0 0 0
0 0 1 0 0 0
0 0 1 0 0 0
0 0 0 0 0 0

and my kernel is:

1 1
1 1

I want the output to be

0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 1 0 0 0
0 0 1 0 0 0
0 0 1 0 0 0
0 0 0 0 0 0

Is there something in ITK that performs this operation? I found the NormalizedCorrelationImageFilter, but I am not sure how to use it, could someone give me some hints on this filter if it the one I should be using?

Thanks a lot,

Michael.

_______________________________________________
Insight-users mailing list
Insight-users@...
http://www.itk.org/mailman/listinfo/insight-users
Walter Cabrera | 1 Apr 2008 22:23

Problems with Qt + itk


Hi,
I am trying to build a program  Qt + itk with mingw. I build makefile with
cmake. When I run mingw32-make fails becouse files qapplication.h and
qpushbutton.h from Qt were not located because paths were erroneous. 
The file qt / include / qtgui / qapplication.h has only instruction: 
# Include "../../ src / gui / kernel / qapplication.h " 
In the folder qt / src / qui / kernel files are qapplication.h and
qapplication.cpp. 
When I compile gives a mistake because the road .. / .. / src / gui / kernel
/ does not exist. 
How to solve this situation? 
Thanks
--

-- 
View this message in context: http://www.nabble.com/Problems-with-Qt-%2B-itk-tp16423544p16423544.html
Sent from the ITK - Users mailing list archive at Nabble.com.
feng yang | 1 Apr 2008 23:31
Picon

how to use VectorLinearInterpolation to get the deformed field

hello, everybody,
I am a new user of itk. I have successfully gotten the deformed field with ThinplateSplineWarping.cxx, and now i just want to use the "itkVectorLinearInterpolateImageFunction" to take the place of  "ThinPlateSplineKernelTransform", and there isn't error in the compiling process.But when i excute it in the cmd window,using the command: "VectorLinear.exe LandTPS.txt out.vtk ",it will jump a window, which says that: "VectorLinear.exe encounter a problem and need to be closed". Has anyone know what is the wrong?
Attaching are the programe i used and the inputfile(whose name is LandTPS.txt) i have used!
 
Thanks a lot!
 
 
 
feng
#if defined(_MSC_VER)
#pragma warning ( disable : 4786 )
#endif

#include <fstream>
#include "itkVector.h" 
#include "itkPoint.h"
#include <itkPointSet.h>
#include "itkImage.h"
#include "itkImageFileWriter.h" 
#include "itkVectorLinearInterpolateImageFunction.h"
#include <itkImageRegionIterator.h> 

int main( int argc, char * argv[] )
{
  if( argc < 2 )
    {
    std::cerr << "Missing Parameters " << std::endl;
    std::cerr << "Usage: " << argv[0];
    std::cerr << " landmarksFile";
    std::cerr << "deformationField" << std::endl;
    return EXIT_FAILURE;
    }
	
	//typedef   itk::Vector< float, ImageDimension >  FieldVectorType;
	typedef   itk::Vector< float, 2 >  PixelType;
    typedef   itk::PointSet< PixelType, 2 >  PointSetType;
	//typedef   itk::Point< double, 2 >  PointType;
	typedef   TransformType::PointType      PointType;
	typedef   PointSetType::PointIdentifier  PointIdType;
    typedef   itk::Image< PixelType,  2 >   DeformationFieldType;
	typedef   itk::VectorLinearInterpolateImageFunction< DeformationFieldType, float >     TransformType;
	typedef   itk::ImageFileWriter< DeformationFieldType >  FieldWriterType;
	typedef   TransformType::OutputType OutputType;

	DeformationFieldType::SizeType size = { { 98,126 } };
    double origin [2] = { 0.5,   0.5 };
    double spacing[2] = { 1,   1};


	PointSetType::Pointer PointSet=PointSetType::New();
	
	//PointSetType::PointType   point;
    PointSetType::PixelType displacement;
	PointType p1; 
	PointType p2;

	PointSetType::Pointer sourceLandMarks = PointSetType::New();
    PointSetType::Pointer targetLandMarks = PointSetType::New();

    PointSetType::PointsContainer::Pointer sourceLandMarkContainer = 
                                   sourceLandMarks->GetPoints();
    PointSetType::PointsContainer::Pointer targetLandMarkContainer = 
                                   targetLandMarks->GetPoints();
    // Software Guide : EndCodeSnippet

    PointIdType id = itk::NumericTraits< PointIdType >::Zero;

    // Read in the list of landmarks
    std::ifstream infile;
    infile.open( argv[1] );
    while (!infile.eof())
      {
      infile >>  p1[0] >> p1[1]  >> p2[0] >> p2[1]; 

      // Software Guide : BeginCodeSnippet
      sourceLandMarkContainer->InsertElement( id, p1 );
      targetLandMarkContainer->InsertElement( id++, p2 );
      // Software Guide : EndCodeSnippet

      //for(int i=0;i<2;i++)
	  //{
		//  displacement[i]=p2[i]-p1[i];
	  //}
      } 
    infile.close();

	OutputType  point1;
    OutputType  point2;
	
	//PixelType displacement2;
	TransformType::Pointer linear = TransformType::New();
    point1=linear->Evaluate(p1);
	point2=linear->Evaluate(p2);
    for (int i=0;i<2;i++) displacement[i] = point2[i] - point1[i];
	
	DeformationFieldType::RegionType region;
    region.SetSize( size );

    DeformationFieldType::Pointer field = DeformationFieldType::New();
    field->SetRegions( region );
    field->SetOrigin( origin );
    field->SetSpacing( spacing );
    field->Allocate();

    typedef itk::ImageRegionIterator< DeformationFieldType > FieldIterator;
    FieldIterator fi( field, region );
    fi.GoToBegin();

    DeformationFieldType::IndexType index;

    

    while( ! fi.IsAtEnd() )
      {
      index = fi.GetIndex();
      fi.Set( displacement );
      ++fi;
      }
  
	  
	FieldWriterType::Pointer fieldWriter = FieldWriterType::New();
    fieldWriter->SetFileName( argv[2] );
    fieldWriter->SetInput( field );
    try
      {
      fieldWriter->Update();
      }
    catch( itk::ExceptionObject & excp )
      {
      std::cerr << "Exception thrown " << std::endl;
      std::cerr << excp << std::endl;
      return EXIT_FAILURE;
      }
}
PROJECT(VectorLinear)
# Find ITK.
FIND_PACKAGE(ITK)
IF(ITK_FOUND)
  INCLUDE(${ITK_USE_FILE})
ELSE(ITK_FOUND)
  MESSAGE(FATAL_ERROR
          "Cannot build without ITK.  Please set ITK_DIR.")
ENDIF(ITK_FOUND)

INCLUDE_REGULAR_EXPRESSION("^.*$")

ADD_EXECUTABLE(VectorLinear VectorLinear.cxx )
TARGET_LINK_LIBRARIES(VectorLinear ITKNumerics ITKFEM ITKIO  ITKStatistics ITKNumerics ITKIO)
	28  15 		        34  14  
	9   22  		13  24  
	10  31   		15  31    
	22  29   		25  27  
	26  40   		33  39   
	85  38   		90  39   
	55  65  		52  64   
	69  64  		65  66   
	74  75   		68  76   
	82  79   		78  82   
	9   97   		14  95   
	28  95   		33  95   
	28  108   		32  109   
	74  107  		70  108   
	72  117                 68  118   
   
		    
_______________________________________________
Insight-users mailing list
Insight-users@...
http://www.itk.org/mailman/listinfo/insight-users
pradeepa Gunaratne | 2 Apr 2008 00:28
Picon
Favicon

INSTALL TARGETS given no DESTINATION

Hi All,

I have just started building itk through cmake. When I give the source and binary locations and click on "configure", it gives me an error message saying that INSTALL TARGETS given no DESTINATION. My environment is Windows Vista, CMake 2.4 patch 8 and InsightToolkit-3.4.0.

Please help me to solve this as I couldn't find any solution.

thanks,

Pradeepa


Get the name you always wanted with the new y7mail email address.
_______________________________________________
Insight-users mailing list
Insight-users@...
http://www.itk.org/mailman/listinfo/insight-users

Gmane