# Beginner Questions

**URL:** https://discourse.itk.org/c/beginner-questions/9.md?no_subcategories=false&page=15

[Latest](https://discourse.itk.org/latest.md) · [Categories](https://discourse.itk.org/categories.md) · [Tags](https://discourse.itk.org/tags.md)

**Page:** 16

---

## [Cannot compile ITK in CentOS 7](https://discourse.itk.org/t/cannot-compile-itk-in-centos-7/5049)

<div class="topic-metadata">

**Author:** [@Humberto\_M](https://discourse.itk.org/u/Humberto_M)\
**Replies:** 2\
**Last updated:** [June 6, 2022, 11:42am UTC](https://discourse.itk.org/t/cannot-compile-itk-in-centos-7/5049 "2022-06-06T11:42:38Z")

</div>

Hello, I have been trying to install ITK in my university’s interactive computing environment which runs Linux CentOS 7. Of course I do not have root access, so I’m not sure if that’s where the problem is coming from. T…

---

## [Semiautomatic Segmentation with SimpleITK](https://discourse.itk.org/t/semiautomatic-segmentation-with-simpleitk/5040)

<div class="topic-metadata">

**Author:** [@shqipcop](https://discourse.itk.org/u/shqipcop)\
**Replies:** 4\
**Last updated:** [June 6, 2022, 8:37am UTC](https://discourse.itk.org/t/semiautomatic-segmentation-with-simpleitk/5040 "2022-06-06T08:37:53Z")

</div>

I’m interested in using SimpleITK to be able to seed an organ in a layer of a CT scan and have the organ segmented, ignoring small connections like veins/arteries. eg. I select a part of the right atrium, the whole right…

---

## [Source code of resample function](https://discourse.itk.org/t/source-code-of-resample-function/5047)

<div class="topic-metadata">

**Author:** [@debapriya](https://discourse.itk.org/u/debapriya)\
**Replies:** 3\
**Last updated:** [June 6, 2022, 8:35am UTC](https://discourse.itk.org/t/source-code-of-resample-function/5047 "2022-06-06T08:35:02Z")

</div>

Hello, Is the source code of sitk.Resample available publicly? If yes, can someone please mention the path to the source code?

---

## [Converting 2D images with tracking information into 3D volume](https://discourse.itk.org/t/converting-2d-images-with-tracking-information-into-3d-volume/5032)

<div class="topic-metadata">

**Author:** [@Ale\_Ballester](https://discourse.itk.org/u/Ale_Ballester)\
**Replies:** 1\
**Last updated:** [May 31, 2022, 3:56pm UTC](https://discourse.itk.org/t/converting-2d-images-with-tracking-information-into-3d-volume/5032 "2022-05-31T15:56:24Z")

</div>

Hi, this is my first time using this forum and I am a beginner with SimpleITK in Python. I have a series of png ultrasound images. Each image has a corresponding (location, quaternion) data from a tracker that indicates…

---

## [dicom files](https://discourse.itk.org/t/dicom-files/4999)

<div class="topic-metadata">

**Author:** [@lang](https://discourse.itk.org/u/lang)\
**Replies:** 4\
**Last updated:** [May 30, 2022, 1:46am UTC](https://discourse.itk.org/t/dicom-files/4999 "2022-05-30T01:46:12Z")

</div>

Multiple threads read dicom files concurrently, always in gdCMdatasethelper.cxx if( tag.IsGroupLength() ) { assert( vr == VR::UL ); } if( tag.IsPrivateCreator() ) { assert( vr == VR::LO ); } Stop at assertion, w…

---

## [ITK-WASM, VSCODE, VITE, EXAMPLES/VITE, reading an head image into viewer](https://discourse.itk.org/t/itk-wasm-vscode-vite-examples-vite-reading-an-head-image-into-viewer/5025)

<div class="topic-metadata">

**Author:** [@sag](https://discourse.itk.org/u/sag)\
**Replies:** 0\
**Last updated:** [May 30, 2022, 1:05pm UTC](https://discourse.itk.org/t/itk-wasm-vscode-vite-examples-vite-reading-an-head-image-into-viewer/5025 "2022-05-30T13:05:14Z")

</div>

Hi @thewtex , I think this requires attention from matt maccormic. I used vscode and opened example vite inside Examples folder of itk-wasm repo. I did (npm install) inside terminal of the vscode and it installed all th…

---

## [DICOM sort method](https://discourse.itk.org/t/dicom-sort-method/5014)

<div class="topic-metadata">

**Author:** [@Hu-nie](https://discourse.itk.org/u/Hu-nie)\
**Replies:** 4\
**Last updated:** [May 30, 2022, 2:06am UTC](https://discourse.itk.org/t/dicom-sort-method/5014 "2022-05-30T02:06:44Z")

</div>

I have a question about DICOM. I am dealing with MR images. At this time, I try to use the Instance Number when aligning the DICOM. When I look at the Type of Instance Number Tag, it says “Required, Empty if Unknown (2)…

---

## [Errors reading DICOM files](https://discourse.itk.org/t/errors-reading-dicom-files/5016)

<div class="topic-metadata">

**Author:** [@debapriya](https://discourse.itk.org/u/debapriya)\
**Replies:** 2\
**Last updated:** [May 28, 2022, 5:58am UTC](https://discourse.itk.org/t/errors-reading-dicom-files/5016 "2022-05-28T05:58:16Z")

</div>

Hello, I am new to python and ITK. I want to read a series of Dicom images. For this, I copied the below code snippet from a previous query. import SimpleITK as sitk # A file name that belongs to the series we want t…

---

## [seg fault when looping color normailzation](https://discourse.itk.org/t/seg-fault-when-looping-color-normailzation/5008)

<div class="topic-metadata">

**Author:** [@Jon](https://discourse.itk.org/u/Jon)\
**Replies:** 10\
**Last updated:** [May 27, 2022, 9:25pm UTC](https://discourse.itk.org/t/seg-fault-when-looping-color-normailzation/5008 "2022-05-27T21:25:57Z")

</div>

For a demo code based on the ITK color normalization example, remove the line eager\_normalized\_image = itk.structure\_preserving\_color\_normalization\_filter( and succeeding lines replacing them with: \< +++++++++++++++++…

---

## [3D SLIC Visualisation](https://discourse.itk.org/t/3d-slic-visualisation/5010)

<div class="topic-metadata">

**Author:** [@aliabidi](https://discourse.itk.org/u/aliabidi)\
**Replies:** 1\
**Last updated:** [May 25, 2022, 11:42pm UTC](https://discourse.itk.org/t/3d-slic-visualisation/5010 "2022-05-25T23:42:40Z")

</div>

As a follow-up from this question regarding SLIC segmentation in 2D, I was wondering whether there is any method or technique to visualise images in 3D? Something similar to the image below from this paper. To give s…

---

## [SimpeElastix affine registration throws error](https://discourse.itk.org/t/simpeelastix-affine-registration-throws-error/4962)

<div class="topic-metadata">

**Author:** [@KateDelb](https://discourse.itk.org/u/KateDelb)\
**Replies:** 2\
**Last updated:** [May 23, 2022, 10:52am UTC](https://discourse.itk.org/t/simpeelastix-affine-registration-throws-error/4962 "2022-05-23T10:52:03Z")

</div>

Trying to execute an affine registration with SimpleElastix: elastixImageFilter = sitk.ElastixImageFilter() elastixImageFilter.SetFixedImage(t1) elastixImageFilter.SetMovingImage(fet) elastixImageFilter.SetParameterMap(…

---

## [readImageFile - webworker](https://discourse.itk.org/t/readimagefile-webworker/4248)

<div class="topic-metadata">

**Author:** [@sam](https://discourse.itk.org/u/sam)\
**Replies:** 5\
**Last updated:** [May 20, 2022, 1:19pm UTC](https://discourse.itk.org/t/readimagefile-webworker/4248 "2022-05-20T13:19:12Z")

</div>

Hello everyone, I work on an application that allows to read medical images (DICOM format) and I use a itk js (readImageFile) that allows to read these images but that returns a webworker to each image read the problem i…

---

## [3d segmentation refinement](https://discourse.itk.org/t/3d-segmentation-refinement/4993)

<div class="topic-metadata">

**Author:** [@AmericaBG](https://discourse.itk.org/u/AmericaBG)\
**Replies:** 4\
**Last updated:** [May 19, 2022, 5:34pm UTC](https://discourse.itk.org/t/3d-segmentation-refinement/4993 "2022-05-19T17:34:29Z")

</div>

Hi! I’ve a 3d mask segmentation that I would like to improve by using some method. For example, something like use the mask like a “seed” and refine the segmentation with the original image information. Original image …

---

## [Resampling to volume to smaller size and smaller voxel spacing](https://discourse.itk.org/t/resampling-to-volume-to-smaller-size-and-smaller-voxel-spacing/4984)

<div class="topic-metadata">

**Author:** [@shadab](https://discourse.itk.org/u/shadab)\
**Replies:** 10\
**Last updated:** [May 19, 2022, 1:55pm UTC](https://discourse.itk.org/t/resampling-to-volume-to-smaller-size-and-smaller-voxel-spacing/4984 "2022-05-19T13:55:21Z")

</div>

Hi ITK community, I have recently started learning SimpleITK and have been stuck on a specific type of Resampling that I have been trying to implement. I have PET/CT Nifti images. My typical PET and CT volumes have the …

---

## [numpy arrays with color normalization](https://discourse.itk.org/t/numpy-arrays-with-color-normalization/4946)

<div class="topic-metadata">

**Author:** [@Jon](https://discourse.itk.org/u/Jon)\
**Replies:** 16\
**Last updated:** [May 16, 2022, 7:30pm UTC](https://discourse.itk.org/t/numpy-arrays-with-color-normalization/4946 "2022-05-16T19:30:09Z")

</div>

… python script trying to use numpy arrays in ‘.npy’ files as input to color normalization, ie args for ‘itk.structure\_preserving\_color\_normalization\_filter’ flist is a list of input paths npy\_inp\_img = np.load(inp\_flist…

---

## [How do i implement a feature such as (mask=segmentaion==c python language) with c++ itk](https://discourse.itk.org/t/how-do-i-implement-a-feature-such-as-mask-segmentaion-c-python-language-with-c-itk/4985)

<div class="topic-metadata">

**Author:** [@Bugmaker](https://discourse.itk.org/u/Bugmaker)\
**Replies:** 2\
**Last updated:** [May 16, 2022, 12:58am UTC](https://discourse.itk.org/t/how-do-i-implement-a-feature-such-as-mask-segmentaion-c-python-language-with-c-itk/4985 "2022-05-16T00:58:24Z")

</div>

I want to transform the following code into ITK(c++ version), But I do not know which functions could do it. HELP! for c in labels: # labels is list that stores the labelmap's unique value mask = segmentation==c …

---

## [itk-python weird time consuming](https://discourse.itk.org/t/itk-python-weird-time-consuming/4975)

<div class="topic-metadata">

**Author:** [@HiunIce](https://discourse.itk.org/u/HiunIce)\
**Replies:** 4\
**Last updated:** [May 13, 2022, 12:20pm UTC](https://discourse.itk.org/t/itk-python-weird-time-consuming/4975 "2022-05-13T12:20:08Z")

</div>

Hi teams, I tried some itk.filter both in cpp and python. The cpp version is ok but python version is quite time consuming(for New statement) ‘’’ cost 15 second for this code itk.RescaleIntensityImageFilter\[self.inpu…

---

## [itk montage tiff without ome-tiff header](https://discourse.itk.org/t/itk-montage-tiff-without-ome-tiff-header/4948)

<div class="topic-metadata">

**Author:** [@allen](https://discourse.itk.org/u/allen)\
**Replies:** 3\
**Last updated:** [May 13, 2022, 10:35am UTC](https://discourse.itk.org/t/itk-montage-tiff-without-ome-tiff-header/4948 "2022-05-13T10:35:48Z")

</div>

hello, i use the itk montage stitching tiles and get a tiff file, but it is not standard tiff format i think, which can not be opened in openslide is there a way to get a OME-XML metadata to the tiff file of itk monta…

---

## [VectorImageToImageMetricTraitsv4 with VectorImage - dynamic number of components](https://discourse.itk.org/t/vectorimagetoimagemetrictraitsv4-with-vectorimage-dynamic-number-of-components/4980)

<div class="topic-metadata">

**Author:** [@zbjornson](https://discourse.itk.org/u/zbjornson)\
**Replies:** 1\
**Last updated:** [May 13, 2022, 9:43am UTC](https://discourse.itk.org/t/vectorimagetoimagemetrictraitsv4-with-vectorimage-dynamic-number-of-components/4980 "2022-05-13T09:43:29Z")

</div>

Hello, The intro text to Perform Registration on Vector Images — v5.3.0 suggests that that code can be used with a VectorImage. It uses VectorImageToImageMetricTraitsv4, and the docs for that class say it works with Vec…

---

## [Mesh visualization itk](https://discourse.itk.org/t/mesh-visualization-itk/4964)

<div class="topic-metadata">

**Author:** [@Jakub\_Mitura](https://discourse.itk.org/u/Jakub_Mitura)\
**Replies:** 8\
**Last updated:** [May 11, 2022, 3:43pm UTC](https://discourse.itk.org/t/mesh-visualization-itk/4964 "2022-05-11T15:43:11Z")

</div>

Hello i would like to use some external visualization tool with multiview, scroling and mesh visualization using python I have a problem that as far as I understand meshes are only in itk, and all visualization examples…

---

## [Registration of volume Ct-Scans with different morphology/anatomical structures](https://discourse.itk.org/t/registration-of-volume-ct-scans-with-different-morphology-anatomical-structures/4971)

<div class="topic-metadata">

**Author:** [@Le\_Warman](https://discourse.itk.org/u/Le_Warman)\
**Replies:** 1\
**Last updated:** [May 10, 2022, 11:20pm UTC](https://discourse.itk.org/t/registration-of-volume-ct-scans-with-different-morphology-anatomical-structures/4971 "2022-05-10T23:20:43Z")

</div>

Hello, I’m currently working with a dataset with different patients. Each one of them is a 3D CT-scan volume with different properties such as pixel spacing, hounsfield units range (but I’m doing a clipping between -102…

---

## [Installation from Git sources (master, 5.3rc03) with double vector support](https://discourse.itk.org/t/installation-from-git-sources-master-5-3rc03-with-double-vector-support/4957)

<div class="topic-metadata">

**Author:** [@edgar](https://discourse.itk.org/u/edgar)\
**Replies:** 6\
**Last updated:** [May 7, 2022, 10:56am UTC](https://discourse.itk.org/t/installation-from-git-sources-master-5-3rc03-with-double-vector-support/4957 "2022-05-07T10:56:32Z")

</div>

Installation from Git sources (master, 5.3rc03) with double vector support Dear developers, I am trying to get a deformable transformation. I am now using Arch (see below) and “regular” compilation flags (as provided by…

---

## [Is ITKStrain still supported?](https://discourse.itk.org/t/is-itkstrain-still-supported/4956)

<div class="topic-metadata">

**Author:** [@edgar](https://discourse.itk.org/u/edgar)\
**Replies:** 3\
**Last updated:** [May 6, 2022, 3:03pm UTC](https://discourse.itk.org/t/is-itkstrain-still-supported/4956 "2022-05-06T15:03:10Z")

</div>

Continuing the discussion from Installation of ITKElastix with pip Installing and using Python wrapped Remote Module: Hello! I am trying to install itk-strain with pip, but I got an error (see below). Thus, I clicked o…

---

## [SimpleITK: Extract largest Connected component from binary image](https://discourse.itk.org/t/simpleitk-extract-largest-connected-component-from-binary-image/4958)

<div class="topic-metadata">

**Author:** [@pythonuser](https://discourse.itk.org/u/pythonuser)\
**Replies:** 2\
**Last updated:** [May 3, 2022, 5:21pm UTC](https://discourse.itk.org/t/simpleitk-extract-largest-connected-component-from-binary-image/4958 "2022-05-03T17:21:39Z")

</div>

Hi, I am trying to extract the largest connected component from a binary image / (delete all connected components but the largest one), I tried using the Label filters, but couldn’t make it work. Thanks in advance!

---

## [Calculating mutual information of two images](https://discourse.itk.org/t/calculating-mutual-information-of-two-images/4931)

<div class="topic-metadata">

**Author:** [@Flo](https://discourse.itk.org/u/Flo)\
**Replies:** 4\
**Last updated:** [April 26, 2022, 12:09pm UTC](https://discourse.itk.org/t/calculating-mutual-information-of-two-images/4931 "2022-04-26T12:09:43Z")

</div>

I have corresponding MRI and CT image volumes. I have registered them using the mattes mutual information metric. The results seem fine but I would like to be able to calculate the metric of two 3D images that are alread…

---

## [How to call the FEM module in Python?](https://discourse.itk.org/t/how-to-call-the-fem-module-in-python/4937)

<div class="topic-metadata">

**Author:** [@edgar](https://discourse.itk.org/u/edgar)\
**Replies:** 2\
**Last updated:** [April 26, 2022, 9:45am UTC](https://discourse.itk.org/t/how-to-call-the-fem-module-in-python/4937 "2022-04-26T09:45:47Z")

</div>

How to use the FEM module? I must be doing something terribly silly. Can you please help me to access the FEM module? I was just trying to translate DeformableRegistration1.cxx into Python. Thanks. import itk itk.fem …

---

## [Installation of ITKElastix with pip](https://discourse.itk.org/t/installation-of-itkelastix-with-pip/4936)

<div class="topic-metadata">

**Author:** [@edgar](https://discourse.itk.org/u/edgar)\
**Replies:** 2\
**Last updated:** [April 26, 2022, 9:44am UTC](https://discourse.itk.org/t/installation-of-itkelastix-with-pip/4936 "2022-04-26T09:44:58Z")

</div>

Hello! I tried to look into ITKElastix. As posted on the repository, I did pip install itk-elastix but I also installed TubeTK, ITKStrain, SciPy, Scikit-image and Scikit-learn pip install itk-tubetk itk-strain pip in…

---

## [access meta dictionary using simpleitk](https://discourse.itk.org/t/access-meta-dictionary-using-simpleitk/4939)

<div class="topic-metadata">

**Author:** [@sehreen](https://discourse.itk.org/u/sehreen)\
**Replies:** 3\
**Last updated:** [April 25, 2022, 11:57pm UTC](https://discourse.itk.org/t/access-meta-dictionary-using-simpleitk/4939 "2022-04-25T23:57:53Z")

</div>

how can I change the following code to read image in Simpleitk set meta data and save as simpleitk dicom = dcmread(dcm\_path) #load it from simplitk and read it in simplitk instead dcmread for key,value in meta\_dict.ite…

---

## [write a tif file](https://discourse.itk.org/t/write-a-tif-file/4923)

<div class="topic-metadata">

**Author:** [@assia855](https://discourse.itk.org/u/assia855)\
**Replies:** 6\
**Last updated:** [April 19, 2022, 2:02pm UTC](https://discourse.itk.org/t/write-a-tif-file/4923 "2022-04-19T14:02:25Z")

</div>

Hello, I’m trying to save my processed data in tif format using this code, but all what I got is a black image. any suggestion to solve this error. thanks in advance. \` writer = sitk.ImageFileWriter() writer.SetFileNa…

---

## [BinaryPruningImageFilter](https://discourse.itk.org/t/binarypruningimagefilter/4924)

<div class="topic-metadata">

**Author:** [@assia855](https://discourse.itk.org/u/assia855)\
**Replies:** 4\
**Last updated:** [April 19, 2022, 1:40pm UTC](https://discourse.itk.org/t/binarypruningimagefilter/4924 "2022-04-19T13:40:05Z")

</div>

Hello, I want to apply this function on my data, but I couldn’t understand the documentation and there’s no example. I would like an example on how can I apply it. Thanks in advance.

[Previous page](https://discourse.itk.org/c/beginner-questions/9.md?no_subcategories=false&page=14)

[Next page](https://discourse.itk.org/c/beginner-questions/9.md?no_subcategories=false&page=16)
