[Insight-users] 'itkDenseFrequencyContainer2.h': No such file or directory

Humayun Irshad humayun.irshad at gmail.com
Tue Mar 20 00:25:23 EDT 2012


I did before. But I didn't work. Now I am installing ITK 4.1.0 with
ITK_USE_Review On. 

Bill Lorensen-2 wrote:
> 
> Try
> ITK_USE_REVIEW_STATISTICS ON in your cake configuration.
> 
> On Mon, Mar 19, 2012 at 8:36 PM, Humayun Irshad
> <humayun.irshad at gmail.com> wrote:
>>
>> I am using InsightToolkit-3.20.0
>>
>>
>> Bill Lorensen-2 wrote:
>>>
>>> What version of ITK are you using?
>>>
>>> On Mon, Mar 19, 2012 at 2:51 AM, Humayun Irshad
>>> <humayun.irshad at gmail.com> wrote:
>>>>
>>>> When i compile this code (took from this link
>>>> http://www.cmake.org/Wiki/ITK/Examples/Statistics/TextureFeatures)
>>>> I also include ITKStatistics.lib or add ITKReview (../Code/Review/). I
>>>> found
>>>> this error message.
>>>>
>>>> 1>Compiling...
>>>> 1>TextureFeatures.cxx
>>>> 1>..\TextureFeatures.cxx(4) : fatal error C1083: Cannot open include
>>>> file:
>>>> 'itkDenseFrequencyContainer2.h': No such file or directory
>>>> 1>Build log was saved at
>>>> "file://h:\ITK\WS\GLCM\build\TextureFeatures.dir\Debug\BuildLog.htm"
>>>> 1>TextureFeatures - 1 error(s), 0 warning(s)
>>>> 2>------ Skipped Build: Project: ALL_BUILD, Configuration: Debug Win32
>>>> ------
>>>> 2>Project not selected to build for this solution configuration
>>>> ========== Build: 0 succeeded, 1 failed, 1 up-to-date, 1 skipped
>>>> ==========
>>>>
>>>> Can i anybody help me regarding this error.
>>>> #include "itkImage.h"
>>>> #include "itkImageFileReader.h"
>>>> #include "itkImageFileWriter.h"
>>>> #include <itkDenseFrequencyContainer2.h>
>>>> #include "itkHistogramToTextureFeaturesFilter.h"
>>>> #include "itkScalarImageToCooccurrenceMatrixFilter.h"
>>>> #include "itkVectorContainer.h"
>>>> #include "itkAddImageFilter.h"
>>>> #include "itkMultiplyImageFilter.h"
>>>> #include "itkRegionOfInterestImageFilter.h"
>>>>
>>>>
>>>> //definitions of used types
>>>> typedef itk::Image<float, 3> InternalImageType;
>>>> typedef itk::Image<unsigned char, 3> VisualizingImageType;
>>>> typedef itk::Neighborhood<float, 3> NeighborhoodType;
>>>> typedef
>>>> itk::Statistics::ScalarImageToCooccurrenceMatrixFilter<InternalImageType>
>>>>    Image2CoOccuranceType;
>>>> typedef Image2CoOccuranceType::HistogramType HistogramType;
>>>> typedef
>>>> itk::Statistics::HistogramToTextureFeaturesFilter<HistogramType>
>>>> Hist2FeaturesType;
>>>> typedef InternalImageType::OffsetType OffsetType;
>>>> typedef itk::AddImageFilter <InternalImageType> AddImageFilterType;
>>>> typedef itk::MultiplyImageFilter<InternalImageType>
>>>> MultiplyImageFilterType;
>>>>
>>>> //calculate features for one offset
>>>> void calcTextureFeatureImage (OffsetType offset,
>>>>    InternalImageType::Pointer inputImage, InternalImageType::Pointer
>>>> outInertia,
>>>>    InternalImageType::Pointer outCorrelation,
>>>> InternalImageType::Pointer
>>>> outEnergy)
>>>> {
>>>>    //allocate output images
>>>>    outInertia->CopyInformation(inputImage);
>>>>    outInertia->SetRegions(inputImage->GetLargestPossibleRegion());
>>>>    outInertia->Allocate();
>>>>    outInertia->FillBuffer(0);
>>>>    outCorrelation->CopyInformation(inputImage);
>>>>    outCorrelation->SetRegions(inputImage->GetLargestPossibleRegion());
>>>>    outCorrelation->Allocate();
>>>>    outCorrelation->FillBuffer(0);
>>>>    outEnergy->CopyInformation(inputImage);
>>>>    outEnergy->SetRegions(inputImage->GetLargestPossibleRegion());
>>>>    outEnergy->Allocate();
>>>>    outEnergy->FillBuffer(0);
>>>>
>>>>    Image2CoOccuranceType::Pointer
>>>> glcmGenerator=Image2CoOccuranceType::New();
>>>>    glcmGenerator->SetOffset(offset);
>>>>    glcmGenerator->SetNumberOfBinsPerAxis(16); //reasonable number of
>>>> bins
>>>>    glcmGenerator->SetPixelValueMinMax(0, 255); //for input UCHAR pixel
>>>> type
>>>>    Hist2FeaturesType::Pointer featureCalc=Hist2FeaturesType::New();
>>>>
>>>>    typedef
>>>> itk::RegionOfInterestImageFilter<InternalImageType,InternalImageType>
>>>> roiType;
>>>>    roiType::Pointer roi=roiType::New();
>>>>    roi->SetInput(inputImage);
>>>>
>>>>    InternalImageType::RegionType window;
>>>>    InternalImageType::RegionType::SizeType size;
>>>>    size.Fill(3); //window size=3x3x3
>>>>    window.SetSize(size);
>>>>    InternalImageType::IndexType pi; //pixel index
>>>>
>>>>    //slide window over the entire image
>>>>    for (unsigned x=1;
>>>> x<inputImage->GetLargestPossibleRegion().GetSize(0)-1; x++)
>>>>    {
>>>>        pi.SetElement(0,x);
>>>>        window.SetIndex(0,x-1);
>>>>        for (unsigned y=1;
>>>> y<inputImage->GetLargestPossibleRegion().GetSize(1)-1; y++)
>>>>        {
>>>>            pi.SetElement(1,y);
>>>>            window.SetIndex(1,y-1);
>>>>            for (unsigned z=1;
>>>> z<inputImage->GetLargestPossibleRegion().GetSize(2)-1; z++)
>>>>            {
>>>>                pi.SetElement(2,z);
>>>>                window.SetIndex(2,z-1);
>>>>                roi->SetRegionOfInterest(window);
>>>>                roi->Update();
>>>>                glcmGenerator->SetInput(roi->GetOutput());
>>>>                glcmGenerator->Update();
>>>>                featureCalc->SetInput( glcmGenerator->GetOutput() );
>>>>                featureCalc->Update();
>>>>
>>>>                outInertia->SetPixel(pi,
>>>> featureCalc->GetFeature(Hist2FeaturesType::Inertia));
>>>>                outCorrelation->SetPixel(pi,
>>>> featureCalc->GetFeature(Hist2FeaturesType::Correlation));
>>>>                outEnergy->SetPixel(pi,
>>>> featureCalc->GetFeature(Hist2FeaturesType::Energy));
>>>>            }
>>>>        }
>>>>        std::cout<<'.';
>>>>    }
>>>> }
>>>>
>>>> int main(int, char *[])
>>>> {
>>>>    typedef itk::ImageFileReader<InternalImageType> ReaderType;
>>>>    ReaderType::Pointer reader=ReaderType::New();
>>>>    reader->SetFileName("t64.mha");
>>>> //http://www.cg.informatik.uni-siegen.de/data/Downloads/t64.mha
>>>>    reader->Update();
>>>>    InternalImageType::Pointer image=reader->GetOutput();
>>>>
>>>>    NeighborhoodType neighborhood;
>>>>    neighborhood.SetRadius(1);
>>>>    unsigned int centerIndex =
>>>> neighborhood.GetCenterNeighborhoodIndex();
>>>>    OffsetType offset;
>>>>
>>>>    typedef itk::ImageFileWriter<InternalImageType> WriterType;
>>>>    WriterType::Pointer writer=WriterType::New();
>>>>    char buf[64];
>>>>
>>>>    for ( unsigned int d = 0; d < centerIndex; d++ )
>>>>    {
>>>>        offset = neighborhood.GetOffset(d);
>>>>        InternalImageType::Pointer inertia=InternalImageType::New();
>>>>        InternalImageType::Pointer correlation=InternalImageType::New();
>>>>        InternalImageType::Pointer energy=InternalImageType::New();
>>>>        calcTextureFeatureImage(offset, image, inertia, correlation,
>>>> energy);
>>>>
>>>>        writer->SetInput(inertia);
>>>>                std::stringstream fileNameWithExt;
>>>>                fileNameWithExt << "Inertia" << d << ".mha";
>>>>                std::string fileName(fileNameWithExt.str());
>>>>                writer->SetFileName(fileName.c_str());
>>>>        writer->Update();
>>>>        writer->SetInput(correlation);
>>>>                std::stringstream fileNameWithExt2;
>>>>                fileNameWithExt2 << "Correlation" << d << ".mha";
>>>>                std::string fileName2(fileNameWithExt2.str());
>>>>                writer->SetFileName(fileName2.c_str());
>>>>            writer->SetFileName(buf);
>>>>        writer->Update();
>>>>        writer->SetInput(energy);
>>>>                std::stringstream fileNameWithExt3;
>>>>                fileNameWithExt3 << "Energy" << d << ".mha";
>>>>                std::string fileName3(fileNameWithExt3.str());
>>>>                writer->SetFileName(fileName3.c_str());
>>>>        writer->SetFileName(buf);
>>>>        writer->Update();
>>>>        std::cout<<'\n';
>>>>    }
>>>>
>>>>    return EXIT_SUCCESS;
>>>> }
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/%27itkDenseFrequencyContainer2.h%27%3A-No-such-file-or-directory-tp33530148p33530148.html
>>>> Sent from the ITK - Users mailing list archive at Nabble.com.
>>>>
>>>> _____________________________________
>>>> Powered by www.kitware.com
>>>>
>>>> Visit other Kitware open-source projects at
>>>> http://www.kitware.com/opensource/opensource.html
>>>>
>>>> Kitware offers ITK Training Courses, for more information visit:
>>>> http://www.kitware.com/products/protraining.php
>>>>
>>>> Please keep messages on-topic and check the ITK FAQ at:
>>>> http://www.itk.org/Wiki/ITK_FAQ
>>>>
>>>> Follow this link to subscribe/unsubscribe:
>>>> http://www.itk.org/mailman/listinfo/insight-users
>>>
>>>
>>>
>>> --
>>> Unpaid intern in BillsBasement at noware dot com
>>> _____________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Kitware offers ITK Training Courses, for more information visit:
>>> http://www.kitware.com/products/protraining.php
>>>
>>> Please keep messages on-topic and check the ITK FAQ at:
>>> http://www.itk.org/Wiki/ITK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.itk.org/mailman/listinfo/insight-users
>>>
>>>
>> --
>> View this message in context:
>> http://old.nabble.com/%27itkDenseFrequencyContainer2.h%27%3A-No-such-file-or-directory-tp33530148p33536387.html
>> Sent from the ITK - Users mailing list archive at Nabble.com.
>>
>> _____________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Kitware offers ITK Training Courses, for more information visit:
>> http://www.kitware.com/products/protraining.php
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-users
> 
> 
> 
> -- 
> Unpaid intern in BillsBasement at noware dot com
> _____________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
> 
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
> 
> 

-- 
View this message in context: http://old.nabble.com/%27itkDenseFrequencyContainer2.h%27%3A-No-such-file-or-directory-tp33530148p33536493.html
Sent from the ITK - Users mailing list archive at Nabble.com.



More information about the Insight-users mailing list